February 21 - March 13, 2021 in Darker: Addressing Pre-commit Integration and Line Ending Challenges #639
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 period saw our community focusing on refining Darker's integration with pre-commit hooks and addressing cross-platform compatibility issues. We made progress in understanding and resolving the complexities surrounding pre-commit hook behavior and environment variables.
A significant discussion emerged around an error users encountered when using Darker with pre-commit hooks (#113). The issue, related to the
PRE_COMMIT_FROM_REF
andPRE_COMMIT_TO_REF
environment variables, highlighted the differences between commit and push hooks in pre-commit. We explored various solutions, including making the behavior conditional based on the presence of these variables. This led to a deeper examination of how Darker should interact with pre-commit in different scenarios, balancing user expectations with explicit configuration options.We also addressed a critical cross-platform compatibility issue regarding line endings (#115). The community recognized that Darker's modification of line endings from
\r\n
to\n
on Windows systems was causing false positives in git diffs. We began exploring solutions inspired by Black's approach of detecting and preserving the original line endings. This improvement will enhance Darker's usability across different operating systems and prevent unnecessary noise in version control.Additionally, we continued discussions on improving Darker's error handling, particularly when dealing with non-existent paths on the command line (#102).
Beta Was this translation helpful? Give feedback.
All reactions