-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add type hints to make objects easier to track during development. #131
base: master
Are you sure you want to change the base?
Conversation
Thank you for your PR. I will take a look on this now. |
@@ -143,7 +143,7 @@ class LibraryItem(BaseItem): | |||
def _prepare_data(self, data: dict) -> dict: | |||
return data.get("item", data) | |||
|
|||
def _get_codec(self, quality: str): | |||
def _get_codec(self, quality: str) -> tuple[str | None, int | None]: |
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 incorrect notation. without a lot of rejiggering, safest would just to have it noted as -> tuple:
@@ -126,5 +126,5 @@ def invoke(self, ctx): | |||
click.echo(self.help, color=ctx.color) | |||
ctx.exit(1) | |||
|
|||
def parse_args(self, ctx, args): | |||
def parse_args(self, ctx: None, args: list[str]): |
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.
same issue here as above. can't use brackets with builtin methods
Hi. Currently I'm working on a fullstack Django/React app for Audible. So I'm short on time. But will give my best to merge your pr after a review. |
All good. my last two comments were mostly reminders to myself. The django/react app sounds cool! I'm eager to check it out once you have it working |
I will invite you to this project when it's ready for beta testing ;) |
The only changes in this commit are to method and function signatures. I was frustrated that I couldn't trace things properly, so I added hints for EVERYTHING (mostly).
I tried to sort the imports like you had the others sorted, but lemme know if I miss-ordered anything.