Skip to content

Commit a0070b6

Browse files
authored
chore: update to Ruff 0.8 (#342)
1 parent 5301a6c commit a0070b6

File tree

6 files changed

+95
-94
lines changed

6 files changed

+95
-94
lines changed

poetry.lock

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

pyproject.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pytest-only = "~2.1.0"
7070
pytest-timeout = "~2.3.0"
7171
pytest-xdist = "~3.6.0"
7272
respx = "~0.21.0"
73-
ruff = "~0.7.0"
73+
ruff = "~0.8.0"
7474
setuptools = "~75.6.0" # setuptools are used by pytest but not explicitly required
7575

7676
[tool.poetry.extras]
@@ -82,8 +82,6 @@ line-length = 120
8282
[tool.ruff.lint]
8383
select = ["ALL"]
8484
ignore = [
85-
"ANN101", # Missing type annotation for `self` in method
86-
"ANN102", # Missing type annotation for `{name}` in classmethod
8785
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in {filename}
8886
"ASYNC109", # Async function definition with a `timeout` parameter
8987
"BLE001", # Do not catch blind exception
@@ -142,7 +140,10 @@ docstring-quotes = "double"
142140
inline-quotes = "single"
143141

144142
[tool.ruff.lint.flake8-type-checking]
145-
runtime-evaluated-base-classes = ["pydantic.BaseModel", "crawlee.configuration.Configuration"]
143+
runtime-evaluated-base-classes = [
144+
"pydantic.BaseModel",
145+
"crawlee.configuration.Configuration",
146+
]
146147

147148
[tool.ruff.lint.flake8-builtins]
148149
builtins-ignorelist = ["id"]
@@ -187,7 +188,7 @@ ignore_missing_imports = true
187188
exclude_lines = [
188189
"pragma: no cover",
189190
"if TYPE_CHECKING:",
190-
"assert_never()"
191+
"assert_never()",
191192
]
192193

193194
[tool.basedpyright]

src/apify/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
__all__ = [
1515
'Actor',
16-
'Event',
1716
'Configuration',
17+
'Event',
1818
'ProxyConfiguration',
1919
'ProxyInfo',
2020
'Request',

src/apify/scrapy/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
from apify.scrapy.utils import get_basic_auth_header, get_running_event_loop_id
44

55
__all__ = [
6-
'to_apify_request',
7-
'to_scrapy_request',
86
'ApifyScheduler',
97
'get_basic_auth_header',
108
'get_running_event_loop_id',
9+
'to_apify_request',
10+
'to_scrapy_request',
1111
]

src/apify/storages/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
from ._request_list import RequestList
44

5-
__all__ = ['Dataset', 'KeyValueStore', 'RequestQueue', 'RequestList']
5+
__all__ = ['Dataset', 'KeyValueStore', 'RequestList', 'RequestQueue']

tests/integration/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import sys
88
import textwrap
99
from pathlib import Path
10-
from typing import TYPE_CHECKING, Any, Callable, Coroutine, Protocol, cast
10+
from typing import TYPE_CHECKING, Any, Callable, Protocol, cast
1111

1212
import pytest
1313
from filelock import FileLock
@@ -20,7 +20,7 @@
2020
from apify._models import ActorRun
2121

2222
if TYPE_CHECKING:
23-
from collections.abc import AsyncIterator, Awaitable, Mapping
23+
from collections.abc import AsyncIterator, Awaitable, Coroutine, Mapping
2424

2525
from apify_client.clients.resource_clients import ActorClientAsync
2626

0 commit comments

Comments
 (0)