Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply the bracket fix from issue 471 only for use_parentheses=True #2184

Merged
merged 2 commits into from
Dec 13, 2023

Conversation

bp72
Copy link
Contributor

@bp72 bp72 commented Oct 17, 2023

Closes #2154

  1. Moved the fix for Issue 471 under the use_parentheses=True condition as it fixes the situation where we added a closing bracket after the comment at line 131.
  2. Added tests for the issue isort introduces SyntaxError with multiline "from a import b as c" plus a comment ending in a parenthesis #2154
  3. Renamed _comment to noqa_comment

@staticdev
Copy link
Collaborator

@bp72 LGTM, do you mind rebasing to current code so we can see checks/pipelines run?

Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Merging #2184 (ee8d87f) into main (9255bca) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2184   +/-   ##
=======================================
  Coverage   99.15%   99.15%           
=======================================
  Files          39       39           
  Lines        3090     3091    +1     
  Branches      748      748           
=======================================
+ Hits         3064     3065    +1     
  Misses         15       15           
  Partials       11       11           

@bp72 bp72 changed the title ISSUE-2154: applying the bracket fix from issue 471 only for use_parentheses=True Apply the bracket fix from issue 471 only for use_parentheses=True Dec 12, 2023
@bp72
Copy link
Contributor Author

bp72 commented Dec 12, 2023

One test has failed, I'm not sure yet why, hmm.

@bp72
Copy link
Contributor Author

bp72 commented Dec 12, 2023

I added a fix for the error that was caught by hypothesis, but now the cyclomatic complexity check is failing :)

@staticdev
Copy link
Collaborator

@bp72 we can deal with complexity in a new pr if you want. LGTM.

@staticdev staticdev merged commit c36e43c into PyCQA:main Dec 13, 2023
20 of 21 checks passed
@bp72
Copy link
Contributor Author

bp72 commented Dec 13, 2023

@staticdev thank you for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

isort introduces SyntaxError with multiline "from a import b as c" plus a comment ending in a parenthesis
2 participants