-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Options for multiple paths #997
Conversation
for pathspec in pathspecs: | ||
if pathspec not in parse: | ||
parse[pathspec] = {} | ||
cls._update_options(parse[pathspec], options) |
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.
Perhaps something like:
parse[pathspec] = merged_options(parse.get(pathspec, {}), options)
would be nicer?
|
||
|
||
@classmethod | ||
def _update_options(cls, old_opts, new_opts): |
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.
As a last comment, maybe this should be called _merge_options
as it now creates a new dictionary instead of updating an existing one?
Looks great, thanks for the contribution and thanks for all the new unit tests! You have already addressed most of my comments and I am ready to merge once you address my latest suggestion (renaming |
Will do. Thank you for your guidance :-) |
Rename should be done now and I added one more test to reflect our decision on precedence in merges. I had to replace the commits with new author information which includes my private mail, so do not be confused that everything is new. |
All looks good so I am now merging. Thanks once again for contributing! |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This implements issue #995. I have not yet tested the PR with python 2.
I'm very interested in your thoughts concerning coding style, since I have tried to follow your lead.