mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-09 14:11:55 -04:00
Typing
This commit is contained in:
parent
43710c6324
commit
bde9f7adec
1 changed files with 3 additions and 2 deletions
|
@ -5,6 +5,7 @@ import os
|
|||
import shutil
|
||||
import subprocess
|
||||
from functools import wraps
|
||||
from typing import Any
|
||||
|
||||
import aiofiles
|
||||
import click
|
||||
|
@ -176,10 +177,10 @@ async def file(ctx, path):
|
|||
async with Main(cfg) as main:
|
||||
async with aiofiles.open(path, "r") as f:
|
||||
try:
|
||||
items = json.loads(await f.read())
|
||||
items: Any = json.loads(await f.read())
|
||||
loaded = True
|
||||
except json.JSONDecodeError:
|
||||
items = [line async for line in f]
|
||||
items: Any = [line async for line in f]
|
||||
loaded = False
|
||||
if loaded:
|
||||
console.print(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue