We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
I get AttributeError when running Darker.
AttributeError
To Reproduce Steps to reproduce the behavior:
darker .
❯ ❯ darker --help Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.12/bin/darker", line 5, in <module> from darker.__main__ import main_with_error_handling File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/darker/__main__.py", line 25, in <module> from darker.fstring import apply_flynt, flynt File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/darker/fstring.py", line 14, in <module> flynt_fstringify_code_by_line = flynt.process.fstringify_code_by_line ^^^^^^^^^^^^^ AttributeError: module 'flynt' has no attribute 'process'
Expected behavior
No AttributeError.
Environment (please complete the following information):
Additional context
Started happening between 1.6.1 and 1.7.0.
git bisect points to f8f9e4c in PR #308.
f8f9e4c3f692917536603ccbb911777447748e30 is the first bad commit commit f8f9e4c3f692917536603ccbb911777447748e30 Author: Antti Kaihola <13725+akaihola@users.noreply.github.com> Date: Mon Dec 26 17:55:21 2022 +0200 Implement `flynt` support src/darker/__main__.py | 247 +++++++++++++++------ src/darker/config.py | 2 + src/darker/diff.py | 3 + src/darker/fstring.py | 75 +++++++ src/darker/git.py | 2 + src/darker/linting.py | 10 + src/darker/tests/test_command_line.py | 14 +- src/darker/tests/test_fstring.py | 50 +++++ src/darker/tests/test_main.py | 132 ++++++++--- .../test_main_blacken_and_flynt_single_file.py | 133 +++++++++++ src/darker/tests/test_main_blacken_single_file.py | 130 ----------- 11 files changed, 568 insertions(+), 230 deletions(-) create mode 100644 src/darker/fstring.py create mode 100644 src/darker/tests/test_fstring.py create mode 100644 src/darker/tests/test_main_blacken_and_flynt_single_file.py delete mode 100644 src/darker/tests/test_main_blacken_single_file.py
The text was updated successfully, but these errors were encountered:
Thanks @hugovk!
Which version of Flynt do you have? What if you downgrade it, can you find an earlier version which doesn't make Darker fail?
Sorry, something went wrong.
Also, could you check whether #480 fixes this?
Reproducible with Flynt 1.0.0 and 1.0.1, not with 0.78.
And yes, #480 fixes it :)
Ok, that's planned for version 2.1.0.
Duplicate of #472.
hugovk
No branches or pull requests
Describe the bug
I get
AttributeError
when running Darker.To Reproduce
Steps to reproduce the behavior:
darker .
Expected behavior
No
AttributeError
.Environment (please complete the following information):
Additional context
Started happening between 1.6.1 and 1.7.0.
git bisect points to f8f9e4c in PR #308.
The text was updated successfully, but these errors were encountered: