|
def formatannotationrelativeto(object): |
|
module = getattr(object, '__module__', None) |
|
def _formatannotation(annotation): |
|
return formatannotation(annotation, module) |
|
return _formatannotation |
It is completely untested and unused in CPython's code base:
I will send a PR with some tests.
Linked PRs
cpython/Lib/inspect.py
Lines 1354 to 1358 in d6d0548
It is completely untested and unused in CPython's code base:
I will send a PR with some tests.
Linked PRs
inspect.formatannotationrelativetowith tests #138730inspect.formatannotationrelativetowith tests (GH-138730) #138747inspect.formatannotationrelativetowith tests (GH-138730) #138748