From 413df48a779c5e6c0cb358e2e3501aa8547bed40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tronel?= Date: Fri, 28 Aug 2026 17:13:13 +0200 Subject: [PATCH] Fix wrong import. --- poetry.lock | 19 ++++++++++++++++++- pyproject.toml | 33 +++++++++++++++++++++++++++++++++ src/tscut/cli.py | 2 +- 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index 8468b53..4f9e41c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -872,6 +872,23 @@ notebook = ["ipywidgets (>=6)"] slack = ["envwrap", "slack-sdk"] telegram = ["envwrap", "requests"] +[[package]] +name = "types-tqdm" +version = "4.70.0.20260827" +description = "Typing stubs for tqdm" +optional = false +python-versions = ">=3.10" +groups = ["dev"] +files = [ + {file = "types_tqdm-4.70.0.20260827-py3-none-any.whl", hash = "sha256:d6e02da8ec2bc11124e02d4bc84bd8b67a444f4c5decf544846897c8272c7023"}, + {file = "types_tqdm-4.70.0.20260827.tar.gz", hash = "sha256:d3efd69243ac9093c552f1c0d081b77286d61ace96b6899a142542555bdad2dc"}, +] + +[package.extras] +all = ["types-requests", "types-tensorflow"] +requests = ["types-requests"] +tensorflow = ["types-tensorflow"] + [[package]] name = "typing-extensions" version = "4.16.0" @@ -920,4 +937,4 @@ test = ["pytest", "pytest-cov"] [metadata] lock-version = "2.1" python-versions = ">=3.11,<4" -content-hash = "bb1383a0bd739449d830d9146085c9dcd7f67d7ddaf93bf3e371b90f2d6c069c" +content-hash = "76bcb7a8ee79106ddac32401277b69dd4895e0d8067d71277e344c3a4e083be2" diff --git a/pyproject.toml b/pyproject.toml index 253ffae..c79f12d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,4 +26,37 @@ ruff = "^0.16.2" mypy = "^2.3.0" pytest = "^9.1.1" pylint = "^4.0.7" +types-tqdm = "^4.70.0.20260827" + + +[tool.ruff] +target-version = "py311" +line-length = 100 +src = ["src"] + +[tool.ruff.lint] +select = [ + "E", # pycodestyle errors + "F", # Pyflakes + "I", # isort + "UP", # pyupgrade + "B", # flake8-bugbear + "SIM", # flake8-simplify + "RET", # flake8-return + "PERF", # Perflint +] + + +[tool.mypy] +python_version = "3.11" +files = ["src"] +warn_unused_configs = true +show_error_codes = true + +[[tool.mypy.overrides]] +module = [ + "coloredlogs", + "hexdump", +] +ignore_missing_imports = true diff --git a/src/tscut/cli.py b/src/tscut/cli.py index 374352f..9cfc290 100644 --- a/src/tscut/cli.py +++ b/src/tscut/cli.py @@ -11,6 +11,7 @@ from datetime import datetime, timedelta from os import unlink from shutil import copyfile, move from sys import exit +from functools import cmp_to_key import coloredlogs import hexdump @@ -19,7 +20,6 @@ from .tscut import ( SupportedFormat, change_codec_private_data, check_required_tools, - cmp_to_key, compare_time_interval, concatenate_h264_parts, concatenate_h264_ts_parts,