Skip to content

Commit 87eddf6

Browse files
Moved type ignores into pyproject.toml
1 parent 25c5f36 commit 87eddf6

34 files changed

Lines changed: 69 additions & 61 deletions

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,14 @@ disable_error_code = [
222222
"call-arg",
223223
"arg-type",
224224
"override",
225+
"dict-item",
226+
"index",
227+
"operator",
228+
"call-overload",
229+
"misc",
230+
"attr-defined",
231+
"union-attr",
232+
"name-defined",
225233
]
226234

227235
[[tool.mypy.overrides]]

src/conductor/asyncio_client/adapters/models/any_adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
2828
{
2929
"allFields": obj.get("allFields"),
3030
"defaultInstanceForType": (
31-
Any.from_dict(obj["defaultInstanceForType"]) # type: ignore[attr-defined]
31+
Any.from_dict(obj["defaultInstanceForType"])
3232
if obj.get("defaultInstanceForType") is not None
3333
else None
3434
),

src/conductor/asyncio_client/adapters/models/workflow_run_adapter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class WorkflowRunAdapter(WorkflowRun):
1616
@property
1717
def current_task(self) -> TaskAdapter:
1818
current = None
19-
for task in self.tasks: # type: ignore[union-attr]
19+
for task in self.tasks:
2020
if task.status in ("SCHEDULED", "IN_PROGRESS"):
2121
current = task
2222
return current
@@ -34,10 +34,10 @@ def get_task(
3434
)
3535

3636
current = None
37-
for task in self.tasks: # type: ignore[union-attr]
37+
for task in self.tasks:
3838
if (
3939
task.task_def_name == name
40-
or task.workflow_task.task_reference_name == task_reference_name # type: ignore[union-attr]
40+
or task.workflow_task.task_reference_name == task_reference_name
4141
):
4242
current = task
4343
return current

src/conductor/asyncio_client/worker/worker.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ def execute(self, task: TaskAdapter) -> TaskResultAdapter:
7575
for input_name in params:
7676
typ = params[input_name].annotation
7777
default_value = params[input_name].default
78-
if input_name in task.input_data: # type: ignore[operator]
78+
if input_name in task.input_data:
7979
if typ in utils.simple_types:
80-
task_input[input_name] = task.input_data[input_name] # type: ignore[index]
80+
task_input[input_name] = task.input_data[input_name]
8181
else:
8282
task_input[input_name] = convert_from_dict_or_list(
8383
typ,
84-
task.input_data[input_name], # type: ignore[index]
84+
task.input_data[input_name],
8585
)
8686
elif default_value is not inspect.Parameter.empty:
8787
task_input[input_name] = default_value
@@ -121,7 +121,7 @@ def execute(self, task: TaskAdapter) -> TaskResultAdapter:
121121
task_result.reason_for_incompletion = ne.args[0]
122122

123123
if dataclasses.is_dataclass(type(task_result.output_data)):
124-
task_output = dataclasses.asdict(task_result.output_data) # type: ignore[call-overload]
124+
task_output = dataclasses.asdict(task_result.output_data)
125125
task_result.output_data = task_output
126126
return task_result
127127
if not isinstance(task_result.output_data, dict):

src/conductor/asyncio_client/workflow/task/javascript_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ def output(self, json_path: Optional[str] = None) -> str:
2828
base_path = f"{self.task_reference_name}.output.result"
2929
return f"${{{base_path if json_path is None else f'{base_path}.{json_path}'}}}"
3030

31-
@TaskInterface.evaluator_type.setter # type: ignore[attr-defined]
31+
@TaskInterface.evaluator_type.setter
3232
def evaluator_type(self, evaluator_type: str) -> None:
3333
self.input_parameters["evaluatorType"] = evaluator_type

src/conductor/asyncio_client/workflow/task/switch_task.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def to_workflow_task(self) -> WorkflowTaskAdapter:
4343
workflow.expression = self._expression
4444
else:
4545
workflow.evaluator_type = EvaluatorType.VALUE_PARAM
46-
workflow.input_parameters["switchCaseValue"] = self._expression # type: ignore[index]
46+
workflow.input_parameters["switchCaseValue"] = self._expression
4747
workflow.expression = "switchCaseValue"
4848
workflow.decision_cases = {}
4949
for case_value, tasks in self._decision_cases.items():
@@ -52,5 +52,5 @@ def to_workflow_task(self) -> WorkflowTaskAdapter:
5252
)
5353
if self._default_case is None:
5454
self._default_case = []
55-
workflow.default_case = get_task_interface_list_as_workflow_task_list(*self._default_case) # type: ignore[misc]
55+
workflow.default_case = get_task_interface_list_as_workflow_task_list(*self._default_case)
5656
return workflow

src/conductor/client/adapters/models/bulk_response_adapter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55

66
class BulkResponseAdapter(BulkResponse):
7-
swagger_types: ClassVar[Dict[str, str]] = { # type: ignore[misc]
7+
swagger_types: ClassVar[Dict[str, str]] = {
88
**BulkResponse.swagger_types,
99
"bulk_successful_results": "list[str]",
1010
"message": "str",
1111
}
1212

13-
attribute_map: ClassVar[Dict[str, str]] = { # type: ignore[misc]
13+
attribute_map: ClassVar[Dict[str, str]] = {
1414
**BulkResponse.attribute_map,
1515
"message": "message",
1616
}

src/conductor/client/adapters/models/conductor_user_adapter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55

66
class ConductorUserAdapter(ConductorUser):
7-
swagger_types: ClassVar[Dict[str, str]] = { # type: ignore[misc]
7+
swagger_types: ClassVar[Dict[str, str]] = {
88
**ConductorUser.swagger_types,
99
"orkes_app": "bool",
1010
"orkes_api_gateway": "bool",
1111
"contact_information": "dict(str, str)",
1212
}
1313

14-
attribute_map: ClassVar[Dict[str, str]] = { # type: ignore[misc]
14+
attribute_map: ClassVar[Dict[str, str]] = {
1515
**ConductorUser.attribute_map,
1616
"orkes_app": "orkesApp",
1717
"orkes_api_gateway": "orkesApiGateway",

src/conductor/client/adapters/models/integration_adapter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77

88
class IntegrationAdapter(Integration):
9-
swagger_types: ClassVar[Dict[str, str]] = { # type: ignore[misc]
9+
swagger_types: ClassVar[Dict[str, str]] = {
1010
**Integration.swagger_types,
1111
"created_on": "int",
1212
"updated_on": "int",
1313
}
1414

15-
attribute_map: ClassVar[Dict[str, str]] = { # type: ignore[misc]
15+
attribute_map: ClassVar[Dict[str, str]] = {
1616
**Integration.attribute_map,
1717
"created_on": "createdOn",
1818
"updated_on": "updatedOn",
@@ -105,7 +105,7 @@ def updated_on(self, update_time):
105105
self._update_time = update_time
106106
self._updated_on = update_time
107107

108-
@Integration.category.setter # type: ignore[attr-defined]
108+
@Integration.category.setter
109109
def category(self, category):
110110
allowed_values = [
111111
"API",

src/conductor/client/adapters/models/integration_api_adapter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77

88
class IntegrationApiAdapter(IntegrationApi):
9-
swagger_types: ClassVar[Dict[str, str]] = { # type: ignore[misc]
9+
swagger_types: ClassVar[Dict[str, str]] = {
1010
**IntegrationApi.swagger_types,
1111
"created_on": "int",
1212
"updated_on": "int",
1313
}
1414

15-
attribute_map: ClassVar[Dict[str, str]] = { # type: ignore[misc]
15+
attribute_map: ClassVar[Dict[str, str]] = {
1616
**IntegrationApi.attribute_map,
1717
"created_on": "createdOn",
1818
"updated_on": "updatedOn",

0 commit comments

Comments
 (0)