Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions mypy/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,11 @@ def parse_mypy_comments(
# method is to create a config parser.
parser = configparser.RawConfigParser()
options, parse_errors = mypy_comments_to_config_map(line, template)

if "python_version" in options:
errors.append((lineno, "python_version not supported in inline configuration"))
del options["python_version"]

parser["dummy"] = options
errors.extend((lineno, x) for x in parse_errors)

Expand Down
Loading