mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-04 20:26:53 +00:00
Fix bugs found while writing parse_cli_config test
This commit is contained in:
parent
03fd22c230
commit
a8576aff12
3 changed files with 25 additions and 3 deletions
|
|
@ -186,9 +186,11 @@ class MergedConfigParser(object):
|
|||
value = method(self.program_name, option_name)
|
||||
LOG.debug('Option "%s" returned value: %r', option_name, value)
|
||||
|
||||
final_value = self._normalize_value(value)
|
||||
final_value = self._normalize_value(option, value)
|
||||
config_dict[option_name] = final_value
|
||||
|
||||
return config_dict
|
||||
|
||||
def is_configured_by(self, config):
|
||||
"""Check if the specified config parser has an appropriate section."""
|
||||
return config.has_section(self.program_name)
|
||||
|
|
|
|||
|
|
@ -104,7 +104,8 @@ class Option(object):
|
|||
'dest={dest}, type={type}, callback={callback}, help={help},'
|
||||
' callback={callback}, callback_args={callback_args}, '
|
||||
'callback_kwargs={callback_kwargs}, metavar={metavar})'
|
||||
).format(*self.option_args, **self.option_kwargs)
|
||||
).format(self.short_option_name, self.long_option_name,
|
||||
**self.option_kwargs)
|
||||
|
||||
def _make_dest(self, dest):
|
||||
if dest:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue