-
Notifications
You must be signed in to change notification settings - Fork 203
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 code for determining the PYTHONPATH module entries #4686
Conversation
which then also prints warnings, which i wanted to avoid |
Oh I see. I'd avoid to duplicate the logic though, see the new commit(s) |
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.
lgtm
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.
actually, while attempting to solve the merge conflict, I think we should also add the new warn_exists keyword to append_paths as well, to make them similar.
The check whether the path(s) have already been added is redundant as that is done in the module_generator class. The whole code with all the checks is superflous if there are no python paths to add. To avoid excessive indentation return early with an empty list in that case and same for Python installations for consistency.
…dule environment variable
Good point, rebased and implemented |
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.
lgtm
The check whether the path(s) have already been added is redundant as that is done in the module_generator class.
The whole code with all the checks is superflous if there are no python paths to add.
To avoid excessive indentation return early with an empty list in that case and same for Python installations for consistency.
prepend_paths
can return an empty string when everything is filtered. As we return a list here (we might be better of returning a string instead) return an empty list to avoid empty lines being written if'\n'
was used. -> TODO for laterBest to view with whitespace changes ignored