Skip to content

Commit 6aa2691

Browse files
committed
Revert a few docstring fixes and allow mcs over cls for metaclases in Entities
1 parent 34ced9e commit 6aa2691

21 files changed

Lines changed: 41 additions & 116 deletions

common/entities/component_meta.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class SimpleComponentMeta(ModelBase):
1818
is identified. This value gets stored at the `type` field of the Component entity.
1919
"""
2020

21-
def __new__(cls, name: str, bases: tuple[type, ...], attrs: dict[str, object]) -> type[BaseModel]:
21+
def __new__(mcs, name: str, bases: tuple[type, ...], attrs: dict[str, object]) -> type[BaseModel]:
2222
try:
2323
component_type: str = str(attrs["component_type"])
2424
except KeyError as e:
@@ -45,7 +45,7 @@ def __new__(cls, name: str, bases: tuple[type, ...], attrs: dict[str, object]) -
4545
new_component_type_field.default = component_type
4646
attrs["type"] = new_component_type_field
4747

48-
entity_class: type[BaseModel] = super().__new__(cls, name, bases, attrs)
48+
entity_class: type[BaseModel] = super().__new__(mcs, name, bases, attrs)
4949

5050
def select(cls: type[BaseModel], *fields: object) -> ModelSelect:
5151
# The join is useful to allow using the Component entity fields in WHERE clauses, regardless of

event_api/endpoints/v1/dataset_operation.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ def post(self) -> Response:
2020
description: Event reports that a read or write operation has occurred for the specified dataset.
2121
security:
2222
- SAKey: []
23-
24-
Parameters
25-
----------
23+
parameters:
2624
- in: header
2725
name: EVENT-SOURCE
2826
description: Set the source of the event. If unset, the Event Ingestion API will assume the source of the

event_api/endpoints/v1/message_log.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ def post(self) -> Response:
2424
scripts.
2525
security:
2626
- SAKey: []
27-
28-
Parameters
29-
----------
27+
parameters:
3028
- in: header
3129
name: EVENT-SOURCE
3230
description: Set the source of the event. If unset, the Event Ingestion API will assume the source of the

event_api/endpoints/v1/metric_log.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ def post(self) -> Response:
2525
the metric across multiple runs.
2626
security:
2727
- SAKey: []
28-
29-
Parameters
30-
----------
28+
parameters:
3129
- in: header
3230
name: EVENT-SOURCE
3331
description: Set the source of the event. If unset, the Event Ingestion API will assume the source of the

event_api/endpoints/v1/run_status.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ def post(self) -> Response:
2222
a task has started and ended with a certain status.
2323
security:
2424
- SAKey: []
25-
26-
Parameters
27-
----------
25+
parameters:
2826
- in: header
2927
name: EVENT-SOURCE
3028
description: Set the source of the event. If unset, the Event Ingestion API will assume the source of the

event_api/endpoints/v1/test_outcomes.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ def post(self) -> Response:
2626
track and report on runs and outcomes.
2727
security:
2828
- SAKey: []
29-
30-
Parameters
31-
----------
29+
parameters:
3230
- in: header
3331
name: EVENT-SOURCE
3432
description: Set the source of the event. If unset, the Event Ingestion API will assume the source of the

observability_api/endpoints/v1/agents.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ def get(self, project_id: UUID) -> Response:
2929
operationId: ListAgents
3030
security:
3131
- SAKey: []
32-
33-
Parameters
34-
----------
32+
parameters:
3533
- in: path
3634
name: project_id
3735
description: the ID of the project being queried.

observability_api/endpoints/v1/alerts.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ def get(self, project_id: UUID) -> Response:
2929
operationId: ProjectAlerts
3030
security:
3131
- SAKey: []
32-
33-
Parameters
34-
----------
32+
parameters:
3533
- in: path
3634
name: project_id
3735
schema:

observability_api/endpoints/v1/components.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ def get(self, project_id: UUID) -> Response:
3131
operationId: ListComponents
3232
security:
3333
- SAKey: []
34-
35-
Parameters
36-
----------
34+
parameters:
3735
- in: path
3836
name: project_id
3937
description: the ID of the project being queried.
@@ -135,9 +133,7 @@ def get(self, component_id: UUID) -> Response:
135133
description: Retrieves a single component by its ID.
136134
security:
137135
- SAKey: []
138-
139-
Parameters
140-
----------
136+
parameters:
141137
- in: path
142138
name: component_id
143139
schema:
@@ -179,9 +175,7 @@ def delete(self, component_id: UUID) -> Response:
179175
description: Permanently deletes a single component by its ID including all the associated runs and stored events.
180176
security:
181177
- SAKey: []
182-
183-
Parameters
184-
----------
178+
parameters:
185179
- in: path
186180
name: component_id
187181
schema:
@@ -222,9 +216,7 @@ def get(self, journey_id: UUID) -> Response:
222216
operationId: ListComponentsByJourney
223217
security:
224218
- SAKey: []
225-
226-
Parameters
227-
----------
219+
parameters:
228220
- in: path
229221
name: journey_id
230222
description: the ID of the journey being queried.

observability_api/endpoints/v1/instance_rules.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ def post(self, journey_id: UUID) -> Response:
2727
description: Creates a new instance rule in a journey.
2828
security:
2929
- SAKey: []
30-
31-
Parameters
32-
----------
30+
parameters:
3331
- in: path
3432
name: journey_id
3533
description: The ID of the journey that the instance rule will be created under.
@@ -102,9 +100,7 @@ def delete(self, *, instance_rule_id: UUID) -> Response:
102100
description: Permanently deletes a single instance rule by its ID.
103101
security:
104102
- SAKey: []
105-
106-
Parameters
107-
----------
103+
parameters:
108104
- in: path
109105
name: instance_rule_id
110106
schema:

0 commit comments

Comments
 (0)