Skip to content

A feature-rich command-line audio/video downloader

[cleanup] Bump ruff to 0.12.x (#13596)

seproca5cce5b07d5
diff --git a/pyproject.toml b/pyproject.toml
index 3775251e10..41d5ec3b0f 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 065901d68d..600cb12a89 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 0bd6edfcba..0d5e5b0e7e 100644
--- a/yt_dlp/extractor/nhk.py
+++ b/yt_dlp/extractor/nhk.py
@@ -495,7 +495,7 @@ class NhkForSchoolBangumiIE(InfoExtractor):
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,