Spaces:
Running
Running
alessandro trinca tornidor
commited on
Commit
·
81de16f
1
Parent(s):
a9d20b4
fix: avoid exception on python3.10
Browse files
aip_trainer/utils/typing_hints.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
from typing import Annotated, Optional
|
2 |
from pydantic import BaseModel
|
3 |
|
4 |
import annotated_types
|
5 |
|
6 |
|
7 |
-
|
8 |
|
9 |
|
10 |
class BodyGetSampleRequest(BaseModel):
|
|
|
1 |
+
from typing import Annotated, Optional, TypeAlias
|
2 |
from pydantic import BaseModel
|
3 |
|
4 |
import annotated_types
|
5 |
|
6 |
|
7 |
+
Category: TypeAlias = Annotated[int, annotated_types.Ge(0), annotated_types.Le(4)]
|
8 |
|
9 |
|
10 |
class BodyGetSampleRequest(BaseModel):
|