(obj)
| 167 | return obj |
| 168 | |
| 169 | def signature(obj): |
| 170 | # inspect.signature tries to parse __text_signature__ if other |
| 171 | # properties like __signature__ doesn't exists, but cython |
| 172 | # doesn't set that property despite that embedsignature cython |
| 173 | # directive is set. The only way to inspect a cython compiled |
| 174 | # callable's signature to parse it from __doc__ while |
| 175 | # embedsignature directive is set during the build phase. |
| 176 | # So path inspect.signature function to attempt to parse the first |
| 177 | # line of callable.__doc__ as a signature. |
| 178 | try: |
| 179 | return orig_signature(obj) |
| 180 | except Exception as orig_error: |
| 181 | try: |
| 182 | return inspect_signature(obj) |
| 183 | except Exception: |
| 184 | raise orig_error |
| 185 | |
| 186 | try: |
| 187 | Docstring._load_obj = _load_obj |
nothing calls this directly
no test coverage detected