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
Is your feature request related to a problem? Please describe.
I realised that sometimes interphinx resolves typing.Optional into a link pointing to the docs and sometimes it doesn't. When it is used as a type hint in the class that is documented, everything works fine. When, on the other hand, the docstring is inherited from another class, then the type inside Optional is still resolved but not the Optional itself. This only applies to the type hint in the description, not in the signature. In the signature, everything works fine!
Describe the solution you'd like
I'd like that a link is introduced for Optional to point to typing.Optional in the Python docs via intersphinx. If that is not possible, I favor consistency over feature-richness.
Describe alternatives you've considered
I could add some code duplication so that no inheritance is necessary. That would be against several deisgn principles.
Is your feature request related to a problem? Please describe.
I realised that sometimes interphinx resolves typing.Optional into a link pointing to the docs and sometimes it doesn't. When it is used as a type hint in the class that is documented, everything works fine. When, on the other hand, the docstring is inherited from another class, then the type inside Optional is still resolved but not the
Optional
itself. This only applies to the type hint in the description, not in the signature. In the signature, everything works fine!Describe the solution you'd like
I'd like that a link is introduced for Optional to point to typing.Optional in the Python docs via intersphinx. If that is not possible, I favor consistency over feature-richness.
Describe alternatives you've considered
I could add some code duplication so that no inheritance is necessary. That would be against several deisgn principles.
Additional context
A very similar issue I have encountered when keyword arguments are documented, see #10776. There, however, I can bypass the same issue with using the py obj role. In this issue, however, I cannot do this. One example for this behavior can be seen in https://conflowgen.readthedocs.io/en/latest/api.html#conflowgen.ContainerFlowAdjustmentByVehicleTypeAnalysis
The text was updated successfully, but these errors were encountered: