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

Simplify FrozenRequirement._init_args_from_dist() #5837

Merged
merged 8 commits into from
Oct 8, 2018

Conversation

cjerdonek
Copy link
Member

This PR simplifies FrozenRequirement. _init_args_from_dist() by using guard clauses when it makes sense, and eliminating temporary variables that aren't needed. This lets us significantly reduce the amount of indentation and if-else branching.

The PR is broken up into a number of commits, each one making a single, simple refactoring change.

@cjerdonek cjerdonek added type: refactor Refactoring code C: freeze 'pip freeze' related skip news Does not need a NEWS file entry (eg: trivial changes) labels Oct 1, 2018
@cjerdonek cjerdonek added this to the Internal Cleansing milestone Oct 1, 2018
@cjerdonek
Copy link
Member Author

PS - this is the last refactoring change prior to submitting a PR to address issue #5031.

@cjerdonek
Copy link
Member Author

Rebased with the 19.0 / deprecation tweak.

@cjerdonek cjerdonek merged commit 33a6716 into pypa:master Oct 8, 2018
@cjerdonek cjerdonek deleted the simplify-init-args-from-dist branch October 8, 2018 20:33
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 24, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 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 C: freeze 'pip freeze' related skip news Does not need a NEWS file entry (eg: trivial changes) type: refactor Refactoring code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants