The SDK already contains inline type annotations, but the published package does not include a py.typed marker. As a result, type checkers ignore these annotations when the SDK is installed as a dependency.
Proposed changes:
- Add
ydb/py.typed to both wheel and source distributions.
- Add the
Typing :: Typed package classifier.
- Enable
no_implicit_optional and disallow_untyped_decorators in mypy.
- Fix annotations that fail under these stricter checks.
- Preserve decorated function signatures instead of exposing them as generic
Callable[..., Any].
- Correct the public
scan_query annotations to accept both query strings and ScanQuery objects, with parameters provided as a mapping.
- Exclude generated protobuf modules from SDK-level mypy checks.
I can take this on and prepare a PR within a few days.
I’d also be happy to work on improving the package’s typing from time to time and gradually address other typing issues as they come up.
The SDK already contains inline type annotations, but the published package does not include a
py.typedmarker. As a result, type checkers ignore these annotations when the SDK is installed as a dependency.Proposed changes:
ydb/py.typedto both wheel and source distributions.Typing :: Typedpackage classifier.no_implicit_optionalanddisallow_untyped_decoratorsin mypy.Callable[..., Any].scan_queryannotations to accept both query strings andScanQueryobjects, with parameters provided as a mapping.I can take this on and prepare a PR within a few days.
I’d also be happy to work on improving the package’s typing from time to time and gradually address other typing issues as they come up.