diff options
author | Florian Rathgeber <florian.rathgeber@gmail.com> | 2014-03-23 13:18:57 +0000 |
---|---|---|
committer | Florian Rathgeber <florian.rathgeber@gmail.com> | 2014-03-23 13:18:57 +0000 |
commit | 022aa8a89e023731b5b71dca8779e0d14ddeb13a (patch) | |
tree | 089d181c6b504d3f84546527f67bcf00a30781ce | |
parent | dd06247127fd415c424177a35ec89b46423b460f (diff) | |
download | pep8-022aa8a89e023731b5b71dca8779e0d14ddeb13a.tar.gz |
StyleGuide accepts optional keyword argument arglist
If given, arglist is passed on to process_options. This allows
specifying a non-empty argument list when using pep8 as a library
where command line arguments are not parsed.
-rwxr-xr-x | pep8.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1571,11 +1571,12 @@ class StyleGuide(object): def __init__(self, *args, **kwargs): # build options from the command line self.checker_class = kwargs.pop('checker_class', Checker) + arglist = kwargs.pop('arglist', None) parse_argv = kwargs.pop('parse_argv', False) config_file = kwargs.pop('config_file', None) parser = kwargs.pop('parser', None) options, self.paths = process_options( - parse_argv=parse_argv, config_file=config_file, parser=parser) + arglist, parse_argv, config_file, parser) if args or kwargs: # build options from dict options_dict = dict(*args, **kwargs) |