-
Notifications
You must be signed in to change notification settings - Fork 3
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
Ruff fixes: D402, D400 , D209 , D202 , B007 , I001 , B018 #103
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #103 +/- ##
==========================================
- Coverage 83.32% 83.25% -0.07%
==========================================
Files 42 42
Lines 5636 5631 -5
Branches 768 768
==========================================
- Hits 4696 4688 -8
- Misses 739 741 +2
- Partials 201 202 +1 ☔ View full report in Codecov by Sentry. |
Regarding the remaining ignored Ruff rules:
I assume that violations of these rules can either be fixed or explicitly ignored (including a descriptive comment, why violating the rule is reasonable in the specific case).
Oh, this is an important one, to find ugly bugs. I would definitely enable this one and ignore false-positives on a per-line basis, if required.
Not sure about this one. There may be multiple violations of this one in SHC, caused by the trait-/mixin-style class inheritance patterns. My intuition tells me that we should keep this one ignored, as I don't see a real problem with violations.
This seems a bit over-pedantic. Why shouldn't the abstract base class provide a default implementation which is a noop?
This rule sounds very reasonable. I would really want to fix violations of this one.
I like this one. There may be rare cases, where an Exception in an except clause is actually meant to report an error during exception handling, but in these cases, I think, it's reasonable to ignore the rule locally for the relevant line.
I would keep these disabled. I'm a fan of naming functions/methods and parameters in a way that is self-explanatory (together with type-hints) and does not require an additional docstring (which would only repeat, what the denominators and type hints already say).
Sounds reasonable to keep this ignored.
Those sound good for a consistent layout of docstrings.
This conflicts with D213 and I like D213 better.
I'm unsure about these. All of these sound like unnecessary constraints to me.
I assume, this conflicts with a two-line summary at the beginning of the docstring. I find, sometimes two lines are required for a good summary, so I don't want to be limited by this rule. Thus, I would keep it ignored. |
Removed some of the
ruff.lint
exceptions frompyproject.toml
.I did a commit for each line removed. Thus you can easily review them step-by-step by looking at the individual commits.
There are still quite some exception most of them are documentation related and will be quite some work to fix. Others need some more discussion on our code preferences and/or a more in-depth knowledge of the code.
So we could somehow discuss them step-by-step or maybe just leave them there for now. Maybe you have a proposal on how we shall address it?