You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: replace mypy with pyrefly type checker for testing
- Replace mypy dependency with pyrefly ^0.26.0
- Update CI workflow from mypy-check to pyrefly-check
- Update type-check Poe task to use pyrefly
- Add pyrefly configuration with python_version and project_excludes
- Use pyrefly --suppress-errors to auto-add noqa comments for legacy code
- Test integration shows 0 errors with 530 ignored violations
Co-Authored-By: AJ Steers <[email protected]>
Copy file name to clipboardExpand all lines: airbyte_cdk/destinations/vector_db_based/config.py
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ class SeparatorSplitterConfigModel(BaseModel):
24
24
description="Whether to keep the separator in the resulting chunks",
25
25
)
26
26
27
+
# pyrefly: ignore # bad-override
27
28
classConfig(OneOfOptionConfig):
28
29
title="By Separator"
29
30
description="Split the text by the list of separators until the chunk size is reached, using the earlier mentioned separators where possible. This is useful for splitting text fields by paragraphs, sentences, words, etc."
@@ -40,6 +41,7 @@ class MarkdownHeaderSplitterConfigModel(BaseModel):
40
41
ge=1,
41
42
)
42
43
44
+
# pyrefly: ignore # bad-override
43
45
classConfig(OneOfOptionConfig):
44
46
title="By Markdown header"
45
47
description="Split the text by Markdown headers down to the specified header level. If the chunk size fits multiple sections, they will be combined into a single chunk."
@@ -71,6 +73,7 @@ class CodeSplitterConfigModel(BaseModel):
71
73
],
72
74
)
73
75
76
+
# pyrefly: ignore # bad-override
74
77
classConfig(OneOfOptionConfig):
75
78
title="By Programming Language"
76
79
description="Split the text by suitable delimiters based on the programming language. This is useful for splitting code into chunks."
@@ -129,6 +132,7 @@ class ProcessingConfigModel(BaseModel):
129
132
description="List of fields to rename. Not applicable for nested fields, but can be used to rename fields already flattened via dot notation.",
130
133
)
131
134
135
+
# pyrefly: ignore # bad-override
132
136
classConfig:
133
137
schema_extra= {"group": "processing"}
134
138
@@ -137,6 +141,7 @@ class OpenAIEmbeddingConfigModel(BaseModel):
openai_key: str=Field(..., title="OpenAI API key", airbyte_secret=True)
139
143
144
+
# pyrefly: ignore # bad-override
140
145
classConfig(OneOfOptionConfig):
141
146
title="OpenAI"
142
147
description="Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions."
@@ -164,6 +169,7 @@ class OpenAICompatibleEmbeddingConfigModel(BaseModel):
164
169
examples=[1536, 384],
165
170
)
166
171
172
+
# pyrefly: ignore # bad-override
167
173
classConfig(OneOfOptionConfig):
168
174
title="OpenAI-compatible"
169
175
description="Use a service that's compatible with the OpenAI API to embed text."
@@ -191,6 +197,7 @@ class AzureOpenAIEmbeddingConfigModel(BaseModel):
191
197
examples=["your-resource-name"],
192
198
)
193
199
200
+
# pyrefly: ignore # bad-override
194
201
classConfig(OneOfOptionConfig):
195
202
title="Azure OpenAI"
196
203
description="Use the Azure-hosted OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions."
@@ -200,6 +207,7 @@ class Config(OneOfOptionConfig):
200
207
classFakeEmbeddingConfigModel(BaseModel):
201
208
mode: Literal["fake"] =Field("fake", const=True)
202
209
210
+
# pyrefly: ignore # bad-override
203
211
classConfig(OneOfOptionConfig):
204
212
title="Fake"
205
213
description="Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs."
@@ -221,6 +229,7 @@ class FromFieldEmbeddingConfigModel(BaseModel):
221
229
examples=[1536, 384],
222
230
)
223
231
232
+
# pyrefly: ignore # bad-override
224
233
classConfig(OneOfOptionConfig):
225
234
title="From Field"
226
235
description="Use a field in the record as the embedding. This is useful if you already have an embedding for your data and want to store it in the vector store."
@@ -231,6 +240,7 @@ class CohereEmbeddingConfigModel(BaseModel):
cohere_key: str=Field(..., title="Cohere API key", airbyte_secret=True)
233
242
243
+
# pyrefly: ignore # bad-override
234
244
classConfig(OneOfOptionConfig):
235
245
title="Cohere"
236
246
description="Use the Cohere API to embed text."
@@ -273,6 +283,7 @@ class VectorDBConfigModel(BaseModel):
273
283
description="Do not store the text that gets embedded along with the vector and the metadata in the destination. If set to true, only the vector and the metadata will be stored - in this case raw text for LLM use cases needs to be retrieved from another source.",
0 commit comments