Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
darglint
Discontinued A python documentation linter which checks that the docstring description matches the definition.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
But MyPy on strict is complaining that slow_add is missing a type annotation, after reading this issue you realize that @overload is only useful for users of your function but the body of your function will not be tested using @overload. Fortunately in the discussion on that issue there is an alternative example of how to implement:
Unfortunately 4 is fundamentally broken with tuples, I had to raise a ticket with pyright to understand why: https://github.com/microsoft/pyright/issues/4613/
That's what tools like darglint are for (yes, I'm aware darglint was recently moved to maintenance mode).
https://github.com/python/mypy same with typeshed https://github.com/python/typeshed
Another example is the third party library requests: https://github.com/psf/requests