Skip to content

Commit

Permalink
chore(docs): Fix tools/sphinx_ext/missing_references.py (#3588)
Browse files Browse the repository at this point in the history
Fix reference matching
  • Loading branch information
provinzkraut authored Jun 21, 2024
1 parent 883ca0a commit bccf963
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
re.compile(r"litestar\.template\.(config|TemplateConfig).*"): re.compile(".*EngineType"),
"litestar.concurrency.set_asyncio_executor": {"ThreadPoolExecutor"},
"litestar.concurrency.get_asyncio_executor": {"ThreadPoolExecutor"},
re.compile(r"litestar\.channels\.backends\.asyncpg.*"): {"asyncpg.connection.Connection"},
re.compile(r"litestar\.channels\.backends\.asyncpg.*"): {"asyncpg.Connection"},
}

# Do not warn about broken links to the following:
Expand Down
7 changes: 4 additions & 3 deletions tools/sphinx_ext/missing_references.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ def on_warn_missing_reference(app: Sphinx, domain: str, node: Node) -> bool | No
for pattern, targets in ignore_ref_rgs.items():
if not pattern.match(source):
continue
if isinstance(targets, set) and target in targets:
return True
if targets.match(target):
if isinstance(targets, set):
if target in targets:
return True
elif targets.match(target):
return True

return None
Expand Down

0 comments on commit bccf963

Please sign in to comment.