-
-
Notifications
You must be signed in to change notification settings - Fork 309
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
python: More fixes for Python 3.12 SyntaxWarning: invalid escape sequence
#3331
Conversation
There are still some valid test failures that seem to complain about single literal integer value That's weird, but related to the regex change |
The test contains variations on ranges the regex should handle. |
At least we now know what CodeQL complained about. |
3c3f25d
to
2444c35
Compare
I make an intentional new black error, to see pre-commit fix the existing black formattting error |
pre-commit.ci run |
1 similar comment
pre-commit.ci run |
2444c35
to
f4dea55
Compare
I think why pre-commit.ci isn't able to push is the same reason that my force-pushes were rejected (saying I need a pull request, whereas I was pushing to my "checkout this pr in codespaces" branch). Is it possible that there are some other older branch protection rules that prevent it. I disabled all the rulesets on my repo in between the tries |
There is now plenty of failure reports in pre-commit.ci:
Hm, now I remember one issue with MegaLinter automatic fixes is that it was working (1 or 2 back) only with the main repo and it would not be able to modify branches in forks, so I was applied only to branches in the main/upstream repo (which was not a problem for me).
Are you saying you are having problems other than pre-committ? But all these are with your branches in fork, not this repo, no?
I disabled all the old rules for this repo when I migrated the release branch rules to a ruleset. Branches says "You haven't protected any of your branches". |
The same happens for my PR and the "unknown error" is not really helpful (no results from online search). What about "autofix_prs: false"? You can always trigger it if you want ("pre-commit.ci run") or even enable for a PR by a comment ("pre-commit.ci autofix"). |
The GitHub Actions by default run on merge with the base branch, not the PR branch. I suppose it would be the same here. |
f4dea55
to
2c082e9
Compare
Can someone else take a quick look at this, it was already ok before I rebased last week. I keep getting warnings on other work, that are already solved in this. |
And I'd be glad if any of my other pending PRs could be checked too, there was more than one that were ready. ;) |
Continuing on the same trend as point 13 of #3316, this solves other SyntaxWarnings of escapes sequences. I noticed them in the output of make, locally.
It is probably not all of them yet, but warnings are not flagged for each instance of errors, it seems one per file (and if it showed up during an import, it won't show up again). I didn't know about these escape sequences and weren't present in the warnings last time I checked.
This is a side quest, but I cherry-picked my commit to make a quick PR.