-
-
Couldn't load subscription status.
- Fork 371
chore: adhere to ruff's UP
#2378
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #2378 +/- ##
=======================================
Coverage 59.97% 59.97%
=======================================
Files 65 65
Lines 9434 9434
=======================================
Hits 5658 5658
Misses 3776 3776 ☔ View full report in Codecov by Sentry. |
basically use `list` and `type` instead of `List` and `Type` this is save to use for python3.9 and has been deprecated. also has some performance drawbacks. read more here: https://docs.astral.sh/ruff/rules/non-pep585-annotation/
| return | ||
|
|
||
| top_path, *rest = [p for p in full_path.split("/") if p] | ||
| top_path, *rest = (p for p in full_path.split("/") if p) |
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.
Why is a tuple preferred to a list?
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.
tuple is immutable and it is more obvious it is not to be changed (appended to) earlier
basically use
listandtypeinstead ofListandTypethis is save to use for python3.9 and has been deprecated. also has some performance drawbacks.
read more here: https://docs.astral.sh/ruff/rules/non-pep585-annotation/