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
[MAINTENANCE] enable TRYceratops linting rules #9684
Conversation
✅ Deploy Preview for niobium-lead-7998 canceled.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #9684 +/- ##
========================================
Coverage 82.55% 82.55%
========================================
Files 511 511
Lines 46396 46396
========================================
Hits 38303 38303
Misses 8093 8093
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -282,6 +282,7 @@ lint.select = [ | |||
# https://docs.astral.sh/ruff/rules/#numpy-specific-rules-npy | |||
"NPY", # NumPy-specific rules TODO: Enable after fixing or ignoring errors | |||
"NPY201", # numpy 2.0 compatibility (see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#ruff-plugin) -- Explicitly listed to view preview rule errors | |||
"TRY", # TRYceratops |
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.
This is the main change that enables TRYceratops
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.
🙌 🎊
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.
LGTM! Thanks for keeping the noqa additions to a single commit, much easier to review the config changes.
@@ -15,6 +15,7 @@ lint.extend-ignore = [ | |||
"PLR2004", # magic value comparison is common test pattern | |||
"PLR0913", # too many arguments | |||
"RUF015", # element index slice is common test pattern | |||
"TRY003", # long messages in tests are ok |
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.
Ignoring TRY003 errors (Avoid specifying long messages outside the exception class) in test files
Enable TRYceratops linting rules for better exception handling & raising.
invoke lint
(usesruff format
+ruff check
)For more information about contributing, see Contribute.
After you submit your PR, keep the page open and monitor the statuses of the various checks made by our continuous integration process at the bottom of the page. Please fix any issues that come up and reach out on Slack if you need help. Thanks for contributing!