You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
% cat frimp.py
from a import (
b as c, # comment that is long enough that this import doesn't fit in one line (parens)
)
% isort --diff frimp.py --profile=black
--- /Users/jelle/py/tmp/frimp.py:before 2023-07-09 09:06:19.191799
+++ /Users/jelle/py/tmp/frimp.py:after 2023-07-09 09:08:40.508309
@@ -1,3 +1,3 @@
from a import (
- b as c, # comment that is long enough that this import doesn't fit in one line (parens)
+ b as c,) # comment that is long enough that this import doesn't fit in one line (parens
)
It incorrectly moves the parenthesis at the end of the comment into the code.
Hi! I added a small fix for this issue here: #2184
It has a failing check for the line function cyclomatic complexity, but I don't think that it's the result of this change, so I would suggest simplifying the function in a separate PR :)
It incorrectly moves the parenthesis at the end of the comment into the code.
Reproduced on isort 5.12.0. Came up in PyCQA/flake8-pyi#411.
The text was updated successfully, but these errors were encountered: