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

Added support for noqa comments in RemoveUnusedImports #43

Merged
merged 3 commits into from
Sep 26, 2023

Conversation

andrecsilva
Copy link
Contributor

Overview

RemoveUnusedImports will now respect #noqa comments

@codecov-commenter
Copy link

codecov-commenter commented Sep 22, 2023

Codecov Report

Merging #43 (c180a59) into main (62ec384) will decrease coverage by 0.05%.
The diff coverage is 94.73%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #43      +/-   ##
==========================================
- Coverage   95.82%   95.78%   -0.05%     
==========================================
  Files          38       38              
  Lines        1413     1446      +33     
==========================================
+ Hits         1354     1385      +31     
- Misses         59       61       +2     
Files Coverage Δ
src/codemodder/codemods/remove_unused_imports.py 92.42% <94.73%> (+1.51%) ⬆️

Copy link
Member

@drdavella drdavella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. The only thing is that I think we should also honor # pylint: disable=unused-import, which shouldn't be hard to add.

src/codemodder/codemods/remove_unused_imports.py Outdated Show resolved Hide resolved
Copy link
Member

@drdavella drdavella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice 👍

@andrecsilva andrecsilva merged commit 4c8c37d into main Sep 26, 2023
6 checks passed
@andrecsilva andrecsilva deleted the unused_imports_noqa branch September 26, 2023 11:47
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.

4 participants