Skip to content

Commit 71d50a8

Browse files
authored
🔧 Update ruff v0.4.4 (#12375)
1 parent 92b30c2 commit 71d50a8

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

‎pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ docs = [
8383
]
8484
lint = [
8585
"flake8>=3.5.0",
86-
"ruff==0.4.1",
86+
"ruff==0.4.4",
8787
"mypy==1.10.0",
8888
"sphinx-lint",
8989
"types-docutils",

‎sphinx/environment/collectors/asset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def collect_candidates(self, env: BuildEnvironment, imgpath: str,
108108
logger.warning(__('image file %s not readable: %s'), filename, err,
109109
location=node, type='image', subtype='not_readable')
110110
for key, files in globbed.items():
111-
candidates[key] = sorted(files, key=len)[0] # select by similarity
111+
candidates[key] = min(files, key=len) # select by similarity
112112

113113

114114
class DownloadFileCollector(EnvironmentCollector):

‎sphinx/transforms/i18n.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,9 @@ def apply(self, **kwargs: Any) -> None:
364364
for node, msg in extract_messages(self.document):
365365
msgstr = merged.get(msg, '')
366366

367-
# There is no point in having #noqa on literal blocks because
367+
# There is no point in having noqa on literal blocks because
368368
# they cannot contain references. Recognizing it would just
369-
# completely prevent escaping the #noqa. Outside of literal
369+
# completely prevent escaping the noqa. Outside of literal
370370
# blocks, one can always write \#noqa.
371371
if not isinstance(node, LITERAL_TYPE_NODES):
372372
msgstr, _ = parse_noqa(msgstr)

‎tox.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,12 @@ deps =
5353
bindep
5454
commands =
5555
bindep test
56+
57+
[testenv:ruff]
58+
description =
59+
Run ruff formatting and linting.
60+
extras =
61+
lint
62+
commands =
63+
ruff format .
64+
ruff check --fix .

0 commit comments

Comments
 (0)