Skip to content

Forbid comments in f and t string #3404

@sobolevn

Description

@sobolevn

This code should raise a violation:

>>> x = f'{ 1 # comment
... }'

Because comments make f string implicilty multiline.
And comments must not be present in strings. This is not right.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions