Skip to content

Commit 2d1933e

Browse files
authored
Fix linting errors (#329)
Resolves CI failure due to new linter violations in latest version of Rye: https://github.com/replicate/replicate-python/actions/runs/10100187511/job/27930960051 --------- Signed-off-by: Mattt Zmuda <[email protected]>
1 parent 1e6f008 commit 2d1933e

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ ignore = [
7575
"ANN101", # Missing type annotation for self in method
7676
"ANN102", # Missing type annotation for cls in classmethod
7777
"W191", # Indentation contains tabs
78+
"UP037", # Remove quotes from type annotation
7879
]
7980

8081
[tool.ruff.lint.per-file-ignores]

replicate/webhook.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515

1616

1717
class WebhookSigningSecret(Resource):
18+
"""
19+
A webhook signing secret.
20+
"""
21+
1822
key: str
1923

2024

@@ -43,6 +47,10 @@ class InvalidSignatureError(WebhookValidationError):
4347

4448

4549
class Webhooks(Namespace):
50+
"""
51+
Namespace for operations related to webhooks.
52+
"""
53+
4654
@property
4755
def default(self) -> "Webhooks.Default":
4856
"""
@@ -52,6 +60,10 @@ def default(self) -> "Webhooks.Default":
5260
return self.Default(self._client)
5361

5462
class Default(Namespace):
63+
"""
64+
Namespace for operations related to the default webhook.
65+
"""
66+
5567
def secret(self) -> WebhookSigningSecret:
5668
"""
5769
Get the default webhook signing secret.
@@ -94,7 +106,7 @@ def validate(
94106
) -> bool: ...
95107

96108
@staticmethod
97-
def validate( # type: ignore
109+
def validate( # type: ignore # pylint: disable=too-many-branches,too-many-locals
98110
request: Optional["httpx.Request"] = None,
99111
headers: Optional[Dict[str, str]] = None,
100112
body: Optional[str] = None,

0 commit comments

Comments
 (0)