Skip to content

Commit 99cde31

Browse files
committed
Skip resolving for pydantic model fields
1 parent a924e14 commit 99cde31

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ def linkcode_resolve(repo_link: str, domain: str, info: dict[str, str]) -> str |
9494

9595
pos = _global_assign_pos(source, symbol_name)
9696
if pos is None:
97+
if symbol_name in ("model_config", "model_fields"):
98+
# These are ClassVars added by pydantic.
99+
# Since they're not in our source code, we cannot resolve them to a url.
100+
return None
97101
raise Exception(f"Could not find symbol `{symbol_name}` in {module.__name__}.")
98102

99103
start, end = pos

0 commit comments

Comments
 (0)