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

TYP: privatize type alias in pandas/util/_decorators.py #29882

Conversation

simonjayhawkins
Copy link
Member

broken off #28339

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@simonjayhawkins simonjayhawkins added the Typing type annotations, mypy/pyright type checking label Nov 27, 2019
@jreback
Copy link
Contributor

jreback commented Nov 27, 2019

why do you think privatizing this is warranted? (other parts are ok)

@simonjayhawkins
Copy link
Member Author

It was a mistake when first added. Type aliases added directly in modules are added or the purpose of type checking only and shouldn't be public.

They should be considered an implementation detail and subject to change without notice.

All aliases in typeshed are prefixed with an underscore.

@jreback
Copy link
Contributor

jreback commented Nov 27, 2019

It was a mistake when first added. Type aliases added directly in modules are added or the purpose of type checking only and shouldn't be public.

They should be considered an implementation detail and subject to change without notice.

All aliases in typeshed are prefixed with an underscore.

this entire module is private and this is inconsistent with the rest of the codebase where a type annotation is just a name; private just makes this harder to read.

@simonjayhawkins
Copy link
Member Author

so should I close this then?

@jreback
Copy link
Contributor

jreback commented Nov 27, 2019

so should I close this then?

i don't see any other changes? if so, yes

do we have this pattern elsewhere? we should be consistent about it (I think we mostly are already)

@simonjayhawkins
Copy link
Member Author

i don't see any other changes? if so, yes

one other minor change, i'll include in future PR instead.

do we have this pattern elsewhere?

just #29755 (comment), could be reverted.

used heavily in #28339, but will change as break bits off

we should be consistent about it

agreed. so this module being private is probably not relevant. We should not privatize aliases in any modules

(I think we mostly are already)

not really used many aliases outside of pd._typing yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants