Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
dmontagu committed Nov 15, 2023
1 parent 582e3d0 commit 4fa2bd0
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
10 changes: 9 additions & 1 deletion tests/mypy/modules/success.py
Expand Up @@ -6,7 +6,7 @@
import os
from datetime import date, datetime, timedelta, timezone
from pathlib import Path, PurePath
from typing import Any, Dict, ForwardRef, Generic, List, Optional, Type, TypeVar
from typing import Any, ClassVar, Dict, ForwardRef, Generic, List, Optional, Type, TypeVar
from uuid import UUID

from typing_extensions import Annotated, TypedDict
Expand Down Expand Up @@ -300,3 +300,11 @@ def double(value: Any, handler: Any) -> int:

class WrapValidatorModel(BaseModel):
x: Annotated[int, WrapValidator(double)]


class Abstract(BaseModel):
class_id: ClassVar


class Concrete(Abstract):
class_id = 1
10 changes: 9 additions & 1 deletion tests/mypy/outputs/1.0.1/mypy-default_ini/success.py
Expand Up @@ -6,7 +6,7 @@
import os
from datetime import date, datetime, timedelta, timezone
from pathlib import Path, PurePath
from typing import Any, Dict, ForwardRef, Generic, List, Optional, Type, TypeVar
from typing import Any, ClassVar, Dict, ForwardRef, Generic, List, Optional, Type, TypeVar
from uuid import UUID

from typing_extensions import Annotated, TypedDict
Expand Down Expand Up @@ -306,3 +306,11 @@ def double(value: Any, handler: Any) -> int:

class WrapValidatorModel(BaseModel):
x: Annotated[int, WrapValidator(double)]


class Abstract(BaseModel):
class_id: ClassVar


class Concrete(Abstract):
class_id = 1
10 changes: 9 additions & 1 deletion tests/mypy/outputs/1.0.1/pyproject-default_toml/success.py
Expand Up @@ -6,7 +6,7 @@
import os
from datetime import date, datetime, timedelta, timezone
from pathlib import Path, PurePath
from typing import Any, Dict, ForwardRef, Generic, List, Optional, Type, TypeVar
from typing import Any, ClassVar, Dict, ForwardRef, Generic, List, Optional, Type, TypeVar
from uuid import UUID

from typing_extensions import Annotated, TypedDict
Expand Down Expand Up @@ -306,3 +306,11 @@ def double(value: Any, handler: Any) -> int:

class WrapValidatorModel(BaseModel):
x: Annotated[int, WrapValidator(double)]


class Abstract(BaseModel):
class_id: ClassVar


class Concrete(Abstract):
class_id = 1

0 comments on commit 4fa2bd0

Please sign in to comment.