@@ -246,8 +246,8 @@ def split_commas(value: str) -> list[str]:
246246
247247_TomlValue = Union [str , int , float , bool , datetime .datetime , datetime .date , datetime .time , list ['_TomlValue' ], dict [str , '_TomlValue' ]]
248248_TomlDict = dict [str , _TomlValue ]
249- _TomlDictMypy = dict [ str , _TomlDict ]
250- _ParserHelper = _TomlDictMypy | configparser .RawConfigParser
249+ _TomlDictDict = dict [ str , _TomlDict ]
250+ _ParserHelper = _TomlDictDict | configparser .RawConfigParser
251251
252252def _parse_individual_file (
253253 config_file : str , stderr : TextIO | None = None
@@ -278,7 +278,7 @@ def _parse_individual_file(
278278 "https://toml.io/en/v1.0.0#table"
279279 )
280280 # Ignore other tools' sections, filtering down to just ours:
281- toml_data_mypy : _TomlDictMypy = {"mypy" : toml_data_tool ["mypy" ]}
281+ toml_data_mypy : _TomlDictDict = {"mypy" : toml_data_tool ["mypy" ]}
282282 parser = destructure_overrides (toml_data_mypy )
283283 config_types = toml_config_types
284284 else :
@@ -426,7 +426,7 @@ def is_toml(filename: str) -> bool:
426426 """Detect if a file "is toml", in the sense that it's named *.toml (case-insensitive)."""
427427 return filename .lower ().endswith (".toml" )
428428
429- def destructure_overrides (toml_data : _TomlDictMypy ) -> _ParserHelper :
429+ def destructure_overrides (toml_data : _TomlDictDict ) -> _ParserHelper :
430430 """Take the new [[tool.mypy.overrides]] section array in the pyproject.toml file,
431431 and convert it back to a flatter structure that the existing config_parser can handle.
432432
0 commit comments