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

delete some dead code #6129

Merged
merged 6 commits into from
Feb 24, 2019
Merged

delete some dead code #6129

merged 6 commits into from
Feb 24, 2019

Conversation

asottile
Copy link
Contributor

@asottile asottile commented Jan 12, 2019

dead code detected via dead

(noticed this issue while doing this -- worked around it with grep)

here's the summary of the removed things:

  • hidden: last reference removed in 8447f39
  • _copy_dist_from_dir: introduced in 4c405a0 but not referenced
  • has_requirements: last reference removed in 893f0b0
  • read_text_file: last reference removed in 52d87f2
  • remove_auth_from_url: last reference removed in 78371cc planned to be used in a future PR
  • (several progress bar types): introduced in 0552ffe but never referenced

The eventual "clean" command I reached was:

dead --exclude '^docs/'  | grep -v '/_vendor/' | grep -Ev '^(news|InstalledCSVRow|unregister|pretty_eta|download_speed|MaxLevelFilter|BetterRotatingFileHandler|ColorizedStreamHandler|deprecated|ReqFileLines|RequirementInfo|CheckResult|PackageSet|CandidateSortingKey|SecureOrigin|Kind|format_option_strings|format_heading|format_usage|format_description|format_epilog) '

most of the exclusions are type aliases (asottile/dead#5 not recognizing PEP 484 type comments)

@asottile
Copy link
Contributor Author

(sorry for the random ping, noticed this hasn't gotten any attention in 7 days) -- @pradyunsg does this look ok?

@pradyunsg pradyunsg self-assigned this Jan 19, 2019
@pradyunsg pradyunsg self-requested a review January 19, 2019 18:30
@pradyunsg
Copy link
Member

pradyunsg commented Jan 19, 2019

Sorry for the delay in responding -- I'll get to this post #6106. :)

@asottile
Copy link
Contributor Author

Sounds good! good luck with the new release 🎉

@asottile
Copy link
Contributor Author

asottile commented Feb 2, 2019

@pradyunsg ping :D

@pradyunsg
Copy link
Member

Heyo! We're not at 19.0.2 yet -- I'll get to this once that's out the door.

@asottile
Copy link
Contributor Author

@pradyunsg 👋 <3

@cjerdonek
Copy link
Member

cjerdonek commented Feb 20, 2019

FYI, I think @zooba is using the remove auth method in his keyring PR, so if so it would be good to keep that in to prevent churn and make it easier to track where the code originally came from.

(Edit: the PR number is #5952, and I confirmed it is being used there.)

@pradyunsg
Copy link
Member

Thanks @cjerdonek!

That means all but that method should probably get cleaned up. :3

introduced in 0552ffe but never referenced
last reference removed in 52d87f2
last reference removed in 893f0b0
introduced in 4c405a0 but not referenced
last reference removed in 8447f39
@asottile
Copy link
Contributor Author

I've rebased, leaving that one commit out

@pradyunsg pradyunsg merged commit d4217f0 into pypa:master Feb 24, 2019
@pradyunsg
Copy link
Member

pradyunsg commented Feb 24, 2019

Thanks @asottile! (for this PR and also for writing and open sourcing some really cool tools) :D

@asottile asottile deleted the dead branch February 24, 2019 16:58
@asottile
Copy link
Contributor Author

No problem! 🎉

@lock
Copy link

lock bot commented May 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants