File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1212 get_type_hints ,
1313)
1414
15- from .types import FunctionSchema , Doc
15+ from .types import FunctionSchema , Doc , DocMeta
1616from .utils import unwrap_doc
1717
1818
@@ -102,7 +102,7 @@ def get_function_schema(
102102 # find description in param_args tuple
103103 try :
104104 description = next (
105- unwrap_doc (arg ) for arg in param_args if isinstance (arg , Doc )
105+ unwrap_doc (arg ) for arg in param_args if isinstance (arg , DocMeta )
106106 )
107107 except StopIteration :
108108 try :
Original file line number Diff line number Diff line change 1515 from typing_extensions import Doc
1616 except ImportError :
1717
18- @runtime_checkable
19- class Doc (Protocol ):
18+ class Doc :
2019 documentation : str
2120
2221 def __init__ (self , documentation : str , / ):
2322 self .documentation = documentation
2423
2524
25+ @runtime_checkable
26+ class DocMeta (Protocol ):
27+ """Represents the protocol for the Doc class."""
28+
29+ documentation : str
30+
31+
2632class ParamSchema (TypedDict ):
2733 """
2834 Represents the schema for a parameter.
You can’t perform that action at this time.
0 commit comments