-
Notifications
You must be signed in to change notification settings - Fork 750
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
fix ambiguous identifiers in lambda bodies inside braces #1123
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alright this fixes the rest of the issues: --- out_main/pandas.log 2022-11-21 14:14:13.115964883 -0500
+++ out_pr/pandas.log 2022-11-21 14:15:44.959967027 -0500
@@ -6752,11 +6752,6 @@
./pandas/tests/frame/indexing/test_delitem.py:53:80: E501 line too long (81 > 79 characters)
./pandas/tests/frame/indexing/test_getitem.py:107:80: E501 line too long (81 > 79 characters)
./pandas/tests/frame/indexing/test_getitem.py:118:20: E741 ambiguous variable name 'l'
-./pandas/tests/frame/indexing/test_getitem.py:118:32: E741 ambiguous variable name 'l'
-./pandas/tests/frame/indexing/test_getitem.py:118:45: E741 ambiguous variable name 'l'
-./pandas/tests/frame/indexing/test_getitem.py:119:20: E741 ambiguous variable name 'l'
-./pandas/tests/frame/indexing/test_getitem.py:119:32: E741 ambiguous variable name 'l'
-./pandas/tests/frame/indexing/test_getitem.py:119:45: E741 ambiguous variable name 'l'
./pandas/tests/frame/indexing/test_getitem.py:145:80: E501 line too long (82 > 79 characters)
./pandas/tests/frame/indexing/test_getitem.py:181:80: E501 line too long (80 > 79 characters)
./pandas/tests/frame/indexing/test_getitem.py:204:80: E501 line too long (86 > 79 characters) |
hmmm although actually that points out another problem, which is there's multiple lambdas it doesn't handle it correctly |
0af9b37
to
798d620
Compare
ok now it's good diff -ur out_main/pandas.log out_pr/pandas.log
--- out_main/pandas.log 2022-11-21 14:14:13.115964883 -0500
+++ out_pr/pandas.log 2022-11-21 14:22:10.443976028 -0500
@@ -6752,11 +6752,7 @@
./pandas/tests/frame/indexing/test_delitem.py:53:80: E501 line too long (81 > 79 characters)
./pandas/tests/frame/indexing/test_getitem.py:107:80: E501 line too long (81 > 79 characters)
./pandas/tests/frame/indexing/test_getitem.py:118:20: E741 ambiguous variable name 'l'
-./pandas/tests/frame/indexing/test_getitem.py:118:32: E741 ambiguous variable name 'l'
-./pandas/tests/frame/indexing/test_getitem.py:118:45: E741 ambiguous variable name 'l'
./pandas/tests/frame/indexing/test_getitem.py:119:20: E741 ambiguous variable name 'l'
-./pandas/tests/frame/indexing/test_getitem.py:119:32: E741 ambiguous variable name 'l'
-./pandas/tests/frame/indexing/test_getitem.py:119:45: E741 ambiguous variable name 'l'
./pandas/tests/frame/indexing/test_getitem.py:145:80: E501 line too long (82 > 79 characters)
./pandas/tests/frame/indexing/test_getitem.py:181:80: E501 line too long (80 > 79 characters)
./pandas/tests/frame/indexing/test_getitem.py:204:80: E501 line too long (86 > 79 characters) |
miketheman
added a commit
to miketheman/warehouse
that referenced
this pull request
Feb 23, 2023
Variable detection in Lambda was fixed in 2.10.0, and now raises (based on the built-in rules) E741 errors, a rule that's been in place since 2016, but a recent bugfix correctly identifies it in `lambda` calls. Refs: https://github.com/PyCQA/pycodestyle/blame/b22b672a1a53f1ef35c4f4689c674d66a24138ed/pycodestyle.py#L1478 Refs: PyCQA/pycodestyle#1123 Signed-off-by: Mike Fiedler <[email protected]>
ewdurbin
pushed a commit
to pypi/warehouse
that referenced
this pull request
Feb 24, 2023
* chore(deps): mass update We're stuck waiting on a dependabot-core release that includes a fix to the version of pip-tools that is used, so perform a manual upgrade. Picks up botocore/boto3 deps that have been excluded from dependabot, so that's nice. Signed-off-by: Mike Fiedler <[email protected]> * lint: rename ambiguous variables Variable detection in Lambda was fixed in 2.10.0, and now raises (based on the built-in rules) E741 errors, a rule that's been in place since 2016, but a recent bugfix correctly identifies it in `lambda` calls. Refs: https://github.com/PyCQA/pycodestyle/blame/b22b672a1a53f1ef35c4f4689c674d66a24138ed/pycodestyle.py#L1478 Refs: PyCQA/pycodestyle#1123 Signed-off-by: Mike Fiedler <[email protected]> * lint: reflow multiline text Picked up by the latest flake8. Signed-off-by: Mike Fiedler <[email protected]> * lint: remove type hint from decorator The decorator wraps a pydantic frozen dataclass, which has had some issues with type hints and the proxy nature from pydantic, so remove the type hint for now. Left a verbose comment in place for the future. Signed-off-by: Mike Fiedler <[email protected]> --------- Signed-off-by: Mike Fiedler <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.