-
Notifications
You must be signed in to change notification settings - Fork 100
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
Property :rtype: is redundant #286
Comments
Which of these two is used by sphinx? |
Both appear in rendered sphinx. I'll post a screenshot when I get to a computer. |
The rst looks like: .. py:property:: FetchResponse.status_text
:module: pyodide.http
:type: str
Response status text
:rtype: str Which is rendered as:
I think it looks better with With both: With just the |
Yeah let's remove the return type here, PR welcome. |
Great, will do. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looking at the output, it seems that properties have redundant types. In the test suite,
a_property
is an example. Defined like:The test suite asserts that the type of the property is included in two places. This strikes me as redundant and slightly confusing: does a property really "return" a value? In my opinion, the abstraction makes it look like we are "accessing" the value rather than returning it. To be specific, I want the following change in the output.
I applied the following patch to do this:
Do people prefer the current behavior? If some people want the redundant property types, could we add a config option to opt out of it?
The text was updated successfully, but these errors were encountered: