Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix black by updating to the lates version #1360

Merged
merged 1 commit into from Mar 30, 2022

Conversation

suhaibmujahid
Copy link
Member

A new version of click (v8.1.0). One of black's dependencies introduced the following error in pre-commit (see psf/black#2964):

seed isort known_third_party.............................................Passed
isort....................................................................Passed
black....................................................................Failed
- hook id: black
- exit code: 1

Traceback (most recent call last):
  File "/Users/smujahid/.cache/pre-commit/repopnfkm2uv/py_env-python3/bin/black", line 8, in <module>
    sys.exit(patched_main())
  File "/Users/smujahid/.cache/pre-commit/repopnfkm2uv/py_env-python3/lib/python3.9/site-packages/black/__init__.py", line 1423, in patched_main
    patch_click()
  File "/Users/smujahid/.cache/pre-commit/repopnfkm2uv/py_env-python3/lib/python3.9/site-packages/black/__init__.py", line 1409, in patch_click
    from click import _unicodefun
ImportError: cannot import name '_unicodefun' from 'click' (/Users/smujahid/.cache/pre-commit/repopnfkm2uv/py_env-python3/lib/python3.9/site-packages/click/__init__.py)

flake8...................................................................Passed
check python ast.........................................................Passed
check docstring is first.................................................Passed
check that executables have shebangs.................(no files to check)Skipped
check for merge conflicts................................................Passed
check for broken symlinks............................(no files to check)Skipped
debug statements (python)................................................Passed
trim trailing whitespace.................................................Passed
check yaml...........................................(no files to check)Skipped
mixed line ending........................................................Passed
tests should end in _test.py.........................(no files to check)Skipped
check json...........................................(no files to check)Skipped
fix requirements.txt.................................(no files to check)Skipped
check vcs permalinks.....................................................Passed
codespell................................................................Passed
taskcluster_yml......................................(no files to check)Skipped
Strip unnecessary `# noqa`s..............................................Passed
Check for useless excludes...........................(no files to check)Skipped

The issue got solved in the latest version of black (see psf/black#2966).

Copy link
Contributor

@marco-c marco-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImportError: cannot import name '_unicodefun' from 'click' while running black
2 participants