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

Fix RunContext modifies passed in options object #210

Merged
merged 2 commits into from
Jan 10, 2022
Merged

Fix RunContext modifies passed in options object #210

merged 2 commits into from
Jan 10, 2022

Conversation

villainy
Copy link
Contributor

@villainy villainy commented Jan 7, 2022

Currently the RunContext constructor assigns attributes of the passed in argparse.Namespace to itself directly. As a result, when RunContext.update_params makes changes, those also persist in the argparse.Namespace. In particular this was seen breaking modeline support in #209 where an ignore is added via modeline for one file and then persists in all subsequent files.

This changes the RunContext constructor to update the object-local containers instead of assigning directly.

@klen klen merged commit 7fcb6d4 into klen:develop Jan 10, 2022
@klen
Copy link
Owner

klen commented Jan 10, 2022

@villainy Great! Thank you!

@villainy villainy deleted the deref_options branch January 10, 2022 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants