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

Error with black==22.1.0 #141

Closed
ppfeufer opened this issue Jan 29, 2022 · 1 comment · Fixed by #142
Closed

Error with black==22.1.0 #141

ppfeufer opened this issue Jan 29, 2022 · 1 comment · Fixed by #142

Comments

@ppfeufer
Copy link

My pre-commit config:

  - repo: https://github.com/asottile/blacken-docs
    rev: v1.12.0
    hooks:
      - id: blacken-docs
        additional_dependencies: [ black==22.1.0 ]

Error:

blacken-docs.............................................................Failed
- hook id: blacken-docs
- exit code: 1

Traceback (most recent call last):
  File "/tmp/ppfeufer/.cache/pre-commit/repoh7brsv91/py_env-python3/bin/blacken-docs", line 8, in <module>
    sys.exit(main())
  File "/tmp/ppfeufer/.cache/pre-commit/repoh7brsv91/py_env-python3/lib/python3.9/site-packages/blacken_docs.py", line 238, in main
    black_mode = black.FileMode(
  File "<string>", line 3, in __init__
TypeError: set object expected; got list

Works perfectly fine with ``black==21.12b0`

pip show black:

Name: black
Version: 22.1.0
Summary: The uncompromising code formatter.
Home-page: https://github.com/psf/black
Author: Łukasz Langa
Author-email: [email protected]
License: MIT
Location: /mnt/sda1/Development/Python/AllianceAuth/venv-3.9/lib/python3.9/site-packages
Requires: click, mypy-extensions, pathspec, platformdirs, tomli, typing-extensions
Required-by: 
@asottile
Copy link
Contributor

I'm inclined to believe this is a regression in black so let's track it there: psf/black#2829

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants