You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, for mypy 0.770, sphinx 3.5.2, their requirements for typehints are contradictory.
In order for typehints to hyperlink properly in the docs, sphinx needs from __future__ import annotations and, in some cases, fully qualified type names (with all the outer namespaces present).
On the other hand, mypy does not need the __future__ import (and, in fact, not having it adds a compile-time check that the types are available), and does not handle fully qualified type names correctly.
The current choice is to side with Sphinx since the documentation is more important. Perhaps it will be resolved in future versions (e.g. Sphinx 4.0).
The text was updated successfully, but these errors were encountered:
Currently, for
mypy
0.770,sphinx
3.5.2, their requirements for typehints are contradictory.In order for typehints to hyperlink properly in the docs,
sphinx
needsfrom __future__ import annotations
and, in some cases, fully qualified type names (with all the outer namespaces present).On the other hand,
mypy
does not need the__future__
import (and, in fact, not having it adds a compile-time check that the types are available), and does not handle fully qualified type names correctly.The current choice is to side with Sphinx since the documentation is more important. Perhaps it will be resolved in future versions (e.g. Sphinx 4.0).
The text was updated successfully, but these errors were encountered: