Skip to content

pre-3.12 python_versions do not complain about f-strings syntax, but they should #19916

@wyattscarpenter

Description

@wyattscarpenter

Bug Report

pre-3.12 python_versions do not complain about f-strings syntax, but they should, as those pythons could not parse those f-strings.

To Reproduce

Gist URL: https://gist.github.com/mypy-play/4606f2bda8d271532cac71318aa3eb84
Playground URL: https://mypy-play.net/?mypy=latest&python=3.9&flags=strict&gist=4606f2bda8d271532cac71318aa3eb84

ignored_codes = ["1","2"]

f'Error {', '.join(ignored_codes)}'

Expected Behavior

[Syntax] error

Actual Behavior

Success!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions