Skip to content

Commit

Permalink
Type annotation tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
scnerd committed Jun 3, 2024
1 parent 74c846b commit d969cb7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_basics.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import abc
import uuid
from typing import Optional
from typing import Type

import pytest

Expand All @@ -21,7 +23,7 @@ class User(_BaseTableModel):
__table_name__ = "user"
__str_id_field__ = "name"
name: str
group_id: uuid.UUID | None = None
group_id: Optional[uuid.UUID] = None


class Group(_BaseTableModel):
Expand All @@ -31,7 +33,7 @@ class Group(_BaseTableModel):


@pytest.fixture(scope="function", autouse=True)
def recreate_pynamodb_table() -> type[SingleTableBaseModel]:
def recreate_pynamodb_table() -> Type[SingleTableBaseModel]:
_BaseTableModel.__pynamodb_model__.create_table(
wait=True, billing_mode="PAY_PER_REQUEST"
)
Expand Down

0 comments on commit d969cb7

Please sign in to comment.