Skip to content

Commit 724ff02

Browse files
committed
format and lint
1 parent 19f69a7 commit 724ff02

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

replicate/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def close(self) -> None:
351351
def _get_api_token_from_environment() -> Optional[str]:
352352
"""Get API token from cog current scope if available, otherwise from environment."""
353353
try:
354-
import cog
354+
import cog # noqa: I001 # pyright: ignore [reportMissingImports]
355355

356356
for key, value in cog.current_scope().context.items():
357357
if key.upper() == "REPLICATE_API_TOKEN":

tests/test_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ def test_custom_headers_are_applied():
9898

9999
def mock_send(request):
100100
assert "User-Agent" in request.headers, "Custom header not found in request"
101-
assert (
102-
request.headers["User-Agent"] == "my-custom-user-agent/1.0"
103-
), "Custom header value is incorrect"
101+
assert request.headers["User-Agent"] == "my-custom-user-agent/1.0", (
102+
"Custom header value is incorrect"
103+
)
104104
return httpx.Response(401, json={})
105105

106106
mock_send_wrapper = mock.Mock(side_effect=mock_send)

0 commit comments

Comments
 (0)