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

Add static typing support #1302

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Add static typing support #1302

wants to merge 14 commits into from

Conversation

headtr1ck
Copy link

@headtr1ck headtr1ck commented Dec 15, 2023

Closes: #1298

Lots of this PR was stolen from #1279

Notice: I intentionally reversed the import behavior of __init__.py and _netCDF4.pyx in the stubs. This should be more in line in how people are using netCDF4. And while doing so I also removed the "._netCDF4" part of the classname in the reprs.

The current typing is working with python 3.11.
TODO:

  • Make typing pass with python 3.8 (aka. minimum supported version)

@CLAassistant
Copy link

CLAassistant commented Dec 15, 2023

CLA assistant check
All committers have signed the CLA.

@jswhit
Copy link
Collaborator

jswhit commented Dec 29, 2023

Thanks! Looks good - but why did you add a new workflow to run stubtest, instead of adding the extra test to the existing workflows?

@headtr1ck
Copy link
Author

why did you add a new workflow to run stubtest, instead of adding the extra test to the existing workflows?

Good question. I just took the changes from the previous PR #1279

After the holidays I can continue to work on this and use the existing workflows.

@jswhit
Copy link
Collaborator

jswhit commented Dec 29, 2023

Looks you like need to add git submodule update --init --recursive after the git clone in stubtest.yml.

@Woefie
Copy link

Woefie commented Jun 6, 2024

I was the author of #1279 , something went wrong with my pr and when I noticed this one was already made. Which is perfectly fine but now this pr has been dead for 5 months.
The only problem I see now with this pr is that mypy was not installed in the the workflow. Could this just be added and move on?
and merge latest version in this branch

@headtr1ck
Copy link
Author

Hey, I was just very busy the last months.
I can try to get it to work the next days.

And thanks for your initial work, it was very helpful to get started.

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

Successfully merging this pull request may close these issues.

Add static type hints
4 participants