We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Table
By default, the repr for a Python class type is something like:
>>> repr(MyTable) <class 'my_app.tables.MyTable'>
It's a very common pattern in Piccolo and its sister libraries to have Table class types as default values:
# `SessionsBase` is a `Table` subclass: def session_auth( session_table: t.Type[SessionsBase] = SessionsBase ): ...
This looks terrible in Sphinx's autodoc output, as Python's default repr contains angled brackets, which breaks the HTML output.
So we just need to output the name instead. The user can still easily find which module a Table subclass belongs to by using MyTable.__module__.
MyTable.__module__
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
By default, the repr for a Python class type is something like:
It's a very common pattern in Piccolo and its sister libraries to have
Table
class types as default values:This looks terrible in Sphinx's autodoc output, as Python's default repr contains angled brackets, which breaks the HTML output.
So we just need to output the name instead. The user can still easily find which module a
Table
subclass belongs to by usingMyTable.__module__
.The text was updated successfully, but these errors were encountered: