Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dni
Copy link
Member

@dni dni commented Apr 1, 2024

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/

@dni dni added the code health Make the code more beautiful label Apr 1, 2024
@dni dni added this to the 0.12.5 milestone Apr 1, 2024
@dni dni requested review from motorina0 and prusnak April 1, 2024 16:52
@codecov
Copy link

codecov bot commented Apr 1, 2024

Codecov Report

Attention: Patch coverage is 97.29730% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 59.97%. Comparing base (a158056) to head (677337a).

Files Patch % Lines
lnbits/commands.py 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@dni dni modified the milestones: 0.12.5, 0.12.6 Apr 11, 2024
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)
Copy link
Collaborator

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?

Copy link
Collaborator

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

@prusnak prusnak merged commit b145bff into dev Apr 15, 2024
@prusnak prusnak deleted the ruff-up branch April 15, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code health Make the code more beautiful

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants