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 to fix click ImportError #576

Merged
merged 1 commit into from
Mar 30, 2022
Merged

Conversation

tomvothecoder
Copy link
Collaborator

@tomvothecoder tomvothecoder commented Mar 30, 2022

Related to psf/black#2964

Traceback (using black=22.1.0):

(edv250_py39) vo13@ml-9704174 e3sm_diags % pre-commit run --all-files
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...............................................................Passed
black....................................................................Failed
- hook id: black
- exit code: 1

Traceback (most recent call last):
  File "/Users/vo13/.cache/pre-commit/repo__u3u49_/py_env-python3.9/bin/black", line 8, in <module>
    sys.exit(patched_main())
  File "/Users/vo13/.cache/pre-commit/repo__u3u49_/py_env-python3.9/lib/python3.9/site-packages/black/__init__.py", line 1423, in patched_main
    patch_click()
  File "/Users/vo13/.cache/pre-commit/repo__u3u49_/py_env-python3.9/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/vo13/.cache/pre-commit/repo__u3u49_/py_env-python3.9/lib/python3.9/site-packages/click/__init__.py)

The solution is to update to the latest version of black (22.3.0).

@tomvothecoder tomvothecoder added bug Bug fix (will increment patch version) DevOps CI/CD, configuration, etc. labels Mar 30, 2022
@tomvothecoder tomvothecoder self-assigned this Mar 30, 2022
@tomvothecoder
Copy link
Collaborator Author

FYI @forsyth2 and @chengzhuzhang, this might affect other repos that use black depending on the version.

The error was being thrown on black=22.1.0 for e3sm_diags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fix (will increment patch version) DevOps CI/CD, configuration, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant