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

Replace Union[T, NoneType] in all type annotations by Optional[T]. #325

Closed
wants to merge 4 commits into from
Closed

Conversation

hhoppe
Copy link
Contributor

@hhoppe hhoppe commented Mar 20, 2021

This addresses #324

Also, uniformly removes prefix "typing." from type annotations, and replaces "NoneType" by "None",
so that the function signatures look more similar to those commonly found in source code.

hhoppe added 4 commits March 19, 2021 23:29
This addresses #324.

Also, uniformly removes prefix "typing." from type annotations, and replaces "NoneType" by "None",
so that the function signatures look more similar to those commonly found in source code.
@hhoppe
Copy link
Contributor Author

hhoppe commented Mar 20, 2021

@kernc Unfortunately it looks like we worked in parallel... :-) Interesting to compare the solutions and see many similarities. Please have a look to see if my efforts have useful ideas. Thanks.

@hhoppe
Copy link
Contributor Author

hhoppe commented Mar 20, 2021

The changes in my very last commit "Fix for flake8" d010147 is wrong. Sorry about that.

I did a checkout of 6bd00e1 and its output exactly reproduces what I had generated, so I'm happy with the changes in the main branch.

@kernc
Copy link
Member

kernc commented Mar 21, 2021

Sincere apologies. I went to investigate, and then I had half of it working and couldn't just throw it away. I also realized even existing nptyping. and NewType replacements didn't trigger when nested, so something had to be done.
Thanks for verifying.

@kernc kernc closed this in c2c1320 Mar 21, 2021
kernc added a commit to kernc/pdoc that referenced this pull request Jun 22, 2024
kernc added a commit to johann-petrak/pdoc that referenced this pull request Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants