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

Flake8 updates #13405

Merged
merged 6 commits into from Aug 14, 2022
Merged

Flake8 updates #13405

merged 6 commits into from Aug 14, 2022

Conversation

cdce8p
Copy link
Contributor

@cdce8p cdce8p commented Aug 13, 2022

Description

Second attempt to update the Flake8 plugins (after #13368). This time without update Flake8 itself since it's blocked by a dependency conflict.

Changes

B023: Functions defined inside a loop must not use variables redefined in the loop,
because late-binding closures are a classic gotcha.

./mypyc/irbuild/ll_builder.py:342:52: B023 Function definition does not bind loop variable 'class_ir'.
./mypyc/irbuild/ll_builder.py:344:75: B023 Function definition does not bind loop variable 'ret'.
./mypyc/irbuild/ll_builder.py:375:66: B023 Function definition does not bind loop variable 'c'.
./mypyc/irbuild/ll_builder.py:377:75: B023 Function definition does not bind loop variable 'ret'.
./mypyc/irbuild/builder.py:1257:24: B023 Function definition does not bind loop variable 'arg'.
./mypyc/irbuild/builder.py:1260:32: B023 Function definition does not bind loop variable 'arg'.
./mypyc/irbuild/builder.py:1261:43: B023 Function definition does not bind loop variable 'arg'.
./mypyc/irbuild/builder.py:1266:51: B023 Function definition does not bind loop variable 'arg'.
./mypyc/irbuild/builder.py:1267:55: B023 Function definition does not bind loop variable 'target'.
./mypyc/irbuild/builder.py:1268:51: B023 Function definition does not bind loop variable 'target'.
./mypyc/irbuild/builder.py:1270:28: B023 Function definition does not bind loop variable 'arg'.
./mypyc/irbuild/builder.py:1271:74: B023 Function definition does not bind loop variable 'target'.
./mypyc/irbuild/builder.py:1273:80: B023 Function definition does not bind loop variable 'arg'.
./mypy/checker.py:5249:34: B023 Function definition does not bind loop variable 'member_name'.
./mypy/checker.py:5251:37: B023 Function definition does not bind loop variable 'parent_expr'.
./mypy/checker.py:5263:32: B023 Function definition does not bind loop variable 'member_type'.
./mypy/checker.py:5282:36: B023 Function definition does not bind loop variable 'str_literals'.
./mypy/checker.py:5283:83: B023 Function definition does not bind loop variable 'str_literals'.
./mypy/checker.py:5296:40: B023 Function definition does not bind loop variable 'int_literals'.
./mypy/checker.py:5297:87: B023 Function definition does not bind loop variable 'int_literals'.
./mypy/test/testmerge.py:235:82: B023 Function definition does not bind loop variable 'type_map'.
./mypy/test/helpers.py:427:50: B023 Function definition does not bind loop variable 'path'.

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

@AlexWaygood
Copy link
Member

AlexWaygood commented Aug 13, 2022

  • Update and pin flake8-pyi to 22.8.1

I think we could actually just remove flake8-pyi as a dependency. The settings in the setup.cfg file mean that flake8 doesn't actually run on any of the directories that have .pyi files in them.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions
Copy link

github-actions bot commented Aug 13, 2022

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@cdce8p
Copy link
Contributor Author

cdce8p commented Aug 13, 2022

/CC: @hauntsaninja

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Thanks!

@hauntsaninja hauntsaninja merged commit 8020f78 into python:master Aug 14, 2022
17 checks passed
@cdce8p cdce8p deleted the flake8-updates branch Aug 14, 2022
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

Successfully merging this pull request may close these issues.

None yet

3 participants