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

Enable basic type checking #40

Open
qartik opened this issue Feb 1, 2024 · 2 comments
Open

Enable basic type checking #40

qartik opened this issue Feb 1, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@qartik
Copy link
Collaborator

qartik commented Feb 1, 2024

With my PR #37 I presumed there was some basic type checking in place in the development branch, turns out I was mistaken.

It will be nice to enable it using mypy starting with the default config.

I'm happy to work on it in spare time.

Have a WIP PR at #41.

@qartik qartik added the enhancement New feature or request label Feb 1, 2024
@qciaran
Copy link
Collaborator

qciaran commented Feb 9, 2024

Yeah, I would like to eventually to start adding mypy and stricter types. I would be curious to learn how these types are being used/affect pytket-phir.

FYI, I am considering changing some of the typing for the inputs to HybridEngine to use classes that inherit from typing.Protocol because all I really want is duck typing there and not to enforce an ABC. However, I am not super familiar with it, but it seems to fit my intent more (to allow users to supply anything that supports a certain interface).

@qciaran
Copy link
Collaborator

qciaran commented Feb 9, 2024

Also, FYI, the Generic* classes are not meant to serve as base types but to be a generic example of the ABCs.

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

No branches or pull requests

2 participants