August 28 - September 4, 2022 in Darker: Addressing Linter Output and Exploring Formatting Challenges #686
akaihola
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This week, we focused on improving linter integration and addressing formatting challenges in Darker. We investigated an issue where linter output was missing spaces when using
color = true
in pre-commit hooks, specifically on Windows and in IDEs like PyCharm and IntelliJ (#387). This problem appears to be isolated to the Git console in these IDEs, as the output is correct in embedded terminals and on the command line.We also explored a complex formatting issue where Darker changes lines adjacent to modified ones, particularly when dealing with trailing closing parentheses of function calls (#388). This behavior stems from limitations in
difflib
's ability to understand Python syntax and accurately determine statement boundaries. While we previously attempted a more sophisticated approach using Black's internals (#221), we encountered fundamental challenges related to AST handling and indentation.In other developments, we identified the need to improve our handling of Git version compatibility in our test suite (#386) and discussed potential enhancements to our documentation regarding Black version compatibility (#381).
Beta Was this translation helpful? Give feedback.
All reactions