@@ -167,7 +167,7 @@ def parsekeywordpairs(signature: str) -> Dict[str, str]:
167167 return {item [0 ]: "" .join (item [2 :]) for item in stack if len (item ) >= 3 }
168168
169169
170- def fixlongargs (f : Callable , argspec : ArgSpec ) -> ArgSpec :
170+ def _fixlongargs (f : Callable , argspec : ArgSpec ) -> ArgSpec :
171171 """Functions taking default arguments that are references to other objects
172172 whose str() is too big will cause breakage, so we swap out the object
173173 itself with the name it was referenced with in the source by parsing the
@@ -195,7 +195,7 @@ def fixlongargs(f: Callable, argspec: ArgSpec) -> ArgSpec:
195195 return argspec
196196
197197
198- getpydocspec_re = LazyReCompile (
198+ _getpydocspec_re = LazyReCompile (
199199 r"([a-zA-Z_][a-zA-Z0-9_]*?)\((.*?)\)" , re .DOTALL
200200)
201201
@@ -206,7 +206,7 @@ def _getpydocspec(f: Callable) -> Optional[ArgSpec]:
206206 except NameError :
207207 return None
208208
209- s = getpydocspec_re .search (argspec )
209+ s = _getpydocspec_re .search (argspec )
210210 if s is None :
211211 return None
212212
@@ -265,7 +265,7 @@ def getfuncprops(func: str, f: Callable) -> Optional[FuncProps]:
265265 return None
266266 try :
267267 argspec = _get_argspec_from_signature (f )
268- fprops = FuncProps (func , fixlongargs (f , argspec ), is_bound_method )
268+ fprops = FuncProps (func , _fixlongargs (f , argspec ), is_bound_method )
269269 except (TypeError , KeyError , ValueError ):
270270 argspec_pydoc = _getpydocspec (f )
271271 if argspec_pydoc is None :
0 commit comments