Skip to content

Commit 83d08f7

Browse files
authored
use Strict types and go from most strict to less strict (#2081)
1 parent c19ebb0 commit 83d08f7

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

packages/models-library/src/models_library/projects_nodes.py

+26-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,17 @@
44

55
from typing import Dict, List, Optional, Union
66

7-
from pydantic import BaseModel, Extra, Field, HttpUrl, constr, validator
7+
from pydantic import (
8+
BaseModel,
9+
Extra,
10+
Field,
11+
HttpUrl,
12+
StrictBool,
13+
StrictFloat,
14+
StrictInt,
15+
constr,
16+
validator,
17+
)
818

919
from .basic_regex import VERSION_RE
1020
from .projects_access import AccessEnum
@@ -20,10 +30,23 @@
2030
from .services import PROPERTY_KEY_RE, SERVICE_KEY_RE
2131

2232
InputTypes = Union[
23-
int, bool, str, float, PortLink, SimCoreFileLink, DatCoreFileLink, DownloadLink
33+
StrictBool,
34+
StrictInt,
35+
StrictFloat,
36+
str,
37+
PortLink,
38+
SimCoreFileLink,
39+
DatCoreFileLink,
40+
DownloadLink,
2441
]
2542
OutputTypes = Union[
26-
int, bool, str, float, SimCoreFileLink, DatCoreFileLink, DownloadLink
43+
StrictBool,
44+
StrictInt,
45+
StrictFloat,
46+
str,
47+
SimCoreFileLink,
48+
DatCoreFileLink,
49+
DownloadLink,
2750
]
2851

2952
InputID = OutputID = constr(regex=PROPERTY_KEY_RE)

0 commit comments

Comments
 (0)