mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-12 22:26:16 -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 shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
import aiofiles
|
import aiofiles
|
||||||
import click
|
import click
|
||||||
|
@ -176,10 +177,10 @@ async def file(ctx, path):
|
||||||
async with Main(cfg) as main:
|
async with Main(cfg) as main:
|
||||||
async with aiofiles.open(path, "r") as f:
|
async with aiofiles.open(path, "r") as f:
|
||||||
try:
|
try:
|
||||||
items = json.loads(await f.read())
|
items: Any = json.loads(await f.read())
|
||||||
loaded = True
|
loaded = True
|
||||||
except json.JSONDecodeError:
|
except json.JSONDecodeError:
|
||||||
items = [line async for line in f]
|
items: Any = [line async for line in f]
|
||||||
loaded = False
|
loaded = False
|
||||||
if loaded:
|
if loaded:
|
||||||
console.print(
|
console.print(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue