[New-bugs-announce] [issue36810] Recursive type annotations do not work in documentation tests

Lovasoa report at bugs.python.org
Mon May 6 03:34:51 EDT 2019


New submission from Lovasoa <pere.jobs at gmail.com>:

When using documentations tests to test a function that uses typing.get_type_hints, an error is thrown.

The error is thrown when trying to get the type hints for a class that was defined in a documentation test.

I was able to reproduce it both on current and PEP563 type annotations: https://gist.github.com/lovasoa/74ea62a89f5bf073b0e0c2f222008ae3

----------
components: Interpreter Core
files: test_recursive.py
messages: 341489
nosy: lovasoa
priority: normal
severity: normal
status: open
title: Recursive type annotations do not work in documentation tests
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file48302/test_recursive.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36810>
_______________________________________


More information about the New-bugs-announce mailing list