Skip to content
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

Docstrings problem #427

Closed
RSully opened this issue Jul 22, 2016 · 25 comments
Closed

Docstrings problem #427

RSully opened this issue Jul 22, 2016 · 25 comments
Labels

Comments

@RSully
Copy link

RSully commented Jul 22, 2016

I'm using PyCharm for my development environment. I noticed that your code is rather well documented using docstrings. For example:

    def get_user(self, login=github.GithubObject.NotSet):
        """
        :calls: `GET /users/:user <http://developer.github.com/v3/users>`_ or `GET /user <http://developer.github.com/v3/users>`_
        :param login: string
        :rtype: :class:`github.NamedUser.NamedUser`
        """

However, this seems to not be the appropriate syntax, as my IDE still thinks the result could be Any. However, if I remove the :class:, it works properly. Could you send me any links that point to the :class: standard? I am going off of this.

@sfdye sfdye added the question label Apr 9, 2018
@stale
Copy link

stale bot commented Jul 5, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 5, 2018
@sfdye sfdye added stale and removed wontfix labels Jul 12, 2018
@stale stale bot removed the stale label Jul 12, 2018
@stale
Copy link

stale bot commented Sep 10, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 10, 2018
@RSully
Copy link
Author

RSully commented Sep 11, 2018

There has been no change or answer. Do not auto-close.

@stale stale bot removed the stale label Sep 11, 2018
@stale
Copy link

stale bot commented Nov 10, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added stale and removed stale labels Nov 10, 2018
@stale
Copy link

stale bot commented Jan 9, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added stale and removed stale labels Jan 9, 2019
@stale
Copy link

stale bot commented Mar 11, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added stale and removed stale labels Mar 11, 2019
@stale
Copy link

stale bot commented May 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added stale and removed stale labels May 10, 2019
@stale
Copy link

stale bot commented Jul 12, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added stale and removed stale labels Jul 12, 2019
@s-t-e-v-e-n-k
Copy link
Collaborator

It's hinting for our docs build -- see https://pygithub.readthedocs.io/en/latest/github_objects/Branch.html#github.Branch.Branch.get_required_status_checks, without the :class: it doesn't link the return type to the class.

@RSully
Copy link
Author

RSully commented Jul 23, 2019

Is it possible that during the 3 years since this issue was filed that the syntax has changed? More-so, I was more interested in finding a link to the documentation that shows it is necessary (not a link to where your docs show it in us), as - at least 3 years ago (to the day, no less!) - this syntax broke PyCharm. I imagine it must be standardized by now.

PS: I must say I am quite surprised to see any activity on this, me and stale bot have become quite good friends in the meantime 😊

@s-t-e-v-e-n-k
Copy link
Collaborator

It's possible the syntax has changed, but I can't find any documentation for Sphinx about it, and it works, so I'm loathe to change it. Also, it pre-dates my involvement in the project, so that goes double.

@stale
Copy link

stale bot commented Sep 21, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 21, 2019
@stale
Copy link

stale bot commented Nov 20, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added stale and removed stale labels Nov 20, 2019
@stale
Copy link

stale bot commented Jan 20, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added stale and removed stale labels Jan 20, 2020
@stale
Copy link

stale bot commented Mar 22, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 22, 2020
@RSully
Copy link
Author

RSully commented Mar 26, 2020

Why don't other issues get marked as stale? Can we untag this as a question?

@stale stale bot removed the stale label Mar 26, 2020
@RSully RSully changed the title Docstrings question Docstrings problem Mar 26, 2020
@s-t-e-v-e-n-k
Copy link
Collaborator

Ah ha, I found the documentation. https://www.sphinx-doc.org/en/1.5/domains.html#python-roles

Have you considered filing a bug against PyCharm for this?

@stale
Copy link

stale bot commented May 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 25, 2020
@RSully
Copy link
Author

RSully commented May 25, 2020

From what I can tell, the :class: syntax is to create a link to a class within Sphinx documentation, not to actually designate a return type in :rtype:.

For example, I would expect this is how it would be used (not tested):

:rtype: github.NamedUser.NamedUser The rest of this text is describing the return type and may contain links to other classes like :class:`github.CommitStatus.CommitStatus` which would show up in the Sphinx documentation.

@stale stale bot removed the stale label May 25, 2020
@stale
Copy link

stale bot commented Jul 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added stale and removed stale labels Jul 25, 2020
@stale
Copy link

stale bot commented Oct 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 4, 2020
@Croydon
Copy link

Croydon commented Oct 4, 2020

Hi! This is my generic reply for every issue which is still relevant and is on the edge of getting closed by a stale bot.

@stale stale bot removed the stale label Oct 4, 2020
@stale
Copy link

stale bot commented Dec 19, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added stale and removed stale labels Dec 19, 2020
@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 9, 2022
@stale stale bot closed this as completed Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants