March 14-20, 2021 in Darker: Addressing pre-commit integration and issue closures #640
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, our community focused on resolving issues related to pre-commit integration and closing long-standing discussions. We made progress in understanding 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. A community member suggested a fallback mechanism where Darker would default to running against HEAD if the pre-commit variables are not set. This approach aims to improve compatibility with different pre-commit execution contexts.We also addressed some long-standing issues. The problem with Black's inability to parse certain pylint comments at the beginning of files (#63) was closed as it could no longer be reproduced. Additionally, we revisited a suggestion for selecting all file changes since a revision (#64), clarifying Darker's behavior with new files not present in the specified previous revision.
In other developments, we began exploring the creation of a Conda package for Darker (#114), noting that the process would primarily involve work on the Conda repositories side. This initiative aims to broaden Darker's accessibility to users of different package management systems.
Beta Was this translation helpful? Give feedback.
All reactions