-
-
Notifications
You must be signed in to change notification settings - Fork 107
Support autodoc_type_aliases configuration #459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support autodoc_type_aliases configuration #459
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…uma-lsuhsc/sphinx-autodoc-typehints into support_autodoc_type_aliases
@gaborbernat - Could you help me sort out the tox env type check errors? I'm getting
I got the last one, but not clear about the others. I created the test file by copying then stripping away existing tests of the |
Nothing jumps out for me from the top of my head. 🤔 |
OK. I'll look into it when I get home tonight. |
Head branch was pushed to by a user without write access
Resolved the issue (I think). The test file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR addresses Issues #284.
Currently,
autodoc-typehints
does not honor theautodoc_type_aliases
configuration ofsphinx.ext.autodoc
. For example,renders
even if
autodoc_type_aliases = {'ArrayLike': 'ArrayLike'}
line inconf.py
.I modified
autodoc_typehints
to passapp.config.autodoc_type_aliases
tosphinx_signature()
calls to matchsphinx.ext.autodoc
and print the alias instead of the annotation as discovered.test_integration_autodoc_type_aliases.py
is a simple pytest script to check the conservation ofArrayLike
annotation in a function argument.