Skip to content

Commit 86edd12

Browse files
use Union syntax instead of | for python 3.9 support
also, trivial copyediting
1 parent f7171c0 commit 86edd12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/config_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def split_commas(value: str) -> list[str]:
257257
]
258258
_TomlDict = dict[str, _TomlValue]
259259
_TomlDictDict = dict[str, _TomlDict]
260-
_ParserHelper = _TomlDictDict | configparser.RawConfigParser
260+
_ParserHelper = Union[_TomlDictDict, configparser.RawConfigParser]
261261

262262

263263
def _parse_individual_file(
@@ -274,7 +274,7 @@ def _parse_individual_file(
274274
toml_data: _TomlDict = tomllib.load(f)
275275
# Filter down to just mypy relevant toml keys
276276
toml_data_tool = toml_data.get("tool", {})
277-
if not (isinstance(toml_data_tool, dict)) or "mypy" not in toml_data_tool:
277+
if not isinstance(toml_data_tool, dict) or "mypy" not in toml_data_tool:
278278
# Here we might be dealing with a toml that just doesn't talk about mypy,
279279
# in which case we currently just ignore it. (Maybe we should really warn?)
280280
return None

0 commit comments

Comments
 (0)