Skip to content

Commit b747cba

Browse files
committed
Fix C0116: Missing function or method docstring (missing-function-docstring)
Signed-off-by: Mattt Zmuda <[email protected]> Fix C0116: Missing function or method docstring (missing-function-docstring) Signed-off-by: Mattt Zmuda <[email protected]>
1 parent 0cb0dab commit b747cba

File tree

4 files changed

+42
-1
lines changed

4 files changed

+42
-1
lines changed

replicate/client.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,30 @@ def _request(self, method: str, path: str, **kwargs) -> httpx.Response:
8484

8585
@property
8686
def models(self) -> ModelCollection:
87+
"""
88+
Namespace for operations related to models.
89+
"""
8790
return ModelCollection(client=self)
8891

8992
@property
9093
def predictions(self) -> PredictionCollection:
94+
"""
95+
Namespace for operations related to predictions.
96+
"""
9197
return PredictionCollection(client=self)
9298

9399
@property
94100
def trainings(self) -> TrainingCollection:
101+
"""
102+
Namespace for operations related to trainings.
103+
"""
95104
return TrainingCollection(client=self)
96105

97106
@property
98107
def deployments(self) -> DeploymentCollection:
108+
"""
109+
Namespace for operations related to deployments.
110+
"""
99111
return DeploymentCollection(client=self)
100112

101113
def run(self, model_version: str, **kwargs) -> Union[Any, Iterator[Any]]: # noqa: ANN401

replicate/deployment.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ class DeploymentCollection(Collection):
3838
model = Deployment
3939

4040
def list(self) -> List[Deployment]:
41+
"""
42+
List deployments.
43+
44+
Raises:
45+
NotImplementedError: This method is not implemented.
46+
"""
4147
raise NotImplementedError()
4248

4349
def get(self, name: str) -> Deployment:
@@ -56,6 +62,12 @@ def get(self, name: str) -> Deployment:
5662
return self.prepare_model({"username": username, "name": name})
5763

5864
def create(self, **kwargs) -> Deployment:
65+
"""
66+
Create a deployment.
67+
68+
Raises:
69+
NotImplementedError: This method is not implemented.
70+
"""
5971
raise NotImplementedError()
6072

6173
def prepare_model(self, attrs: Union[Deployment, Dict]) -> Deployment:
@@ -74,6 +86,12 @@ def __init__(self, client: "Client", deployment: Deployment) -> None:
7486
self._deployment = deployment
7587

7688
def list(self) -> List[Prediction]:
89+
"""
90+
List predictions in a deployment.
91+
92+
Raises:
93+
NotImplementedError: This method is not implemented.
94+
"""
7795
raise NotImplementedError()
7896

7997
def get(self, id: str) -> Prediction:

replicate/model.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ def get(self, key: str) -> Model:
136136
return self.prepare_model(resp.json())
137137

138138
def create(self, **kwargs) -> Model:
139+
"""
140+
Create a model.
141+
142+
Raises:
143+
NotImplementedError: This method is not implemented.
144+
"""
139145
raise NotImplementedError()
140146

141147
def prepare_model(self, attrs: Union[Model, Dict]) -> Model:

replicate/version.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ def __init__(self, client: "Client", model: "Model") -> None:
7676
super().__init__(client=client)
7777
self._model = model
7878

79-
# doesn't exist yet
8079
def get(self, id: str) -> Version:
8180
"""
8281
Get a specific model version.
@@ -92,6 +91,12 @@ def get(self, id: str) -> Version:
9291
return self.prepare_model(resp.json())
9392

9493
def create(self, **kwargs) -> Version:
94+
"""
95+
Create a model version.
96+
97+
Raises:
98+
NotImplementedError: This method is not implemented.
99+
"""
95100
raise NotImplementedError()
96101

97102
def list(self) -> List[Version]:

0 commit comments

Comments
 (0)