From ca5cce5b07d51efe7310b449cdefeca8d873e9df Mon Sep 17 00:00:00 2001 From: sepro Date: Tue, 1 Jul 2025 21:17:11 +0200 Subject: [PATCH] [cleanup] Bump ruff to 0.12.x (#13596) Authored by: seproDev --- pyproject.toml | 4 +++- yt_dlp/aes.py | 2 +- yt_dlp/extractor/nhk.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3775251e1..41d5ec3b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,7 +75,7 @@ dev = [ ] static-analysis = [ "autopep8~=2.0", - "ruff~=0.11.0", + "ruff~=0.12.0", ] test = [ "pytest~=8.1", @@ -210,10 +210,12 @@ ignore = [ "TD001", # invalid-todo-tag "TD002", # missing-todo-author "TD003", # missing-todo-link + "PLC0415", # import-outside-top-level "PLE0604", # invalid-all-object (false positives) "PLE0643", # potential-index-error (false positives) "PLW0603", # global-statement "PLW1510", # subprocess-run-without-check + "PLW1641", # eq-without-hash "PLW2901", # redefined-loop-name "RUF001", # ambiguous-unicode-character-string "RUF012", # mutable-class-default diff --git a/yt_dlp/aes.py b/yt_dlp/aes.py index 065901d68..600cb12a8 100644 --- a/yt_dlp/aes.py +++ b/yt_dlp/aes.py @@ -435,7 +435,7 @@ def sub_bytes_inv(data): def rotate(data): - return data[1:] + [data[0]] + return [*data[1:], data[0]] def key_schedule_core(data, rcon_iteration): diff --git a/yt_dlp/extractor/nhk.py b/yt_dlp/extractor/nhk.py index 0bd6edfcb..0d5e5b0e7 100644 --- a/yt_dlp/extractor/nhk.py +++ b/yt_dlp/extractor/nhk.py @@ -495,7 +495,7 @@ def _real_extract(self, url): chapters = None if chapter_durations and chapter_titles and len(chapter_durations) == len(chapter_titles): start_time = chapter_durations - end_time = chapter_durations[1:] + [duration] + end_time = [*chapter_durations[1:], duration] chapters = [{ 'start_time': s, 'end_time': e,