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 to pysmt code #780

Open
enmag opened this issue Jul 17, 2024 · 2 comments
Open

Add type-hints to pysmt code #780

enmag opened this issue Jul 17, 2024 · 2 comments

Comments

@enmag
Copy link
Contributor

enmag commented Jul 17, 2024

Python has added support for type-hints in version 3.5; which has now reached end-of-life.

In my opinion, type-hints make it easier to read the code and also enable a number of static checks.
What do you think?

If we want to go fancy, there are a number of different formats / libraries that support the definition of contracts (mostly pre-post conditions and invariants e.g. PEP 316, deal).

@mikand
Copy link
Contributor

mikand commented Jul 18, 2024

I fully agree that adding type hints would be great! The only reason we do not have them (yet) is that we started pysmt with python 2.7 and we never had time to introduce them afterwards...

@enmag
Copy link
Contributor Author

enmag commented Aug 11, 2024

Here is my first attempt: #782

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