diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/Android.bp | 5 | ||||
-rwxr-xr-x | python/_build/protoc-gen-custom_grpc | 8 | ||||
-rw-r--r-- | python/pandora/__init__.py | 2 | ||||
-rw-r--r-- | python/pyproject.toml | 24 |
4 files changed, 35 insertions, 4 deletions
diff --git a/python/Android.bp b/python/Android.bp index 21e3dd0..a356076 100644 --- a/python/Android.bp +++ b/python/Android.bp @@ -49,6 +49,10 @@ genrule { "pandora/host_grpc_aio.py", "pandora/host_pb2.py", "pandora/host_pb2.pyi", + "pandora/l2cap_grpc.py", + "pandora/l2cap_grpc_aio.py", + "pandora/l2cap_pb2.py", + "pandora/l2cap_pb2.pyi", "pandora/security_grpc.py", "pandora/security_grpc_aio.py", "pandora/security_pb2.py", @@ -72,6 +76,7 @@ filegroup { ":pandora-python-gen-src{pandora/py.typed}", ":pandora-python-gen-src{pandora/a2dp_pb2.pyi}", ":pandora-python-gen-src{pandora/host_pb2.pyi}", + ":pandora-python-gen-src{pandora/l2cap_pb2.pyi}", ":pandora-python-gen-src{pandora/security_pb2.pyi}", ], } diff --git a/python/_build/protoc-gen-custom_grpc b/python/_build/protoc-gen-custom_grpc index 7f6a381..2071a65 100755 --- a/python/_build/protoc-gen-custom_grpc +++ b/python/_build/protoc-gen-custom_grpc @@ -16,6 +16,8 @@ """Custom mmi2grpc gRPC compiler.""" +from __future__ import annotations + import os import sys @@ -144,10 +146,10 @@ def collect_field(imports: List[str], message: DescriptorProto, field: FieldDesc def collect_message(imports: List[str], message: DescriptorProto, local: Optional[FileDescriptorProto]) -> Tuple[ List[Tuple[str, str, str]], - Dict[str, list[Tuple[str, str]]], + Dict[str, List[Tuple[str, str]]], ]: fields: List[Tuple[str, str, str]] = [] - oneof: Dict[str, list[Tuple[str, str]]] = {} + oneof: Dict[str, List[Tuple[str, str]]] = {} for field in message.field: idx, name, type, dft, dft_import = collect_field(imports, message, field, local) @@ -455,6 +457,8 @@ _HEADER = '''# Copyright 2022 Google LLC _UTILS_PY = f'''{_HEADER} +from __future__ import annotations + import asyncio import queue import grpc diff --git a/python/pandora/__init__.py b/python/pandora/__init__.py index bc983a5..7f180dd 100644 --- a/python/pandora/__init__.py +++ b/python/pandora/__init__.py @@ -14,4 +14,4 @@ """Pandora gRPC Bluetooth test interfaces.""" -__version__ = "0.0.3" +__version__ = "0.0.4" diff --git a/python/pyproject.toml b/python/pyproject.toml index 6b4a236..0e82566 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -6,17 +6,39 @@ dynamic = ["version", "description"] classifiers = [ "License :: OSI Approved :: Apache Software License" ] -dependencies = ["protobuf>=4.22.0"] +dependencies = [ + "grpcio==1.57", + "protobuf>=4.22.0" +] [project.urls] Source = "https://github.com/google/bt-test-interfaces" +[project.optional-dependencies] +dev = [ + "pyright==1.1.298", + "types-psutil==5.9.5.16", + "types-setuptools==68.1.0.1", + "types-protobuf==4.24.0.1" +] + [tool.flit.module] name = "pandora" [tool.flit.sdist] include = ["_build", ".."] +[tool.pyright] +include = ["pandora"] +exclude = ["**/__pycache__", "**/*_pb2.py"] +typeCheckingMode = "strict" +useLibraryCodeForTypes = true +verboseOutput = false +reportMissingTypeStubs = false +reportUnknownLambdaType = false +reportImportCycles = false +reportPrivateUsage = false + [build-system] requires = ["flit_core==3.7.1", "grpcio-tools>=1.51.1"] build-backend = "_build.backend" |