Skip to content

Commit fe9a6cc

Browse files
committed
Add pyright ignore
1 parent 967c4b4 commit fe9a6cc

23 files changed

Lines changed: 4011 additions & 3521 deletions

File tree

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ workflows:
113113
name: python-<< matrix.python_version>>
114114
matrix:
115115
parameters:
116-
python_version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
116+
python_version: ["3.9", "3.10", "3.11", "3.12", "3.14"]
117117
pydantic_version: ["2.12"]
118118
httpx_version: ["0.28"]
119119
- test:
@@ -137,10 +137,10 @@ workflows:
137137
- circle-all:
138138
<<: *always-run
139139
requires:
140+
- python-3.9
140141
- python-3.10
141142
- python-3.11
142143
- python-3.12
143-
- python-3.13
144144
- python-3.14
145145

146146
- pydantic-2.6

foundry_sdk/v1/core/models.py

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
class AnyType(core.ModelBase):
2626
"""AnyType"""
2727

28-
type: typing.Literal["any"] = "any"
28+
type: typing.Literal["any"] = "any" # pyright: ignore[reportInvalidTypeForm]
2929

3030

3131
class AttachmentType(core.ModelBase):
3232
"""AttachmentType"""
3333

34-
type: typing.Literal["attachment"] = "attachment"
34+
type: typing.Literal["attachment"] = "attachment" # pyright: ignore[reportInvalidTypeForm]
3535

3636

3737
Attribution = str
@@ -41,28 +41,28 @@ class AttachmentType(core.ModelBase):
4141
class BinaryType(core.ModelBase):
4242
"""BinaryType"""
4343

44-
type: typing.Literal["binary"] = "binary"
44+
type: typing.Literal["binary"] = "binary" # pyright: ignore[reportInvalidTypeForm]
4545

4646

4747
class BooleanType(core.ModelBase):
4848
"""BooleanType"""
4949

50-
type: typing.Literal["boolean"] = "boolean"
50+
type: typing.Literal["boolean"] = "boolean" # pyright: ignore[reportInvalidTypeForm]
5151

5252

5353
class ByteType(core.ModelBase):
5454
"""ByteType"""
5555

56-
type: typing.Literal["byte"] = "byte"
56+
type: typing.Literal["byte"] = "byte" # pyright: ignore[reportInvalidTypeForm]
5757

5858

5959
class CipherTextType(core.ModelBase):
6060
"""CipherTextType"""
6161

62-
default_cipher_channel: typing.Optional[str] = pydantic.Field(alias=str("defaultCipherChannel"), default=None) # type: ignore[literal-required]
62+
default_cipher_channel: typing.Optional[str] = pydantic.Field(alias=str("defaultCipherChannel"), default=None) # type: ignore[literal-required] # pyright: ignore[reportInvalidTypeForm]
6363
"""An optional Cipher Channel RID which can be used for encryption updates to empty values."""
6464

65-
type: typing.Literal["cipherText"] = "cipherText"
65+
type: typing.Literal["cipherText"] = "cipherText" # pyright: ignore[reportInvalidTypeForm]
6666

6767

6868
ContentLength = core.Long
@@ -76,19 +76,19 @@ class CipherTextType(core.ModelBase):
7676
class DateType(core.ModelBase):
7777
"""DateType"""
7878

79-
type: typing.Literal["date"] = "date"
79+
type: typing.Literal["date"] = "date" # pyright: ignore[reportInvalidTypeForm]
8080

8181

8282
class DecimalType(core.ModelBase):
8383
"""DecimalType"""
8484

85-
precision: typing.Optional[int] = None
85+
precision: typing.Optional[int] = None # pyright: ignore[reportInvalidTypeForm]
8686
"""The total number of digits of the Decimal type. The maximum value is 38."""
8787

88-
scale: typing.Optional[int] = None
88+
scale: typing.Optional[int] = None # pyright: ignore[reportInvalidTypeForm]
8989
"""The number of digits to the right of the decimal point. The maximum value is 38."""
9090

91-
type: typing.Literal["decimal"] = "decimal"
91+
type: typing.Literal["decimal"] = "decimal" # pyright: ignore[reportInvalidTypeForm]
9292

9393

9494
DisplayName = str
@@ -112,7 +112,7 @@ class DecimalType(core.ModelBase):
112112
class DoubleType(core.ModelBase):
113113
"""DoubleType"""
114114

115-
type: typing.Literal["double"] = "double"
115+
type: typing.Literal["double"] = "double" # pyright: ignore[reportInvalidTypeForm]
116116

117117

118118
FilePath = str
@@ -129,7 +129,7 @@ class DoubleType(core.ModelBase):
129129
class FloatType(core.ModelBase):
130130
"""FloatType"""
131131

132-
type: typing.Literal["float"] = "float"
132+
type: typing.Literal["float"] = "float" # pyright: ignore[reportInvalidTypeForm]
133133

134134

135135
FolderRid = core.RID
@@ -143,19 +143,19 @@ class FloatType(core.ModelBase):
143143
class IntegerType(core.ModelBase):
144144
"""IntegerType"""
145145

146-
type: typing.Literal["integer"] = "integer"
146+
type: typing.Literal["integer"] = "integer" # pyright: ignore[reportInvalidTypeForm]
147147

148148

149149
class LongType(core.ModelBase):
150150
"""LongType"""
151151

152-
type: typing.Literal["long"] = "long"
152+
type: typing.Literal["long"] = "long" # pyright: ignore[reportInvalidTypeForm]
153153

154154

155155
class MarkingType(core.ModelBase):
156156
"""MarkingType"""
157157

158-
type: typing.Literal["marking"] = "marking"
158+
type: typing.Literal["marking"] = "marking" # pyright: ignore[reportInvalidTypeForm]
159159

160160

161161
MediaType = str
@@ -168,7 +168,7 @@ class MarkingType(core.ModelBase):
168168
class NullType(core.ModelBase):
169169
"""NullType"""
170170

171-
type: typing.Literal["null"] = "null"
171+
type: typing.Literal["null"] = "null" # pyright: ignore[reportInvalidTypeForm]
172172

173173

174174
OperationScope = str
@@ -198,7 +198,7 @@ class NullType(core.ModelBase):
198198
class ShortType(core.ModelBase):
199199
"""ShortType"""
200200

201-
type: typing.Literal["short"] = "short"
201+
type: typing.Literal["short"] = "short" # pyright: ignore[reportInvalidTypeForm]
202202

203203

204204
SizeBytes = core.Long
@@ -208,7 +208,7 @@ class ShortType(core.ModelBase):
208208
class StringType(core.ModelBase):
209209
"""StringType"""
210210

211-
type: typing.Literal["string"] = "string"
211+
type: typing.Literal["string"] = "string" # pyright: ignore[reportInvalidTypeForm]
212212

213213

214214
StructFieldName = str
@@ -218,7 +218,7 @@ class StringType(core.ModelBase):
218218
class TimestampType(core.ModelBase):
219219
"""TimestampType"""
220220

221-
type: typing.Literal["timestamp"] = "timestamp"
221+
type: typing.Literal["timestamp"] = "timestamp" # pyright: ignore[reportInvalidTypeForm]
222222

223223

224224
TotalCount = core.Long
@@ -236,9 +236,11 @@ class TimestampType(core.ModelBase):
236236
class UnsupportedType(core.ModelBase):
237237
"""UnsupportedType"""
238238

239-
unsupported_type: str = pydantic.Field(alias=str("unsupportedType")) # type: ignore[literal-required]
240-
params: typing.Dict[UnsupportedTypeParamKey, UnsupportedTypeParamValue]
241-
type: typing.Literal["unsupported"] = "unsupported"
239+
unsupported_type: str = pydantic.Field(alias=str("unsupportedType")) # type: ignore[literal-required] # pyright: ignore[reportInvalidTypeForm]
240+
params: typing.Dict[
241+
UnsupportedTypeParamKey, UnsupportedTypeParamValue
242+
] # pyright: ignore[reportInvalidTypeForm]
243+
type: typing.Literal["unsupported"] = "unsupported" # pyright: ignore[reportInvalidTypeForm]
242244

243245

244246
UnsupportedTypeParamKey = str

foundry_sdk/v1/datasets/models.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
class Branch(core.ModelBase):
2727
"""A Branch of a Dataset."""
2828

29-
branch_id: BranchId = pydantic.Field(alias=str("branchId")) # type: ignore[literal-required]
30-
transaction_rid: typing.Optional[TransactionRid] = pydantic.Field(alias=str("transactionRid"), default=None) # type: ignore[literal-required]
29+
branch_id: BranchId = pydantic.Field(alias=str("branchId")) # type: ignore[literal-required] # pyright: ignore[reportInvalidTypeForm]
30+
transaction_rid: typing.Optional[TransactionRid] = pydantic.Field(alias=str("transactionRid"), default=None) # type: ignore[literal-required] # pyright: ignore[reportInvalidTypeForm]
3131

3232

3333
BranchId = str
@@ -37,29 +37,29 @@ class Branch(core.ModelBase):
3737
class CreateBranchRequest(core.ModelBase):
3838
"""CreateBranchRequest"""
3939

40-
branch_id: BranchId = pydantic.Field(alias=str("branchId")) # type: ignore[literal-required]
41-
transaction_rid: typing.Optional[TransactionRid] = pydantic.Field(alias=str("transactionRid"), default=None) # type: ignore[literal-required]
40+
branch_id: BranchId = pydantic.Field(alias=str("branchId")) # type: ignore[literal-required] # pyright: ignore[reportInvalidTypeForm]
41+
transaction_rid: typing.Optional[TransactionRid] = pydantic.Field(alias=str("transactionRid"), default=None) # type: ignore[literal-required] # pyright: ignore[reportInvalidTypeForm]
4242

4343

4444
class CreateDatasetRequest(core.ModelBase):
4545
"""CreateDatasetRequest"""
4646

47-
name: DatasetName
48-
parent_folder_rid: core_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required]
47+
name: DatasetName # pyright: ignore[reportInvalidTypeForm]
48+
parent_folder_rid: core_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] # pyright: ignore[reportInvalidTypeForm]
4949

5050

5151
class CreateTransactionRequest(core.ModelBase):
5252
"""CreateTransactionRequest"""
5353

54-
transaction_type: typing.Optional[TransactionType] = pydantic.Field(alias=str("transactionType"), default=None) # type: ignore[literal-required]
54+
transaction_type: typing.Optional[TransactionType] = pydantic.Field(alias=str("transactionType"), default=None) # type: ignore[literal-required] # pyright: ignore[reportInvalidTypeForm]
5555

5656

5757
class Dataset(core.ModelBase):
5858
"""Dataset"""
5959

60-
rid: DatasetRid
61-
name: DatasetName
62-
parent_folder_rid: core_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required]
60+
rid: DatasetRid # pyright: ignore[reportInvalidTypeForm]
61+
name: DatasetName # pyright: ignore[reportInvalidTypeForm]
62+
parent_folder_rid: core_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] # pyright: ignore[reportInvalidTypeForm]
6363

6464

6565
DatasetName = str
@@ -73,25 +73,25 @@ class Dataset(core.ModelBase):
7373
class File(core.ModelBase):
7474
"""File"""
7575

76-
path: core_models.FilePath
77-
transaction_rid: TransactionRid = pydantic.Field(alias=str("transactionRid")) # type: ignore[literal-required]
78-
size_bytes: typing.Optional[core.Long] = pydantic.Field(alias=str("sizeBytes"), default=None) # type: ignore[literal-required]
79-
updated_time: core.AwareDatetime = pydantic.Field(alias=str("updatedTime")) # type: ignore[literal-required]
76+
path: core_models.FilePath # pyright: ignore[reportInvalidTypeForm]
77+
transaction_rid: TransactionRid = pydantic.Field(alias=str("transactionRid")) # type: ignore[literal-required] # pyright: ignore[reportInvalidTypeForm]
78+
size_bytes: typing.Optional[core.Long] = pydantic.Field(alias=str("sizeBytes"), default=None) # type: ignore[literal-required] # pyright: ignore[reportInvalidTypeForm]
79+
updated_time: core.AwareDatetime = pydantic.Field(alias=str("updatedTime")) # type: ignore[literal-required] # pyright: ignore[reportInvalidTypeForm]
8080

8181

8282
class ListBranchesResponse(core.ModelBase):
8383
"""ListBranchesResponse"""
8484

85-
next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required]
86-
data: typing.List[Branch]
85+
next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] # pyright: ignore[reportInvalidTypeForm]
86+
data: typing.List[Branch] # pyright: ignore[reportInvalidTypeForm]
8787
"""The list of branches in the current page."""
8888

8989

9090
class ListFilesResponse(core.ModelBase):
9191
"""A page of Files and an optional page token that can be used to retrieve the next page."""
9292

93-
next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required]
94-
data: typing.List[File]
93+
next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] # pyright: ignore[reportInvalidTypeForm]
94+
data: typing.List[File] # pyright: ignore[reportInvalidTypeForm]
9595

9696

9797
TableExportFormat = typing.Literal["ARROW", "CSV"]
@@ -101,13 +101,13 @@ class ListFilesResponse(core.ModelBase):
101101
class Transaction(core.ModelBase):
102102
"""An operation that modifies the files within a dataset."""
103103

104-
rid: TransactionRid
105-
transaction_type: TransactionType = pydantic.Field(alias=str("transactionType")) # type: ignore[literal-required]
106-
status: TransactionStatus
107-
created_time: core.AwareDatetime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required]
104+
rid: TransactionRid # pyright: ignore[reportInvalidTypeForm]
105+
transaction_type: TransactionType = pydantic.Field(alias=str("transactionType")) # type: ignore[literal-required] # pyright: ignore[reportInvalidTypeForm]
106+
status: TransactionStatus # pyright: ignore[reportInvalidTypeForm]
107+
created_time: core.AwareDatetime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] # pyright: ignore[reportInvalidTypeForm]
108108
"""The timestamp when the transaction was created, in ISO 8601 timestamp format."""
109109

110-
closed_time: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("closedTime"), default=None) # type: ignore[literal-required]
110+
closed_time: typing.Optional[core.AwareDatetime] = pydantic.Field(alias=str("closedTime"), default=None) # type: ignore[literal-required] # pyright: ignore[reportInvalidTypeForm]
111111
"""The timestamp when the transaction was closed, in ISO 8601 timestamp format."""
112112

113113

0 commit comments

Comments
 (0)