Skip to content

Commit c086c86

Browse files
committed
Fix naming and typing
1 parent ddd48b4 commit c086c86

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

mypy/config_parser.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def match_files(paths: List[str]) -> List[str]:
7979
# sufficient, and we don't have to do anything here. This table
8080
# exists to specify types for values initialized to None or container
8181
# types.
82-
ini_config_types = {
82+
ini_type_converters = {
8383
'python_version': parse_version,
8484
'strict_optional_whitelist': lambda s: s.split(),
8585
'custom_typing_module': str,
@@ -100,7 +100,7 @@ def match_files(paths: List[str]) -> List[str]:
100100
} # type: Final
101101

102102

103-
toml_type_conversors = {
103+
toml_type_converters = {
104104
'python_version': parse_version,
105105
'custom_typeshed_dir': expand_path,
106106
'mypy_path': lambda l: [expand_path(p) for p in l],
@@ -172,8 +172,8 @@ def parse_toml_config_file(options: Options, filename: str,
172172
(filename, key),
173173
file=stderr)
174174
else:
175-
if key in toml_type_conversors:
176-
value = toml_type_conversors[key](value) # type: ignore
175+
if key in toml_type_converters:
176+
value = toml_type_converters[key](value) # type: ignore
177177
setattr(options, key, value)
178178

179179
# Read the per-module override sub-tables.
@@ -196,8 +196,8 @@ def parse_toml_config_file(options: Options, filename: str,
196196
(key, subkey), file=stderr)
197197
continue
198198

199-
if subkey in toml_type_conversors:
200-
subvalue = toml_type_conversors[subkey](subvalue) # type: ignore
199+
if subkey in toml_type_converters:
200+
subvalue = toml_type_converters[subkey](subvalue) # type: ignore
201201
values[subkey] = subvalue
202202

203203
options.per_module_options[glob] = values
@@ -276,8 +276,8 @@ def parse_ini_section(prefix: str, template: Options,
276276
for key in section:
277277
invert = False
278278
options_key = key
279-
if key in ini_config_types:
280-
ct = ini_config_types[key]
279+
if key in ini_type_converters:
280+
ct = ini_type_converters[key]
281281
else:
282282
dv = None
283283
# We have to keep new_semantic_analyzer in Options

mypy/defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
USER_CONFIG_FILES = ['~/.config/mypy/config', '~/.mypy.ini', ] # type: Final
1212
if os.environ.get('XDG_CONFIG_HOME'):
1313
USER_CONFIG_FILES.insert(0, os.path.join(os.environ['XDG_CONFIG_HOME'], 'mypy/config'))
14-
TOML_CONFIG_FILE = 'pyproject.toml'
14+
TOML_CONFIG_FILE = 'pyproject.toml' # type: Final
1515
CONFIG_FILES = (
1616
[INI_CONFIG_FILE, TOML_CONFIG_FILE]
1717
+ SHARED_CONFIG_FILES

0 commit comments

Comments
 (0)