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

Multiline types #56

Closed
jonyscathe opened this issue Aug 8, 2023 · 1 comment · Fixed by #58
Closed

Multiline types #56

jonyscathe opened this issue Aug 8, 2023 · 1 comment · Fixed by #58

Comments

@jonyscathe
Copy link

Hi,

I have a type that I am unable to not get a DOC105 for.

If I have something like:

def my_function(
    my_variable_1: int,
    my_variable_2: Literal[
        "option_1",
        "option_2",
        "option_3",
        "option_4",
        "option_5",
        "option_6",
    ],
) -> None:
    """
    Some random function.

    :param my_variable_1: Some integer that does something.
    :type my_variable_1: int
    :param my_variable_2: Some literal that does something.
    :type my_variable_2: Literal[
        "option_1",
        "option_2",
        "option_3",
        "option_4",
        "option_5",
        "option_6",
    ]
    """

And I can't quite work out how to get the type for `my_variable_2` to work.

Relevant settings I am using are:

skip-checking-short-docstrings = false
style = 'sphinx'


I am assuming there is some way I can structure that type for my_variable_2 that works, I just haven't quite figured it out yet.
@jsh9
Copy link
Owner

jsh9 commented Aug 12, 2023

Hi @jonyscathe , thank you very much for raising this issue! I have fixed this in a PR and the fix is published as version 0.1.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants