Skip to content

Commit f1bcc6c

Browse files
committed
chore(docs[conf]): Ignore try/catch loop
docs/conf.py:204:9: PERF203 `try`-`except` within a loop incurs performance overhead
1 parent 70b08f5 commit f1bcc6c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

docs/conf.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,7 @@
178178
}
179179

180180

181-
def linkcode_resolve(
182-
domain: str, info: dict[str, str]
183-
) -> t.Union[None, str]:
181+
def linkcode_resolve(domain: str, info: dict[str, str]) -> t.Union[None, str]:
184182
"""
185183
Determine the URL corresponding to Python object
186184
@@ -203,7 +201,7 @@ def linkcode_resolve(
203201
for part in fullname.split("."):
204202
try:
205203
obj = getattr(obj, part)
206-
except Exception:
204+
except Exception: # noqa: PERF203
207205
return None
208206

209207
# strip decorators, which would resolve to the source of the decorator

0 commit comments

Comments
 (0)