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

Remove unused is_error import in Tokenize module #420

Merged

Conversation

ericphanson
Copy link
Collaborator

I was testing ExplicitImports.jl and noticed this unnecessary import:

julia> using JuliaSyntax, ExplicitImports

julia> print_explicit_imports(JuliaSyntax)
Module JuliaSyntax is not relying on any implicit imports.
Module JuliaSyntax.Tokenize is not relying on any implicit imports.

Additionally JuliaSyntax.Tokenize has stale explicit imports for these unused names:
JuliaSyntax
is_error

I left the JuliaSyntax one since I figured it could be annoying if you are working in that module and the name is unexpectedly unavailable. I feel that removing the is_error one improves clarity though, as it makes it easier to see that Tokenize does not add a method for is_error (or even use it).

Copy link

codecov bot commented Feb 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.17%. Comparing base (a6f2d15) to head (832dd41).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #420      +/-   ##
==========================================
+ Coverage   94.61%   96.17%   +1.56%     
==========================================
  Files          14       14              
  Lines        4178     4185       +7     
==========================================
+ Hits         3953     4025      +72     
+ Misses        225      160      -65     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ericphanson
Copy link
Collaborator Author

I think the CI failures are unrelated (since I wouldn't expect the import is needed on some Julia versions and not others), though I don't really understand the failures so I'm not 100% sure.

@c42f c42f merged commit 835a527 into JuliaLang:main Jul 23, 2024
21 of 31 checks passed
@ericphanson ericphanson deleted the eph/rm-unnecessary-explicit-imports branch July 23, 2024 08:24
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.

2 participants