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

[pre-commit.ci] pre-commit autoupdate #1423

Merged
merged 3 commits into from
Feb 28, 2023
Merged

Conversation

pre-commit-ci[bot]
Copy link
Contributor

@pre-commit-ci pre-commit-ci bot commented Feb 27, 2023

pre-commit-ci bot and others added 3 commits February 27, 2023 21:45
updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.249 → v0.0.253](astral-sh/ruff-pre-commit@v0.0.249...v0.0.253)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii
Copy link
Contributor

Personally think at least one of those was a false positive. astral-sh/ruff#3022

@Czaki
Copy link
Contributor

Czaki commented Feb 27, 2023

for me both look like false positives as "normalization" of data is a common pattern, but I do not have any idea for heuristics that could be good here.

@henryiii
Copy link
Contributor

henryiii commented Feb 27, 2023

The second was intended by the PR (even though I don't think it's very helpful), while I don't think the first was.

IMO, I wouldn't expect "with" to create scope, so personally I'd disable this part of the check, but the original check was useful, and it's all or nothing, since it's all the same code. It's only two hits in cibuildwheel, but I'm worried it's more other places. We'll see. It's not that hard to work around, so I'll probably live with it.

@henryiii
Copy link
Contributor

It's not due to the with - reassignments in loops of any sort are actually not allowed. This helps in several common cases (like nested for loops over the same variable), so I think it's fine to use the current workaround.

@henryiii henryiii merged commit c72e27e into main Feb 28, 2023
@henryiii henryiii deleted the pre-commit-ci-update-config branch February 28, 2023 13:44
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

2 participants