Skip to content

Commit 9f12c4e

Browse files
chore(deps): update dependency ruff to ~=0.13.0 (#589)
Co-authored-by: Vlada Dusek <[email protected]>
1 parent 8e81774 commit 9f12c4e

File tree

6 files changed

+33
-33
lines changed

6 files changed

+33
-33
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ dev = [
7575
"pytest-timeout~=2.4.0",
7676
"pytest-xdist~=3.8.0",
7777
"pytest~=8.4.0",
78-
"ruff~=0.12.0",
78+
"ruff~=0.13.0",
7979
"setuptools", # setuptools are used by pytest but not explicitly required
8080
"types-cachetools~=6.2.0.20250827",
8181
"uvicorn[standard]",

tests/unit/events/test_apify_event_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ async def test_lifecycle_on_platform_without_websocket(monkeypatch: pytest.Monke
131131
monkeypatch.setenv(ActorEnvVars.EVENTS_WEBSOCKET_URL, 'ws://localhost:56565')
132132
event_manager = ApifyEventManager(Configuration.get_global_configuration())
133133

134-
with pytest.raises(RuntimeError, match='Error connecting to platform events websocket!'):
134+
with pytest.raises(RuntimeError, match=r'Error connecting to platform events websocket!'):
135135
async with event_manager:
136136
pass
137137

tests/unit/scrapy/extensions/test_httpcache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,5 @@ def test_get_kvs_name(spider_name: str, expected: str) -> None:
6767
],
6868
)
6969
def test_get_kvs_name_raises(spider_name: str) -> None:
70-
with pytest.raises(ValueError, match='Unsupported spider name'):
70+
with pytest.raises(ValueError, match=r'Unsupported spider name'):
7171
assert get_kvs_name(spider_name)

tests/unit/test_crypto.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def test_decryption_fails_with_invalid_password() -> None:
6868
encrypted = public_encrypt(test_value, public_key=PUBLIC_KEY)
6969
encrypted['encrypted_password'] = base64.b64encode(b'invalid_password').decode('utf-8')
7070

71-
with pytest.raises(ValueError, match='Ciphertext length must be equal to key size.'):
71+
with pytest.raises(ValueError, match=r'Ciphertext length must be equal to key size.'):
7272
private_decrypt(**encrypted, private_key=PRIVATE_KEY)
7373

7474

@@ -79,7 +79,7 @@ def test_decryption_fails_with_manipulated_cipher() -> None:
7979
b'invalid_cipher' + base64.b64decode(encrypted['encrypted_value'].encode('utf-8')),
8080
).decode('utf-8')
8181

82-
with pytest.raises(ValueError, match='Decryption failed, malformed encrypted value or password.'):
82+
with pytest.raises(ValueError, match=r'Decryption failed, malformed encrypted value or password.'):
8383
private_decrypt(**encrypted, private_key=PRIVATE_KEY)
8484

8585

tests/unit/test_proxy_configuration.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,19 @@ def test_invalid_arguments() -> None:
8888
with pytest.raises(ValueError, match=match_pattern):
8989
ProxyConfiguration(country_code=invalid_country_code) # type: ignore[arg-type]
9090

91-
with pytest.raises(ValueError, match='Exactly one of .* must be specified'):
91+
with pytest.raises(ValueError, match=r'Exactly one of .* must be specified'):
9292
ProxyConfiguration(
9393
proxy_urls=['http://proxy.com:1111'],
9494
new_url_function=lambda session_id=None, request=None: 'http://proxy.com:2222',
9595
)
9696

97-
with pytest.raises(ValueError, match='Cannot combine custom proxies with Apify Proxy'):
97+
with pytest.raises(ValueError, match=r'Cannot combine custom proxies with Apify Proxy'):
9898
ProxyConfiguration(proxy_urls=['http://proxy.com:1111'], groups=['GROUP1'])
9999

100100
with pytest.raises(ValueError, match=re.escape('bad-url')):
101101
ProxyConfiguration(proxy_urls=['bad-url'])
102102

103-
with pytest.raises(ValueError, match='Cannot combine custom proxies with Apify Proxy'):
103+
with pytest.raises(ValueError, match=r'Cannot combine custom proxies with Apify Proxy'):
104104
ProxyConfiguration(
105105
new_url_function=lambda session_id=None, request=None: 'http://proxy.com:2222', groups=['GROUP1']
106106
)
@@ -241,7 +241,7 @@ def custom_new_url_function(session_id: str | None = None, request: Any = None)
241241

242242
proxy_configuration = ProxyConfiguration(new_url_function=custom_new_url_function)
243243

244-
with pytest.raises(ValueError, match='The provided "new_url_function" did not return a valid URL'):
244+
with pytest.raises(ValueError, match=r'The provided "new_url_function" did not return a valid URL'):
245245
await proxy_configuration.new_url()
246246

247247

@@ -416,7 +416,7 @@ def request_handler(request: Request, response: Response) -> Response:
416416
async def test_initialize_without_password_or_token() -> None:
417417
proxy_configuration = ProxyConfiguration()
418418

419-
with pytest.raises(ValueError, match='Apify Proxy password must be provided'):
419+
with pytest.raises(ValueError, match=r'Apify Proxy password must be provided'):
420420
await proxy_configuration.initialize()
421421

422422

uv.lock

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)