We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f5b0560 + eb8adf9 commit 12f54baCopy full SHA for 12f54ba
doc/src/hexdoc_hexcasting/book/page/pages.py
@@ -19,7 +19,10 @@ def patterns(self) -> list[PatternInfo]:
19
@model_validator(mode="after")
20
def _post_root_lookup(self, info: ValidationInfo):
21
hex_ctx = HexContext.of(info)
22
- self._patterns = [hex_ctx.patterns[self.op_id]]
+ pattern = hex_ctx.patterns.get(self.op_id)
23
+ if pattern is None:
24
+ raise ValueError(f"Unknown pattern ID (check your pattern stubs in hexdoc.toml): {self.op_id}")
25
+ self._patterns = [pattern]
26
return self
27
28
0 commit comments