Skip to content

warning for misplaced iteration variables #149

Open
@fredokun

Description

@fredokun

This is often encountered:

c : str
s : str = "test"
for c in s:
  ...

The iteration variable c should be just above the for, a warning should be produced.

s : str = "test"
c : str   # correct place
for c in s:
  ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions