-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Apply assorted repo-review rules #1063
Conversation
24abf6a
to
8dd76f3
Compare
PP306: Specifies strict config `--strict-config` should be in `addopts = [...]`. This forces an error if a config setting is misspelled. PP307: Specifies strict markers `--strict-markers` should be in `addopts = [...]`. This forces all markers to be specified in config, avoiding misspellings. PP308: Specifies useful pytest summary An explicit summary flag like `-ra` should be in `addopts = [...]` (print summary of all fails/errors).
PC191: Ruff show fixes if fixes enabled If `--fix` is present, `--show-fixes` must be too.
RF003: src directory specified if used Must specify `src` directory if it exists.
RF103: pyupgrade must be selected Must select the pyupgrade `UP` checks.
e844440
to
338cb2d
Compare
70ebe38
to
715ef95
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tool looks very interesting, I'm going to elevate a bit deeper for some details (for example the insisting on prettier I pre commit even though the pre commit upstream discontinued support)
Next release of sp-repoo-review will accept a maintained fork scientific-python/cookie#461 - if you know of other markdown linters/formatters that should be here too, we can add those. You can always ignore / skip checks you don't care about, though, that's very much expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add the review pre commit hook and add the necessary ignores
With hook 🪝 mean the repo review one |
77b1e12
to
1f15702
Compare
I have added the repo-review pre-commit hook, and disabled these rules for now: pyproject.toml [tool.repo-review]
ignore = ["PP305", "GH103", "GH212", "MY100", "PC111", "PC160", "PC170", "PC180", "PC901"]
|
1f15702
to
5f3aa28
Compare
5f3aa28
to
4a48455
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍🏻
https://learn.scientific-python.org/development/guides/repo-review/?repo=pypa%2Fsetuptools_scm&branch=main
Apply repo-review rules PP306, PP307, PP308
Apply repo-review rule PC191
Apply repo-review rule RF003
Apply repo-review rule RF103