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

Type annotations #82

Merged
merged 27 commits into from
Sep 8, 2022
Merged

Type annotations #82

merged 27 commits into from
Sep 8, 2022

Conversation

orsinium
Copy link
Member

@orsinium orsinium commented Jun 29, 2022

The PR introduces type annotations for everything. It's a lot of tedious manual work (despite the fact that I've bootstrapped the process with infer-types), so I might've made mistakes. If there is a type annotation that you think is wrong, contributions are welcome.

One thing to keep in mind is that the library, being one of my first projects, doesn't follow Liskov substitution principle. That means subclasses of the base class are contravariants of it. In other words, I wouldn't recommend using the base class of any algorithm as a type annotation. Also, it means that some annotations are too forgiving and aren't precise enough.

@orsinium orsinium merged commit c9fbf57 into master Sep 8, 2022
@orsinium orsinium deleted the type-annotations branch September 8, 2022 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant