From 91bc50e451a50b2400123e8dae1e81c6e0d67310 Mon Sep 17 00:00:00 2001 From: htruscott Date: Sun, 10 May 2026 15:41:47 -0400 Subject: [PATCH] add angle brackets to docstring type stack parsing Signed-off-by: htruscott --- pybind11_stubgen/parser/mixins/parse.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pybind11_stubgen/parser/mixins/parse.py b/pybind11_stubgen/parser/mixins/parse.py index 66308f1..75be105 100644 --- a/pybind11_stubgen/parser/mixins/parse.py +++ b/pybind11_stubgen/parser/mixins/parse.py @@ -800,7 +800,7 @@ def _split_args_str( ) -> list[tuple[str, str | None, str | None]] | None: result = [] - closing = {"(": ")", "{": "}", "[": "]"} + closing = {"(": ")", "{": "}", "[": "]", "<": ">"} stack = [] i = 0 arg_begin = 0 @@ -867,7 +867,7 @@ def _split_parameters_str(self, param_str: str) -> list[str] | None: def _split_str(self, param_str: str, delim: str): result = [] - closing = {"(": ")", "{": "}", "[": "]"} + closing = {"(": ")", "{": "}", "[": "]", "<": ">"} stack = [] i = 0 arg_begin = 0