@@ -82,11 +82,11 @@ def _flake8_normalize(value, *args, **kwargs):
82
82
raise TypeError (f"Unexpected keyword args: { kwargs } " )
83
83
84
84
ret = value # type: Union[str, List[str]]
85
- if comma_separated_list and isinstance (ret , utils . string_types ):
85
+ if comma_separated_list and isinstance (ret , str ):
86
86
ret = utils .parse_comma_separated_list (value )
87
87
88
88
if normalize_paths :
89
- if isinstance (ret , utils . string_types ):
89
+ if isinstance (ret , str ):
90
90
ret = utils .normalize_path (ret , * args )
91
91
else :
92
92
ret = utils .normalize_paths (ret , * args )
@@ -212,7 +212,7 @@ def __init__(
212
212
nargs = 0
213
213
214
214
# optparse -> argparse for `type`
215
- if isinstance (type , utils . string_types ):
215
+ if isinstance (type , str ):
216
216
LOG .warning (
217
217
"option %s: please update from optparse string `type=` to "
218
218
"argparse callable `type=` -- this will be an error in the "
@@ -299,9 +299,7 @@ def __repr__(self): # type: () -> str # noqa: D105
299
299
def normalize (self , value , * normalize_args ):
300
300
# type: (Any, *str) -> Any
301
301
"""Normalize the value based on the option configuration."""
302
- if self .comma_separated_list and isinstance (
303
- value , utils .string_types
304
- ):
302
+ if self .comma_separated_list and isinstance (value , str ):
305
303
value = utils .parse_comma_separated_list (value )
306
304
307
305
if self .normalize_paths :
0 commit comments