File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -351,7 +351,7 @@ def close(self) -> None:
351
351
def _get_api_token_from_environment () -> Optional [str ]:
352
352
"""Get API token from cog current scope if available, otherwise from environment."""
353
353
try :
354
- import cog
354
+ import cog # noqa: I001 # pyright: ignore [reportMissingImports]
355
355
356
356
for key , value in cog .current_scope ().context .items ():
357
357
if key .upper () == "REPLICATE_API_TOKEN" :
Original file line number Diff line number Diff line change @@ -98,9 +98,9 @@ def test_custom_headers_are_applied():
98
98
99
99
def mock_send (request ):
100
100
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
+ )
104
104
return httpx .Response (401 , json = {})
105
105
106
106
mock_send_wrapper = mock .Mock (side_effect = mock_send )
You can’t perform that action at this time.
0 commit comments