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

Investigate why black pre-commit hook fails #19

Closed
dpalmasan opened this issue Mar 28, 2022 · 1 comment
Closed

Investigate why black pre-commit hook fails #19

dpalmasan opened this issue Mar 28, 2022 · 1 comment
Labels
bug Something isn't working ci config

Comments

@dpalmasan
Copy link
Owner

Not sure why I get this error when running black on pre-commit. As a workaround currenly poetry run black . is being used.

black....................................................................Failed
- hook id: black
- exit code: 1

Traceback (most recent call last):
  File "/home/dpalma/.cache/pre-commit/reporuiqo72y/py_env-python3.8/bin/black", line 8, in <module>
    sys.exit(patched_main())
  File "/home/dpalma/.cache/pre-commit/reporuiqo72y/py_env-python3.8/lib/python3.8/site-packages/black/__init__.py", line 6606, in patched_main
    patch_click()
  File "/home/dpalma/.cache/pre-commit/reporuiqo72y/py_env-python3.8/lib/python3.8/site-packages/black/__init__.py", line 6595, in patch_click
    from click import _unicodefun  # type: ignore
ImportError: cannot import name '_unicodefun' from 'click' (/home/dpalma/.cache/pre-commit/reporuiqo72y/py_env-python3.8/lib/python3.8/site-packages/click/__init__.py)
@dpalmasan dpalmasan added bug Something isn't working config ci labels Mar 28, 2022
@dpalmasan
Copy link
Owner Author

It seems it was related to ImportError: cannot import name '_unicodefun' from 'click'. Updating to 8.1.2 fixed the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci config
Projects
None yet
Development

No branches or pull requests

1 participant