Single line to multi line change by black causes different type hint scope #1640
Labels
F: comments
The syntactic kind. Not in the language grammar, always on our minds. Best bugs.
T: bug
Something isn't working
Describe the bug A clear and concise description of what the bug is.
When reformatting a single line into a multi line statement the scope of type hints changes.
This is with the default
--safe
To Reproduce Steps to reproduce the behavior:
Run Black on it with these arguments '....'
Without arguments
See error
Expected behavior A clear and concise description of what you expected to happen.
I would expect black to take the scope of type hints in consideration and either:
Environment (please complete the following information):
Linux/Python 3.8.5
Does this bug also happen on master? To answer this, you have two options:
Yes
Additional context Add any other context about the problem here.
Current behaviour:
One possible solution (a bit ugly, but keeps the same scope)
The text was updated successfully, but these errors were encountered: