-
-
Notifications
You must be signed in to change notification settings - Fork 471
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
[MRG] Apply Repo-Review suggestions #1982
Conversation
de2b6b4
to
2013660
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1982 +/- ##
==========================================
+ Coverage 97.95% 97.97% +0.02%
==========================================
Files 63 63
Lines 10836 10968 +132
==========================================
+ Hits 10614 10746 +132
Misses 222 222 ☔ View full report in Codecov by Sentry. |
* PC100: Has pre-commit-hooks Must have https://github.com/pre-commit/pre-commit-hooks repo in .pre-commit-config.yaml * PC110: Uses black or ruff-format Use https://github.com/psf/black-pre-commit-mirror instead of https://github.com/psf/black in .pre-commit-config.yaml * PC140: Uses mypy Must have https://github.com/pre-commit/mirrors-mypy repo in .pre-commit-config.yaml * PC191: Ruff show fixes if fixes enabled If --fix is present, --show-fixes must be too. * MY102: MyPy show_error_codes deprecated Must not have show_error_codes. Use hide_error_codes instead (since MyPy v0.990). * MY104: MyPy enables ignore-without-code Must have "ignore-without-code" in enable_error_code = [...]. This will force all skips in your project to include the error code, which makes them more readable, and avoids skipping something unintended. * MY105: MyPy enables redundant-expr Must have "redundant-expr" in enable_error_code = [...]. This helps catch useless lines of code, like checking the same condition twice. * MY106: MyPy enables truthy-bool Must have "truthy-bool" in enable_error_code = []. This catches mistakes in using a value as truthy if it cannot be falsey. * RF003: src directory specified if used Must specify src directory if it exists. * RF202: Use (new) lint config section - ignore should be set as lint.ignore instead - mccabe should be set as lint.mccabe instead - per-file-ignores should be set as lint.per-file-ignores instead - pylint should be set as lint.pylint instead - select should be set as lint.select instead
2013660
to
ebc8af8
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 - looks like this can help keep things more up-to-date. I'm approving bit will leave open in case @mrbean-bremen or @scaramallion have any comments.
Describe the changes
Apply some Repo-Review suggestions.
I went for the low-hanging fruits, other changes are more invasive and deserve a PR of their own, such as enabling more ruff rules (#1771).
Must have
https://github.com/pre-commit/pre-commit-hooks
repo in.pre-commit-config.yaml
Use
https://github.com/psf/black-pre-commit-mirror
instead ofhttps://github.com/psf/black
in.pre-commit-config.yaml
Must have
https://github.com/pre-commit/mirrors-mypy
repo in.pre-commit-config.yaml
Must have
https://github.com/pre-commit/mirrors-mypy
repo in.pre-commit-config.yaml
If
--fix
is present,--show-fixes
must be too.Must have
"ignore-without-code"
inenable_error_code = [...]
. This will force all skips in your project to include the error code, which makes them more readable, and avoids skipping something unintended.Must have
"redundant-expr"
inenable_error_code = [...]
. This helps catch useless lines of code, like checking the same condition twice.Must have
"truthy-bool"
inenable_error_code = []
. This catches mistakes in using a value as truthy if it cannot be falsey.Must specify
src
directory if it exists.ignore
should be set aslint.ignore
insteadmccabe
should be set aslint.mccabe
insteadper-file-ignores
should be set aslint.per-file-ignores
insteadpylint
should be set aslint.pylint
insteadselect
should be set aslint.select
insteadTasks
doc/_build/html/index.html
)