-
Notifications
You must be signed in to change notification settings - Fork 58
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
Merge user's input config with pyta's default options #914
Conversation
… with default settings
Pull Request Test Coverage Report for Build 5315534521
💛 - Coveralls |
b99963a
to
bce18df
Compare
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.
@sushimon good work! I left one comment about the logic. But also I realized that to preserve backwards compatibility it would be good to provide an option to not use the PythonTA default config. That could be an optional argument to _check
(and, transitively, check_all
/check_errors
) like load_default_config
(with default value True
).
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.
@sushimon good job! I left another review but I think you're pretty close.
In addition to the inline comments, please make sure to add some tests for load_default_config=False
to the test cases you added.
Motivation and Context
The current configuration behaviour will completely overwrite all of
pyta
's default options if the user provides their own config options. As a result, the user must provide a lengthy config file containing all ofpyta
's default options, along with any overridden ones. These changes allows the user to provide a very small config file containing only the options they want overridden.Your Changes
Description:
pyta
's configuration behaviour to always load the default.pylintrc
file first, before applying any user-specified configuration options, if provided.Type of change (select all that apply):
Testing
python_ta.check_all
calls with an inputted configdict
and a new.pylintrc
file and verified the specified configuration options were correctly applied to the linter.Questions and Comments (if applicable)
Checklist