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
We have used the overload decorator to provide more specific type hints in several places, e.g. in kernels.ScalarValuedKernel, but these are not rendered by Sphinx. Instead, Sphinx just shows the generic Union of several possible types. Moreover, if we rely on overload with class inheritance, no annotations are compiled at all, e.g. kernels.scalar_valued.SquaredExponentialKernel.compute_elementwise.
overload with class inheritance should work as of Python 3.12 - I'm unsure about earlier Python versions. Sphinx issues from a few years ago (pre-Python 3.12) also suggest this should work.
How can we reproduce the issue?
Compile documentation and look at classes mentioned above.
Python version
3.12
Package version
0.2.1
Operating system
Windows
Other packages
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
tp832944
added
bug
Something isn't working
new
Something yet to be discussed by development team
documentation
Improvements or additions to documentation
and removed
new
Something yet to be discussed by development team
labels
Oct 2, 2024
What's the problem?
We have used the
overload
decorator to provide more specific type hints in several places, e.g. inkernels.ScalarValuedKernel
, but these are not rendered by Sphinx. Instead, Sphinx just shows the genericUnion
of several possible types. Moreover, if we rely onoverload
with class inheritance, no annotations are compiled at all, e.g.kernels.scalar_valued.SquaredExponentialKernel.compute_elementwise
.overload
with class inheritance should work as of Python 3.12 - I'm unsure about earlier Python versions. Sphinx issues from a few years ago (pre-Python 3.12) also suggest this should work.How can we reproduce the issue?
Compile documentation and look at classes mentioned above.
Python version
3.12
Package version
0.2.1
Operating system
Windows
Other packages
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: