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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-commit failing due to black issue (#2966) #147

Closed
speediedan opened this issue Mar 29, 2022 · 1 comment
Closed

Pre-commit failing due to black issue (#2966) #147

speediedan opened this issue Mar 29, 2022 · 1 comment
Labels
bug / fix Something isn't working help wanted Extra attention is needed

Comments

@speediedan
Copy link
Contributor

馃悰 Bug

An issue with black (introduced by click) was causing the pre-commit "Format Code" hook to fail. Version 22.3.0 of black was released and needs to be specified with the relevant pre-commit hook we're using. I've verified that updating the black version referenced in the pre-commit hook configuration addresses the issue.

To Reproduce

Steps to reproduce the behavior:
Check latest pre-commit "Code Formatting" logs or run pre-commit run --all-files with a black version < 22.3.0 referenced in the hook

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

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

Expected behavior

The code format check should complete successfully.

@speediedan speediedan added bug / fix Something isn't working help wanted Extra attention is needed labels Mar 29, 2022
@Borda
Copy link
Member

Borda commented Apr 8, 2022

fixed in #153

@Borda Borda closed this as completed Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug / fix Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants