Skip to content

Formatter incorrectly strips parentheses around named expressions in type annotation positions #23864

@MichaReiser

Description

@MichaReiser

Summary

D: (E := 4) = (F := 5)

Gets formatted to

D: E := 4 = (F := 5)  # error: [invalid-type-form]

Which is a syntax error

Version

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingformatterRelated to the formatter

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions