mirror of
https://github.com/tropicoo/yt-dlp-bot.git
synced 2024-09-20 06:46:08 +08:00
Maintenance
This commit is contained in:
parent
d344008c2b
commit
32e9b92eeb
|
@ -13,4 +13,4 @@
|
|||
**/*Dockerfile*
|
||||
LICENSE
|
||||
README.md
|
||||
.ruff.toml
|
||||
pyproject.toml
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
PyYAML==6.0.1
|
||||
addict==2.4.0
|
||||
pyrofork==2.3.21.post3
|
||||
tenacity==8.2.3
|
||||
tgcrypto-pyrofork==1.2.6
|
||||
|
|
|
@ -53,7 +53,7 @@ class EncodeToH264Task(AbstractFfBinaryTask):
|
|||
|
||||
proc = await self._run_proc(cmd)
|
||||
if not proc:
|
||||
return None
|
||||
return
|
||||
|
||||
stdout, stderr = await self._get_stdout_stderr(proc)
|
||||
self._log.info(
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
[tool.ruff]
|
||||
line-length = 88
|
||||
indent-width = 4
|
||||
target-version = "py312"
|
||||
src = ["app_api", "app_bot", "app_worker"]
|
||||
required-version = ">=0.3.4"
|
||||
|
||||
[lint]
|
||||
select = ["F", "E", "W", "I001"]
|
||||
[tool.ruff.lint]
|
||||
select = ["F", "E", "W", "I001", "RET", "SLF001"]
|
||||
ignore = ["E501"] # Skip line length violations
|
||||
|
||||
[format]
|
||||
[tool.ruff.format]
|
||||
indent-style = "space"
|
||||
quote-style = "single"
|
||||
line-ending = "lf"
|
|
@ -24,6 +24,7 @@ setup(
|
|||
'Intended Audience :: Developers',
|
||||
'Natural Language :: English',
|
||||
'Programming Language :: Python :: 3.11',
|
||||
'Programming Language :: Python :: 3.12',
|
||||
],
|
||||
description='Common shared utils for yt downloader bot',
|
||||
install_requires=get_requirements(),
|
||||
|
|
|
@ -5,7 +5,7 @@ import aiohttp
|
|||
from yt_shared.schemas.ytdlp import LatestVersion
|
||||
|
||||
|
||||
class YtDlpGithubClient:
|
||||
class YtdlpGithubClient:
|
||||
"""yt-dlp Github version number checker."""
|
||||
|
||||
LATEST_TAG_URL = 'https://github.com/yt-dlp/yt-dlp/releases/latest'
|
||||
|
|
|
@ -2,7 +2,7 @@ import asyncio
|
|||
import logging
|
||||
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from yt_shared.clients.github import YtDlpGithubClient
|
||||
from yt_shared.clients.github import YtdlpGithubClient
|
||||
from yt_shared.repositories.ytdlp import YtdlpRepository
|
||||
from yt_shared.schemas.ytdlp import CurrentVersion, LatestVersion, VersionContext
|
||||
|
||||
|
@ -15,7 +15,7 @@ class YtdlpVersionChecker:
|
|||
def __init__(self) -> None:
|
||||
self._log = logging.getLogger(self.__class__.__name__)
|
||||
self._ytdlp_repository = YtdlpRepository()
|
||||
self._ytdlp_client = YtDlpGithubClient()
|
||||
self._ytdlp_client = YtdlpGithubClient()
|
||||
|
||||
async def get_version_context(self, db: AsyncSession) -> VersionContext:
|
||||
latest, current = await asyncio.gather(
|
||||
|
|
Loading…
Reference in a new issue