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

Support docstrings that only have type declarations #127

Open
DanielNoord opened this issue Jul 6, 2022 · 1 comment
Open

Support docstrings that only have type declarations #127

DanielNoord opened this issue Jul 6, 2022 · 1 comment
Labels
bug Something isn't working style: Sphinx Issues related to Sphinx style docstrings: https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docs

Comments

@DanielNoord
Copy link
Owner

class A:
    attribute = 1
    """
    :type: Optional[int]
    """

This shouldn't get a period at the end of the line and probably also shouldn't be moved onto one single line.

@DanielNoord DanielNoord added bug Something isn't working style: Sphinx Issues related to Sphinx style docstrings: https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docs labels Jul 6, 2022
@Pierre-Sassoulas
Copy link
Collaborator

We should also decide what to do in this case:

class AstroidExample:
    def __init__(
        self,
        lineno=None,
    ):
        """
        :param lineno: The line that this node appears on in the source code
        :type lineno: int or None
        """

(i.e. not treat the first line as if it was a summary ?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working style: Sphinx Issues related to Sphinx style docstrings: https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docs
Projects
None yet
Development

No branches or pull requests

2 participants