Skip to content

Conversation

@twoertwein
Copy link
Member

small followup to #44233

@simonjayhawkins
Copy link
Member

Thanks @twoertwein

Any changes needed for the pre-commit check?

@simonjayhawkins simonjayhawkins added the Typing type annotations, mypy/pyright type checking label Nov 1, 2021
@simonjayhawkins simonjayhawkins added this to the 1.4 milestone Nov 1, 2021
@twoertwein
Copy link
Member Author

Do you think it makes sense to replace

numba = import_optional_dependency("numa")

with

import_optional_dependency("numa") import numba

Unfortunately, I didn't find a way to type import_optional_dependency (even with overloads, a module by itself is no type).

Any changes needed for the pre-commit check?

No, pre-commit just calls pyright same as for the CI.

@simonjayhawkins
Copy link
Member

I have a PR whch i'm just running the tests etc for before opening in which I use

 if TYPE_CHECKING: import numba else: numba = import_optional_dependency("numba")
@simonjayhawkins simonjayhawkins merged commit ca61bec into pandas-dev:master Nov 2, 2021
@simonjayhawkins
Copy link
Member

Thanks @twoertwein

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

3 participants