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 type hints #409

Open
leotrs opened this issue Jun 21, 2023 · 1 comment
Open

Add type hints #409

leotrs opened this issue Jun 21, 2023 · 1 comment

Comments

@leotrs
Copy link
Collaborator

leotrs commented Jun 21, 2023

There are many benefits to type hints that we can go over our next call. I've been holding off on proposing type hints until now because the main classes were still in flux.

However, I recently found a bug (#406) that is exactly the kind of bug that can be caught early when using type hints. I'm sure there are others we haven't caught yet.

Migrating the entire library to type hints is laborious but I can take on that challenge.

@nwlandry
Copy link
Collaborator

nwlandry commented Jun 1, 2024

I don't know if this would be a bad idea, but the typing module provides support for the @overload decorator which could be used to differentiate between different class names, like Hypergraph and SimplicialComplex for example.

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

No branches or pull requests

2 participants