Skip to content

Commit fe2398b

Browse files
authored
Fix linter warnings in exceptions.py (#267)
Follow-up to #263 --------- Signed-off-by: Mattt Zmuda <mattt@replicate.com>
1 parent d7388c5 commit fe2398b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

replicate/exceptions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ReplicateError(ReplicateException):
3333
instance: Optional[str]
3434
"""A URI that identifies the specific occurrence of the error."""
3535

36-
def __init__(
36+
def __init__( # pylint: disable=too-many-arguments
3737
self,
3838
type: Optional[str] = None,
3939
title: Optional[str] = None,
@@ -50,6 +50,7 @@ def __init__(
5050
@classmethod
5151
def from_response(cls, response: httpx.Response) -> "ReplicateError":
5252
"""Create a ReplicateError from an HTTP response."""
53+
5354
try:
5455
data = response.json()
5556
except ValueError:
@@ -64,6 +65,8 @@ def from_response(cls, response: httpx.Response) -> "ReplicateError":
6465
)
6566

6667
def to_dict(self) -> dict:
68+
"""Get a dictionary representation of the error."""
69+
6770
return {
6871
key: value
6972
for key, value in {

0 commit comments

Comments
 (0)