summaryrefslogtreecommitdiff
path: root/src/flake8/utils.py
diff options
context:
space:
mode:
authorEric N. Vander Weele <ericvw@gmail.com>2019-08-30 15:17:16 -0400
committerEric N. Vander Weele <ericvw@gmail.com>2019-08-31 00:10:46 -0400
commitaadd09dd8bd91092b22b24b860d4ff2476313b1c (patch)
treeb8007cd8068739a67f84fbd6eb9d52d3916574dd /src/flake8/utils.py
parentb231c10016fa50faf7ea87b2e0530655c2184bf4 (diff)
downloadflake8-aadd09dd8bd91092b22b24b860d4ff2476313b1c.tar.gz
Set configuration file-provided values via ArgumentParser.set_defaults()
When calling `ArgumentParser.parse_args()` with the `namespace` argument, command-line options are just added to the namespace without going through any of the argument parsing and type conversion logic (e.g., the `type` keyword argument of `ArgumentParser.add_argument()`). In other words, it is assumed that a namespace is well-formed from a previous invocation of `ArgumentParser.parse_args()`. The `values` parameter is intended to be values already-provided from configuration files. To take advantage of the logic defined by `ArgumentParser.add_argument()`, utilize `ArgumentParser.set_defaults()` instead.
Diffstat (limited to 'src/flake8/utils.py')
0 files changed, 0 insertions, 0 deletions