Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning for misplaced iteration variables #149

Open
fredokun opened this issue Jan 30, 2021 · 0 comments
Open

warning for misplaced iteration variables #149

fredokun opened this issue Jan 30, 2021 · 0 comments

Comments

@fredokun
Copy link
Collaborator

fredokun commented Jan 30, 2021

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:
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant