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

Update black pre-commit hook #360

Closed
thekaveman opened this issue Mar 29, 2022 · 0 comments · Fixed by #361
Closed

Update black pre-commit hook #360

thekaveman opened this issue Mar 29, 2022 · 0 comments · Fixed by #361
Assignees
Labels
bug Something isn't working chore Chores and tasks for code cleanup, dev experience, admin/configuration settings, etc.

Comments

@thekaveman
Copy link
Member

Recently our pre-commit Actions started failing (e.g. run 2054926695 and run 2055039571, with the culprit being the black formatter:

Trim Trailing Whitespace.................................................Passed
Mixed line ending........................................................Passed
Fix End of Files.........................................................Passed
Fix requirements.txt.....................................................Passed
Check Yaml...............................................................Passed
Check for added large files..............................................Passed
black....................................................................Failed
- hook id: black
- exit code: 1

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

This was also failing locally.

black released an update to fix this, we need to update to 22.3.0.

See psf/black#2964 for more context.

@thekaveman thekaveman added bug Something isn't working chore Chores and tasks for code cleanup, dev experience, admin/configuration settings, etc. labels Mar 29, 2022
@thekaveman thekaveman moved this to This Sprint in Digital Services Mar 29, 2022
@thekaveman thekaveman moved this from This Sprint to In Progress in Digital Services Mar 29, 2022
@thekaveman thekaveman self-assigned this Mar 29, 2022
Repository owner moved this from In Progress to Done in Digital Services Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working chore Chores and tasks for code cleanup, dev experience, admin/configuration settings, etc.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant