Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

jorenham/optype

Repository files navigation

optype

Building blocks for precise type hints

GitHub * Installation * Getting Started * API Reference * Changelog

Stop fighting your type checker -- work with it.
optype gives you single-method protocols for every dunder, exact types that reject sneaky subtypes, and typed operators that actually make sense -- so you can express what your code really accepts.

Zero dependencies. Works with every modern type checker. Optional NumPy support included. Battle tested.

Visit the documentation at jorenham.github.io/optype.

About

Opinionated typing package for precise type hints in Python

Topics

Resources

Readme

License

BSD-3-Clause license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy

Stars

Watchers

Forks

Sponsor this project

Contributors

Languages