Skip to content

Commit 89f6213

Browse files
committed
Make schema_extra signature consistent
1 parent f7f90e6 commit 89f6213

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/dstack/_internal/core/models/fleets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import uuid
33
from datetime import datetime
44
from enum import Enum
5-
from typing import Any, Dict, List, Optional, Type, Union
5+
from typing import Any, Dict, List, Optional, Union
66

77
from pydantic import Field, root_validator, validator
88
from typing_extensions import Annotated, Literal
@@ -364,7 +364,7 @@ class FleetConfiguration(
364364

365365
class FleetSpecConfig(CoreConfig):
366366
@staticmethod
367-
def schema_extra(schema: Dict[str, Any], model: Type) -> None:
367+
def schema_extra(schema: Dict[str, Any]):
368368
prop = schema.get("properties", {})
369369
prop.pop("merged_profile", None)
370370

src/dstack/_internal/core/models/profiles.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def crons(self) -> List[str]:
228228

229229
class ProfileParamsConfig(CoreConfig):
230230
@staticmethod
231-
def schema_extra(schema: Dict[str, Any]) -> None:
231+
def schema_extra(schema: Dict[str, Any]):
232232
del schema["properties"]["pool_name"]
233233
del schema["properties"]["instance_name"]
234234
del schema["properties"]["retry_policy"]
@@ -413,7 +413,7 @@ class ProfileProps(CoreModel):
413413

414414
class ProfileConfig(ProfileParamsConfig):
415415
@staticmethod
416-
def schema_extra(schema: Dict[str, Any]) -> None:
416+
def schema_extra(schema: Dict[str, Any]):
417417
ProfileParamsConfig.schema_extra(schema)
418418

419419

src/dstack/_internal/core/models/repos/remote.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class RepoError(DstackError):
2626

2727
class RemoteRepoCredsConfig(CoreConfig):
2828
@staticmethod
29-
def schema_extra(schema: Dict[str, Any]) -> None:
29+
def schema_extra(schema: Dict[str, Any]):
3030
del schema["properties"]["protocol"]
3131

3232

@@ -41,7 +41,7 @@ class RemoteRepoCreds(generate_dual_core_model(RemoteRepoCredsConfig)):
4141

4242
class RemoteRepoInfoConfig(CoreConfig):
4343
@staticmethod
44-
def schema_extra(schema: Dict[str, Any]) -> None:
44+
def schema_extra(schema: Dict[str, Any]):
4545
del schema["properties"]["repo_host_name"]
4646
del schema["properties"]["repo_port"]
4747
del schema["properties"]["repo_user_name"]

src/dstack/_internal/core/models/runs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from datetime import datetime, timedelta
22
from enum import Enum
3-
from typing import Any, Dict, List, Literal, Optional, Type
3+
from typing import Any, Dict, List, Literal, Optional
44
from urllib.parse import urlparse
55

66
from pydantic import UUID4, Field, root_validator
@@ -394,7 +394,7 @@ class Job(CoreModel):
394394

395395
class RunSpecConfig(CoreConfig):
396396
@staticmethod
397-
def schema_extra(schema: Dict[str, Any], model: Type) -> None:
397+
def schema_extra(schema: Dict[str, Any]):
398398
prop = schema.get("properties", {})
399399
prop.pop("merged_profile", None)
400400

src/dstack/_internal/server/schemas/gateways.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class CreateGatewayRequestConfig(CoreConfig):
1111
@staticmethod
12-
def schema_extra(schema: Dict[str, Any]) -> None:
12+
def schema_extra(schema: Dict[str, Any]):
1313
del schema["properties"]["name"]
1414
del schema["properties"]["backend_type"]
1515
del schema["properties"]["region"]

0 commit comments

Comments
 (0)