pre-commit-config file should update black version

Bug #1980548 reported by Gabriel Cocenza
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bootstack-charms-spec
Won't Fix
Undecided
Unassigned

Bug Description

I've started a new project using the template that comes and when I try to commit appears this:

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

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

Digging a little bit [0], I saw that a fix for that was released on Black 22.3.0. Versions before that won't work with click 8.1.0.

[0] https://stackoverflow.com/questions/71673404/importerror-cannot-import-name-unicodefun-from-click

Revision history for this message
Eric Chen (eric-chen) wrote :

This project is out of date and all active projects are migrate to github.

Changed in bootstack-charms-spec:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.