Skip to content

Commit

Permalink
fix: mypy in 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Michał Sośnicki committed Nov 28, 2024
1 parent 4726ae0 commit 4766351
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/neptune_api/proto/descriptor_pool.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from typing import Optional
from google.protobuf import descriptor_pool

_DEFAULT_POOL: descriptor_pool.DescriptorPool = descriptor_pool.Default()
_LOCAL_POOL: descriptor_pool.DescriptorPool | None = None
_LOCAL_POOL: Optional[descriptor_pool.DescriptorPool] = None


if _LOCAL_POOL is None:
Expand Down
4 changes: 3 additions & 1 deletion src/neptune_retrieval_api/proto/descriptor_pool.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from typing import Optional

from google.protobuf import descriptor_pool

_DEFAULT_POOL: descriptor_pool.DescriptorPool = descriptor_pool.Default()
_LOCAL_POOL: descriptor_pool.DescriptorPool | None = None
_LOCAL_POOL: Optional[descriptor_pool.DescriptorPool] = None


if _LOCAL_POOL is None:
Expand Down
6 changes: 0 additions & 6 deletions tests/unit/test_protobuf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
)


def test_hmm():
assert list(inspect.getmembers(common_pb2, lambda x: inspect.isclass(x) and issubclass(x, message.Message))) == [
"hmm"
]


@pytest.mark.parametrize(
"cls",
[cls for _, cls in inspect.getmembers(common_pb2, lambda x: inspect.isclass(x) and issubclass(x, message.Message))],
Expand Down

0 comments on commit 4766351

Please sign in to comment.