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

Convert typehints within docstrings to proper in-code typings #2121

Open
Darylgolden opened this issue Oct 1, 2021 · 11 comments
Open

Convert typehints within docstrings to proper in-code typings #2121

Darylgolden opened this issue Oct 1, 2021 · 11 comments
Assignees
Labels
enhancement Additions and improvements in general good first issue Good for newcomers hacktoberfest

Comments

@Darylgolden
Copy link
Member

Enhancement proposal

Currently, there are many instances of type hints being provided within docstrings - at Paragraph, for example. This has the disadvantage of not being able to be read by IDEs. Since we've standardized all new PRs to use in-code typings since a while back, the old ones should also be changed. A good example of properly implemented typings can be found here, for instance.

This is far too broad an issue to be resolved by a single PR, so I recommend fixing around one file per PR.

Additional comments

@Darylgolden Darylgolden added enhancement Additions and improvements in general hacktoberfest good first issue Good for newcomers labels Oct 1, 2021
@behackl behackl pinned this issue Oct 1, 2021
@monalisha31
Copy link

@Darylgolden I would like to work on this issue.

@Darylgolden
Copy link
Member Author

@Darylgolden I would like to work on this issue.

Go ahead!

@dhgoratela
Copy link
Contributor

Hi @Darylgolden Can I get a list of all the files which have to be changed?

@dhgoratela
Copy link
Contributor

I would like to work on this issue

@Darylgolden
Copy link
Member Author

I would like to work on this issue

Hi @dhgoratela, unfortunately we don't have such a list. You can probably find many instances just looking through the files.

@Davidy22
Copy link
Contributor

Davidy22 commented Oct 7, 2021

Did a quick run through of mypy --follow-imports=skip, output here. Maybe mypy missed some stuff, but probably this is the full list of stuff that needs typing done.

@dhgoratela
Copy link
Contributor

Le me do that. Thanks @Davidy22 for the info!

@Davidy22
Copy link
Contributor

Davidy22 commented Oct 7, 2021

Also I feel like this issue sort of overlaps with #52. If we're using tools to find files to fix up for #52, they'll catch the files that only have docstring types anyways.

@dhgoratela
Copy link
Contributor

Okay shall check that for more understanding

@madt2709
Copy link

I think this issue can be closed right?

@NotWearingPants
Copy link
Contributor

I think this issue can be closed right?

All the parameters are gone, but there are still return types and attribute types in docstrings.

The problem with return types is that the documentation doesn't seem to pick up on the return type hint, so I don't want to convert everything at the cost of ruining the docs.

The attribute types are doable I think.

@Viicos Viicos mentioned this issue Sep 22, 2023
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Additions and improvements in general good first issue Good for newcomers hacktoberfest
Projects
Status: 🆕 New
Development

No branches or pull requests

6 participants