November 7-20, 2021 in Darker: Addressing stdin input and docstring indentation challenges #666
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 discussions on enhancing Darker's compatibility with developer tools and addressing a peculiar indentation issue. We explored the possibility of supporting stdin input to improve integration with tools like ALE (#239). The community discussed various approaches, including options like
--stdin-filepath
, similar to other formatting tools. This feature could potentially expand Darker's usability across different development environments.We also uncovered and investigated an interesting bug related to docstring indentation (#240). The issue causes Darker to repeatedly increase indentation on subsequent calls, specifically within docstrings. Our investigation revealed that this behavior stems from the interaction between Black's indentation rules and Darker's approach to splitting changes by empty lines. While AST verification protects against similar issues in regular code, we recognized the need for a specific solution for multi-line docstrings. We discussed potential fixes, including using AST parsing to detect indentation changes in docstrings. This issue highlights the complexities of maintaining consistent formatting while preserving unmodified sections of code.
Beta Was this translation helpful? Give feedback.
All reactions