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

mypy stubs for non-trivial datatypes #178

Open
Kadam-Tushar opened this issue May 15, 2023 · 1 comment
Open

mypy stubs for non-trivial datatypes #178

Kadam-Tushar opened this issue May 15, 2023 · 1 comment
Labels
question Further information is requested

Comments

@Kadam-Tushar
Copy link
Contributor

Kadam-Tushar commented May 15, 2023

There are places in codebase like this where mypy won't be to detect variable's type and it will be termed as Any.

Screenshot 2023-05-16 at 2 21 02 AM

Are we planning to add any mypy stubs for such variables?
I am interested in this because in #124, one of the possible types of imagelab.info is pd.Series or pd.DataFrame but if we are not using stubs like pandas stubs then mypy will consider them (pd.Series) to Any datatype.

@Kadam-Tushar Kadam-Tushar added the question Further information is requested label May 15, 2023
@sanjanag
Copy link
Member

sanjanag commented May 15, 2023

Hi @Kadam-Tushar ! We are not using the pandas-stubs package because it only supports python>=3.8, whereas CleanVision currently also supports python 3.7. Also another point to note, as mentioned in the project readme the stubs are narrower than what pandas supports. We still want to add the types though, so that it is easier for new developers to understand the code and whenever we stop supporting 3.7 it is easier to use pandas-stubs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants