Skip to content

Commit ab70ef7

Browse files
authored
Move the SIM115 whitelist inline (#11819)
1 parent 6e18d06 commit ab70ef7

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

.ruff.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -583,9 +583,6 @@ select = [
583583
# whitelist ``print`` for stdout messages
584584
"sphinx/testing/fixtures.py" = ["T201"]
585585

586-
# allow returning ``open()``
587-
"sphinx/testing/path.py" = ["SIM115"]
588-
589586
# Ruff bug: https://github.com/astral-sh/ruff/issues/6540
590587
"sphinx/transforms/i18n.py" = ["PGH004"]
591588

sphinx/testing/path.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def utime(self, arg: Any) -> None:
150150
os.utime(self, arg)
151151

152152
def open(self, mode: str = 'r', **kwargs: Any) -> IO:
153-
return open(self, mode, **kwargs)
153+
return open(self, mode, **kwargs) # noqa: SIM115
154154

155155
def write_text(self, text: str, encoding: str = 'utf-8', **kwargs: Any) -> None:
156156
"""

0 commit comments

Comments
 (0)