-
Notifications
You must be signed in to change notification settings - Fork 3k
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 the module-level get_src_requirement(). #5881
Remove the module-level get_src_requirement(). #5881
Conversation
53c21ec
to
c976f2c
Compare
This PR removes the module-level There are a number of reasons for this:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the control flow changes here - they make things easier to follow and more readable.
@@ -164,27 +164,33 @@ def __init__(self, name, req, editable, comments=()): | |||
self.comments = comments | |||
|
|||
@classmethod | |||
def _init_args_from_dist(cls, dist, dependency_links): | |||
def get_requirement_info(cls, dist, dependency_links): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this needs to be a classmethod
since it doesn't actually use cls. It can probably be a module level function.
2a8311e
to
46ffb13
Compare
@pradyunsg Good observation -- thanks! I've made that change. When making that change, I noticed an additional simplification that can be made. Not only the Does it still look okay to you now? Thanks again. |
Thanks, @pradyunsg and @xavfernandez! |
Post merge approval from me. :) |
This is my last preparatory refactoring before posting a PR for issue #5031.