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

Unable to run Blue formatting #81

Open
gturbyne opened this issue Aug 23, 2022 · 4 comments
Open

Unable to run Blue formatting #81

gturbyne opened this issue Aug 23, 2022 · 4 comments

Comments

@gturbyne
Copy link

Seems like I'm unable to get blue to run anymore...

I consistently get the following error:
Traceback (most recent call last): File "/Users/gturbyne/workspace/sonarqube-tools/build/sonarqube-tools/environments/satellites/codeQuality/bin/blue", line 5, in <module> from blue import main File "/Users/gturbyne/workspace/sonarqube-tools/build/sonarqube-tools/environments/satellites/codeQuality/lib/python3.7/site-packages/blue/__init__.py", line 10, in <module> import black File "/Users/gturbyne/workspace/sonarqube-tools/build/sonarqube-tools/environments/satellites/codeQuality/lib/python3.7/site-packages/black/__init__.py", line 371, in <module> ) -> None: File "/Users/gturbyne/workspace/sonarqube-tools/build/sonarqube-tools/environments/satellites/python/lib/python3.7/site-packages/click/decorators.py", line 170, in decorator _param_memo(f, OptionClass(param_decls, **attrs)) File "/Users/gturbyne/workspace/sonarqube-tools/build/sonarqube-tools/environments/satellites/python/lib/python3.7/site-packages/click/core.py", line 1460, in __init__ Parameter.__init__(self, param_decls, type=type, **attrs) TypeError: __init__() got an unexpected keyword argument 'hidden' DURATION: 0.51s

@grantjenks
Copy link
Owner

Which version of blue is getting used here? And can you share the CLI args?

@gturbyne
Copy link
Author

Hmm, looks like gradle is pulling in version 0.7.0 by default. Here is the full command that was run when I invoked the task:
'PYTHONDONTWRITEBYTECODE='1' PYTHONPATH='/Users/gturbyne/workspace/sonarqube-tools/build/sonarqube-tools/environments/venv/lib/python3.7/site-packages:/Users/gturbyne/workspace/sonarqube-tools/build/sonarqube-tools/environments/satellites/python/lib/python3.7/site-packages:/Users/gturbyne/workspace/sonarqube-tools/build/sonarqube-tools/environments/satellites/codeQuality/lib/python3.7/site-packages' /Users/gturbyne/workspace/sonarqube-tools/build/sonarqube-tools/environments/venv/bin/python /Users/gturbyne/workspace/sonarqube-tools/build/sonarqube-tools/environments/satellites/codeQuality/bin/blue --target-version py37 -l 120 /Users/gturbyne/workspace/sonarqube-tools/sonarqube-tools/src /Users/gturbyne/workspace/sonarqube-tools/sonarqube-tools/test'

@warsaw
Copy link
Collaborator

warsaw commented Aug 24, 2022

@gturbyne If you're using flake8 v5, Python 3.10, or Python 3.11 you probably want to use the latest version 0.9.1.

Ah, I see you're on Python 3.7, but still!

@gturbyne
Copy link
Author

Hey @warsaw, I tried pulling in the latest version by adding it to my product-spec.json, and saw that the correct version was added into my build dir, however I’m still getting the same error.

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

No branches or pull requests

3 participants