mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-29 18:46:52 +00:00
Use option_normalizer
This commit is contained in:
parent
f67552d09a
commit
28138a2135
1 changed files with 2 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ import sys
|
|||
import setuptools
|
||||
|
||||
from flake8.engine import get_parser, get_style_guide
|
||||
from flake8.util import is_flag, flag_on
|
||||
from flake8.util import is_flag, flag_on, option_normalizer
|
||||
|
||||
if sys.platform.startswith('win'):
|
||||
DEFAULT_CONFIG = os.path.expanduser(r'~\.flake8')
|
||||
|
|
@ -104,8 +104,7 @@ class Flake8Command(setuptools.Command):
|
|||
value = getattr(self, option_name)
|
||||
if value is None:
|
||||
continue
|
||||
if is_flag(value):
|
||||
value = flag_on(value)
|
||||
value = option_normalizer(value)
|
||||
# Check if there's any values that need to be fixed.
|
||||
if option_name == "include" and isinstance(value, str):
|
||||
value = re.findall('[^,;\s]+', value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue