aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornatsuoto <[email protected]>2026-07-15 11:36:02 +0530
committernatsuoto <[email protected]>2026-07-15 11:36:02 +0530
commita4964dab61f0a3587f7db14e794479be1dafb403 (patch)
tree31dabf6003943fa9749f1050b9c53b1dc143a9ca
parent84a89f536916ee969ad923d33ac1854e941ecdbd (diff)
downloadedify-a4964dab61f0a3587f7db14e794479be1dafb403.tar.xz
edify-a4964dab61f0a3587f7db14e794479be1dafb403.zip
refactor(result): keep _RePatternAttribute union on Regex.__getattr__; drop Any escape
-rw-r--r--edify/result/regex.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/edify/result/regex.py b/edify/result/regex.py
index b52e3ee..8cc4239 100644
--- a/edify/result/regex.py
+++ b/edify/result/regex.py
@@ -18,6 +18,7 @@ _RePatternMethodReturn = (
| Iterator[re.Match[str]]
| str
| tuple[str, int]
+ | list[str | None]
| None
)
@@ -133,7 +134,7 @@ class Regex:
return visualize_elements(self._elements, format=format, engine=engine)
def __getattr__(self, name: str) -> _RePatternAttribute:
- """Delegate any attribute access not explicitly defined here to the compiled pattern."""
+ """Return the underlying :class:`re.Pattern` attribute named ``name``."""
return getattr(self._compiled, name)
def __repr__(self) -> str: