Black + isort

This commit is contained in:
Nexus 2024-04-18 00:24:58 +01:00
parent f83322dae3
commit 093991ad70
Signed by: nex
GPG key ID: 0FA334385D0B689F
8 changed files with 33 additions and 40 deletions

View file

@ -1,14 +1,13 @@
import asyncio import asyncio
import logging
import pathlib import pathlib
import re
import subprocess import subprocess
import tempfile
from urllib.parse import urlparse
import aiohttp import aiohttp
import discord import discord
import re
import tempfile
from urllib.parse import urlparse
import logging
import httpx import httpx
from discord.ext import commands from discord.ext import commands
@ -90,7 +89,7 @@ class AutoResponder(commands.Cog):
if stream.get("profile", "Main ?") != "Main": if stream.get("profile", "Main ?") != "Main":
self.log.warning( self.log.warning(
"Unsupported profile: %r - disabling hardware accelerated read.", "Unsupported profile: %r - disabling hardware accelerated read.",
stream.get("profile", "Main ?") stream.get("profile", "Main ?"),
) )
hwaccel = False hwaccel = False
break break
@ -154,14 +153,10 @@ class AutoResponder(commands.Cog):
"-profile:v", "-profile:v",
"main", "main",
"-y", "-y",
"-hide_banner" "-hide_banner",
] ]
if hwaccel: if hwaccel:
args = [ args = ["-hwaccel", "auto", *args]
"-hwaccel",
"auto",
*args
]
process = await asyncio.create_subprocess_exec( process = await asyncio.create_subprocess_exec(
"ffmpeg", "ffmpeg",
*args, *args,

View file

@ -7,12 +7,11 @@ import tempfile
import typing import typing
from pathlib import Path from pathlib import Path
import PIL.Image
import discord import discord
import httpx import httpx
import PIL.Image
from discord.ext import commands from discord.ext import commands
from conf import VERSION from conf import VERSION

View file

@ -1,25 +1,24 @@
import asyncio import asyncio
import base64
import contextlib import contextlib
import io
import json import json
import logging import logging
import os import os
import textwrap import textwrap
import time import time
import typing import typing
import base64
import io
import httpx
import redis
from discord import Interaction
from discord.ui import View, button
from fnmatch import fnmatch from fnmatch import fnmatch
import aiohttp import aiohttp
from yarl import URL
import discord import discord
import httpx
import redis
from discord import Interaction
from discord.ext import commands from discord.ext import commands
from discord.ui import View, button
from yarl import URL
from conf import CONFIG from conf import CONFIG

View file

@ -1,13 +1,13 @@
import asyncio import asyncio
import io
import logging import logging
import re import re
from datetime import datetime, timedelta
from typing import Annotated, Callable, Iterable
import discord import discord
import io
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from datetime import timedelta, datetime
from discord.ext import commands from discord.ext import commands
from typing import Callable, Iterable, Annotated
from conf import CONFIG from conf import CONFIG
@ -188,7 +188,7 @@ class QuoteQuota(commands.Cog):
"per_minute": 0.0, "per_minute": 0.0,
"per_hour": 0.0, "per_hour": 0.0,
"per_day": 0.0, "per_day": 0.0,
"hours": {} "hours": {},
} }
for i in range(24): for i in range(24):
counts["hours"][str(i)] = 0 counts["hours"][str(i)] = 0

View file

@ -1,11 +1,11 @@
import asyncio import asyncio
import copy
import datetime import datetime
import io import io
import logging import logging
import os import os
import tempfile import tempfile
import time import time
import copy
import typing import typing
from urllib.parse import urlparse from urllib.parse import urlparse
@ -19,7 +19,6 @@ from selenium.webdriver.chrome.service import Service as ChromeService
from conf import CONFIG from conf import CONFIG
RESOLUTIONS = { RESOLUTIONS = {
"8k": "7680x4320", "8k": "7680x4320",
"4k": "3840x2160", "4k": "3840x2160",

View file

@ -2,15 +2,15 @@ import asyncio
import functools import functools
import hashlib import hashlib
import logging import logging
import subprocess
import tempfile import tempfile
import textwrap import textwrap
import subprocess
import typing import typing
from pathlib import Path from pathlib import Path
from urllib.parse import urlparse from urllib.parse import urlparse
import discord
import aiosqlite import aiosqlite
import discord
import yt_dlp import yt_dlp
from discord.ext import commands from discord.ext import commands

View file

@ -1,8 +1,9 @@
import toml
import logging import logging
import subprocess import subprocess
from pathlib import Path from pathlib import Path
import toml
log = logging.getLogger("jimmy.autoconf") log = logging.getLogger("jimmy.autoconf")
if (Path.cwd() / ".git").exists(): if (Path.cwd() / ".git").exists():

View file

@ -1,22 +1,22 @@
import asyncio import asyncio
import datetime import datetime
import logging import logging
import random
import shutil import shutil
import sys import sys
import time
import traceback import traceback
import typing import typing
from threading import Thread, Event
import time
import random
import httpx
import uvicorn
from logging import FileHandler from logging import FileHandler
from threading import Event, Thread
import discord import discord
import httpx
import uvicorn
from discord.ext import commands from discord.ext import commands
from rich.logging import RichHandler
from rich.console import Console from rich.console import Console
from rich.logging import RichHandler
from conf import CONFIG from conf import CONFIG