Make make lint a no-op on a fresh checkout - #45
Open
zlexdev wants to merge 1 commit into
Open
Conversation
`ruff check --fix funpaybotengine` -- the repository's own lint target, against its own `[tool.ruff]` config -- rewrites eight import blocks and leaves five findings on a clean clone of `dev`. With `pre-commit` installed as `make dev` prescribes, those land as unrelated noise in the next contributor's diff. Two findings are deliberately left: * `E722` in `methods/refund.py` -- carried by funpayhub#44, which changes the same lines for a behavioural reason. * `RET503` in `runner/event_collector.py` -- the `attempts` decorator falls out of its loop only when `amount` is negative, and then it retries forever rather than returning `None`. That is a behaviour question, not a lint one. `ruff format` is also out of scope: it wants 107 of 122 files, which would conflict with anything currently in flight.
This file contains hidden or 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
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.
make lintisruff check --fix $(SRC), against this repository's own[tool.ruff]config. On a clean clone ofdevit is not a no-op:make devrunspre-commit install, so a contributor touching any of these files gets the rewrites mixed into their own diff.Twelve of the fourteen are fixed here. The one non-mechanical change:
dict(fields)is the same mapping for a sequence of pairs, and the surroundingtryis untouched.Two left in place
E722inmethods/refund.py— #44 changes those same lines for a behavioural reason, so touching them here would only make a conflict.RET503inrunner/event_collector.py:95—attemptsreaches the end of its loop only whenamountis negative:With
amount=-1the counter goes-2, -3, …,not attemptsis never true, and the call retries forever. Silencing the lint with a barereturn Nonewould hide that; it is a behaviour question and belongs in its own change.Not in scope
ruff formatwants 107 of 122 files. That is a separate decision and would conflict with anything currently in flight.Checked
All 106 modules import cleanly after the change; there is no test suite on
devto run.