-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
pep8 strict formating #2605
pep8 strict formating #2605
Conversation
2d3ed15
to
cc7a4dc
Compare
Please resolve the conflicts and rebase on master |
cc7a4dc
to
4345abd
Compare
done |
Also this is rather too much code for a human being to review. It means I cant be sure you didnt sneak in some malicious code in there (Not that I think you would just that I cant review it to check). SO maybe instead split it up into one PR that adds the changes to check.py and the strict.tmol file. Then let me know what command I need to run to generate the automatic changes. I will run and commit them myself. Then if there are some manual changes left in this PR I can review and merge them without all the noise form the automatic changes. |
Oh, understandable. I will make this light PR. Do you prefer discute of how decompose and reproduct it here, on the light PR or on mobileread? |
What I usually do in such a case is include in the commit message, something like:
Given a per-commit reproducer command it is quite easy with only light bisection to verify the results are as expected. |
The Ruff code/rules performed are include in each commit. Nota that it will not allway fully match with the reference commit because I slightly twearked the result to better match the calibre format, or even manualy add somme edit to extend the formating because Ruff don't catch them. Some commit have none comment because is was perform entierly manualy. The "various whitespace" has a section 'partial' wich is various formating that have apply very selectively, because a full auto-fix will realy break the calibre formating in the wrong way. |
Then those won't be doable via |
No there are not doable by It's will be a bit a tidious to do to separate the "machine auto-fix" from "manual edit", but if that can facilite the review, I start that tomorow. |
On Mon, Jan 13, 2025 at 11:41:41AM -0800, un_pogaz wrote:
It's will be a bit a tidious to do to separate the "machine auto-fix" from "manual edit", but if that can facilite the review, I start that tomorow.
Yes, please do, thanks.
|
4345abd
to
53bcefd
Compare
Revert commit db0f748 This allow a better checking of each commit's because `ruff check` only return the error curently fixed rather that included all that will be fixed in later commit's
ruff 'W191'
regex: \s*#\s*noqa\n
ruff 'E501' --add-noqa
ruff --add-noqa
ruff 'Q'
ruff 'UP'
ruff 'UP031'
ruff 'RUF055'
ruff 'RUF055'
ruff 'RUF039'
ruff 'RUF039'
ruff 'RUF047'
ruff 'E302,E303,E304,E305,W391'
ruff 'E111,E112,E113,E117'
ruff 'E114,E115,E116,E261,E262,E265'
ruff 'E114,E115,E116,E261,E262,E265'
ruff 'PIE'
ruff 'PIE'
ruff 'PIE794'
ruff 'E201,E202,E211,E251,E275'
!partial 'E203,E222,E241,E271,E272'
ruff 'RET501'
ruff 'ISC'
53bcefd
to
d3c6e5a
Compare
Okay, here a new version of the pull request, following the idea of separate the change into several commits depending of the type of change. The type of commit are:
Inside the body of the commit, there is the rule code targeted by Ruff, plus aditional command if so. Note: "add/remove blank-line" commit was marqued 'extra-edit' because is a complet mess of intricate auto-fix, manual and extra-edit, and separet them will be a even more horrible mess to review. For a programmatic review of this commit, I suggest to compare the files before/after line by line, minus empty lines, which should theoretically result at the same array since this commit only edit empty lines. |
d3c6e5a
to
f20aa37
Compare
Following the discussion on mobileread, here the pull request for a global and strict pep8 formating.
If you have any concern on a commit, I can easly edit them.
(forced push for fix some test fail)