mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
🔧 Update ruff v0.4.4 (#12375)
This commit is contained in:
parent
92b30c26e0
commit
71d50a8658
@ -83,7 +83,7 @@ docs = [
|
||||
]
|
||||
lint = [
|
||||
"flake8>=3.5.0",
|
||||
"ruff==0.4.1",
|
||||
"ruff==0.4.4",
|
||||
"mypy==1.10.0",
|
||||
"sphinx-lint",
|
||||
"types-docutils",
|
||||
|
@ -108,7 +108,7 @@ class ImageCollector(EnvironmentCollector):
|
||||
logger.warning(__('image file %s not readable: %s'), filename, err,
|
||||
location=node, type='image', subtype='not_readable')
|
||||
for key, files in globbed.items():
|
||||
candidates[key] = sorted(files, key=len)[0] # select by similarity
|
||||
candidates[key] = min(files, key=len) # select by similarity
|
||||
|
||||
|
||||
class DownloadFileCollector(EnvironmentCollector):
|
||||
|
@ -364,9 +364,9 @@ class Locale(SphinxTransform):
|
||||
for node, msg in extract_messages(self.document):
|
||||
msgstr = merged.get(msg, '')
|
||||
|
||||
# There is no point in having #noqa on literal blocks because
|
||||
# There is no point in having noqa on literal blocks because
|
||||
# they cannot contain references. Recognizing it would just
|
||||
# completely prevent escaping the #noqa. Outside of literal
|
||||
# completely prevent escaping the noqa. Outside of literal
|
||||
# blocks, one can always write \#noqa.
|
||||
if not isinstance(node, LITERAL_TYPE_NODES):
|
||||
msgstr, _ = parse_noqa(msgstr)
|
||||
|
Loading…
Reference in New Issue
Block a user