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

Use of Type Hinting #39

Open
mts299 opened this issue Jun 2, 2023 · 3 comments
Open

Use of Type Hinting #39

mts299 opened this issue Jun 2, 2023 · 3 comments

Comments

@mts299
Copy link

mts299 commented Jun 2, 2023

Add parameter/return types when users include type hint in their code

@pixelneo
Copy link
Owner

pixelneo commented Jun 5, 2023

Hello, thank you for suggestion. The parameter types should already work with the :DocstringTypes command

def foo(A: list[dict[str, str]]) -> int:
    return 1

would get this docstring:

def foo(A: list[dict[str, str]]) -> int:
    """

    Args:
        A (list[dict[str, str]]):

    Returns:
        

    """
    return 1

I plan to include the return type as well.

@mts299
Copy link
Author

mts299 commented Jun 5, 2023

One other thing, does class documentation not include the methods?

If not I can make another issue if you want :)

I can try to help with coding or testing when I find more time, I really enjoy this plugin <3

@pixelneo
Copy link
Owner

pixelneo commented Jun 8, 2023

Sorry, for the delay...

🤔 you are correct, the class docstring does not contain methods (I use google docstring 99% of the time, which doesn't include it, so I haven't even considered it).

Yes, please create a new issue for this. Definitely, you can try to code the functionality, any MRs are welcome – I can help you with it if you want. (honestly, I don't know when I'll have time to write it myself – it will happen, just can't promise anything.)

Happy to hear, you enjoy the plugin ❤️

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

No branches or pull requests

2 participants