Skip to content

Commit b49fb35

Browse files
chore(deps): update dependency ruff to ~=0.16.0 (#978)
1 parent d54d60b commit b49fb35

4 files changed

Lines changed: 42 additions & 34 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ dev = [
6060
"pytest-timeout<3.0.0",
6161
"pytest-xdist<4.0.0",
6262
"pytest<10.0.0",
63-
"ruff~=0.15.0",
63+
"ruff~=0.16.0",
6464
"setuptools", # setuptools are used by pytest but not explicitly required
6565
"types-colorama<0.5.0",
6666
"ty~=0.0.0",
@@ -101,6 +101,7 @@ ignore = [
101101
"BLE001", # Do not catch blind exception
102102
"C901", # `{name}` is too complex
103103
"COM812", # This rule may cause conflicts when used with the formatter
104+
"CPY001", # Missing copyright notice at top of file
104105
"D100", # Missing docstring in public module
105106
"D104", # Missing docstring in public package
106107
"D107", # Missing docstring in `__init__`

src/apify_client/_resource_clients/actor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def update(
124124
actor_standby_memory_mbytes: int | None = None,
125125
pricing_infos: list[dict[str, Any]] | None = None,
126126
actor_permission_level: ActorPermissionLevel | None = None,
127-
tagged_builds: dict[str, None | dict[str, str]] | None = None,
127+
tagged_builds: dict[str, dict[str, str] | None] | None = None,
128128
timeout: Timeout = 'short',
129129
) -> Actor:
130130
"""Update the Actor with the specified fields.
@@ -305,7 +305,7 @@ def call(
305305
webhooks: WebhooksList | None = None,
306306
force_permission_level: ActorPermissionLevel | None = None,
307307
wait_duration: timedelta | None = None,
308-
logger: Logger | None | Literal['default'] = 'default',
308+
logger: Logger | Literal['default'] | None = 'default',
309309
timeout: Timeout = 'no_timeout',
310310
) -> Run | None:
311311
"""Start the Actor and wait for it to finish before returning the Run object.
@@ -620,7 +620,7 @@ async def update(
620620
actor_standby_memory_mbytes: int | None = None,
621621
pricing_infos: list[dict[str, Any]] | None = None,
622622
actor_permission_level: ActorPermissionLevel | None = None,
623-
tagged_builds: dict[str, None | dict[str, str]] | None = None,
623+
tagged_builds: dict[str, dict[str, str] | None] | None = None,
624624
timeout: Timeout = 'short',
625625
) -> Actor:
626626
"""Update the Actor with the specified fields.
@@ -801,7 +801,7 @@ async def call(
801801
webhooks: WebhooksList | None = None,
802802
force_permission_level: ActorPermissionLevel | None = None,
803803
wait_duration: timedelta | None = None,
804-
logger: Logger | None | Literal['default'] = 'default',
804+
logger: Logger | Literal['default'] | None = 'default',
805805
timeout: Timeout = 'no_timeout',
806806
) -> Run | None:
807807
"""Start the Actor and wait for it to finish before returning the Run object.

tests/unit/test_logging.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,22 @@
2929
_MOCKED_ACTOR_NAME = 'mocked_actor_name'
3030
_MOCKED_ACTOR_ID = 'mocked_actor_id'
3131
_MOCKED_ACTOR_LOGS = (
32-
b'2025-05-13T07:24:12.588Z ACTOR: Pulling Docker image of build.\n'
33-
b'2025-05-13T07:24:12.686Z ACTOR: Creating Docker container.\n'
34-
b'2025-05-13T07:24:12.745Z ACTOR: Starting Docker container.\n', # Several logs merged into one chunk
32+
# Several logs merged into one chunk
33+
(
34+
b'2025-05-13T07:24:12.588Z ACTOR: Pulling Docker image of build.\n'
35+
b'2025-05-13T07:24:12.686Z ACTOR: Creating Docker container.\n'
36+
b'2025-05-13T07:24:12.745Z ACTOR: Starting Docker container.\n'
37+
),
3538
b'2025-05-13T07:26:14.132Z [apify] DEBUG \xc3', # Chunked log split in the middle of the multibyte character
3639
b'\xa1\n', # part 2
3740
b'2025-05-13T07:24:14.132Z [apify] INFO multiline \n log\n',
3841
b'2025-05-13T07:25:14.132Z [apify] WARNING some warning\n',
3942
b'2025-05-13T07:26:14.132Z [apify] DEBUG c\n',
4043
b'2025-05-13T0', # Chunked log that got split in the marker
41-
b'7:26:14.132Z [apify] DEBUG d\n' # part 2
42-
b'2025-05-13T07:27:14.132Z [apify] DEB', # Chunked log that got split outside of marker
44+
(
45+
b'7:26:14.132Z [apify] DEBUG d\n' # part 2
46+
b'2025-05-13T07:27:14.132Z [apify] DEB' # Chunked log that got split outside of marker
47+
),
4348
b'UG e\n', # part 2
4449
# Already redirected message
4550
b'2025-05-13T07:28:14.132Z [apify.redirect-logger runId:4U1oAnKau6jpzjUuA] -> 2025-05-13T07:27:14.132Z ACTOR:...\n',
@@ -61,8 +66,10 @@
6166
('2025-05-13T07:26:14.132Z [apify] DEBUG d', logging.DEBUG),
6267
('2025-05-13T07:27:14.132Z [apify] DEBUG e', logging.DEBUG),
6368
(
64-
'2025-05-13T07:28:14.132Z [apify.redirect-logger runId:4U1oAnKau6jpzjUuA] -> '
65-
'2025-05-13T07:27:14.132Z ACTOR:...',
69+
(
70+
'2025-05-13T07:28:14.132Z [apify.redirect-logger runId:4U1oAnKau6jpzjUuA] -> '
71+
'2025-05-13T07:27:14.132Z ACTOR:...'
72+
),
6673
logging.INFO,
6774
),
6875
)

uv.lock

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

0 commit comments

Comments
 (0)