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:
351351def _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" :
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments