Improve performance and add type hints
This commit is contained in:
parent
1782db4840
commit
b7e10e766e
23 changed files with 745 additions and 178 deletions
|
|
@ -39,9 +39,13 @@ class Command(BaseCommand):
|
|||
help="Re-download even if a local box art file already exists.",
|
||||
)
|
||||
|
||||
def handle(self, *_args: object, **options: object) -> None: # noqa: PLR0914, PLR0915
|
||||
def handle( # noqa: PLR0914, PLR0915
|
||||
self,
|
||||
*_args: str,
|
||||
**options: str | bool | int | None,
|
||||
) -> None:
|
||||
"""Download Twitch box art images for all games."""
|
||||
limit_value: object | None = options.get("limit")
|
||||
limit_value: str | bool | int | None = options.get("limit")
|
||||
limit: int | None = limit_value if isinstance(limit_value, int) else None
|
||||
force: bool = bool(options.get("force"))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue