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 types #358

Closed
Tracked by #359
paddyroddy opened this issue Oct 14, 2024 · 0 comments · Fixed by #368
Closed
Tracked by #359

Add static types #358

paddyroddy opened this issue Oct 14, 2024 · 0 comments · Fixed by #368
Assignees
Labels
enhancement New feature or request maintenance Maintenance: refactoring, typos, etc.

Comments

@paddyroddy
Copy link
Member

Is Your Feature Request Related to a Problem? Please Describe

I've split #280 up into two issues. This issue is for specifically adding static typing - and fixing some mypy errors where possible.

Describe the Solution You'd Like

No response

Describe Alternatives You've Considered

No response

Additional Context

No response

@paddyroddy paddyroddy added enhancement New feature or request maintenance Maintenance: refactoring, typos, etc. labels Oct 14, 2024
This was referenced Oct 14, 2024
paddyroddy added a commit that referenced this issue Oct 15, 2024
Adding `mypy` to a pre-existing codebase is never easy. I initially
attempted this in #308, but have since split this up into separate
issues:
- [x] #347
- [x] #356
- [ ] #358

In this PR, `mypy` is added but in order for CI to pass, the `# type:
ignore[]` syntax is used throughout. I didn't want to tackle these here
too (see #308) as it gets quite messy.

One thing I have done (following #356) is change every empty
`npt.NDArray` to `npt.NDArray[typing.Any]` (see #330), as this actually
results in fewer errors than leaving them all blank. Ideally, we'd like
to fill in as many of the `typing.Any` as possible - they're a bit
useless by themselves. However, that is not the priority for now. Plus,
I expect typing to change when #67 is tackled.
@paddyroddy paddyroddy self-assigned this Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request maintenance Maintenance: refactoring, typos, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant