Fix PyTA CLI output format behaviour - #1367
Conversation
Coverage Report for CI Build 29631888104Coverage decreased (-0.1%) to 90.835%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
| CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"]) | ||
|
|
||
|
|
||
| def _load_config_as_dict(config_path: str) -> dict[str, str]: |
There was a problem hiding this comment.
This approach is okay but ends up duplicating some logic within the python_ta.config module. I'm going to suggest a more generalizable approach.
Let's add (to the check_all, check_errors, and _check functions) a new pylint_args optional argument, which is a list of command-line arguments that are passed in. These can be passed all the way down to the load_config function; Pylint's internal _config_initialization function expects this list and should use it to override any configuration options.
This is more generalizable in the sense that this should allow arbitrary command-line arguments to be passed to PythonTA's CLI, and then forwarded to pylint. (Future work!)
david-yz-liu
left a comment
There was a problem hiding this comment.
Nice work, @rachelzUT!
Proposed Changes
Fixed the PythonTA CLI behaviour to prioritze the output format specified by the
--output-formatflag over theconfigfile'soutput-formatsetting.Previously, any output format specified in the
--config filewould override the output format specified in the--output-formatoption. This PR reverses that behaviour....
Screenshots of your changes (if applicable)
Type of Change
Checklist
Before opening your pull request:
After opening your pull request:
Questions and Comments