Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ dev = [
"pytest-xdist~=3.8.0",
"pytest~=8.4.0",
"respx~=0.22.0",
"ruff~=0.11.0",
"ruff~=0.12.0",
"setuptools", # setuptools are used by pytest but not explicitly required
]

Expand Down Expand Up @@ -134,6 +134,9 @@ indent-style = "space"
"TRY301", # Abstract `raise` to an inner function
"TID252", # Prefer absolute imports over relative imports from parent modules
]
"**/{tests}/{integration}/*" = [
"PLC0415", # `import` should be at the top-level of a file
]
"**/{docs,website}/**" = [
"D", # Everything from the pydocstyle
"INP001", # File {filename} is part of an implicit namespace package, add an __init__.py
Expand Down
2 changes: 1 addition & 1 deletion src/apify/_actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ def _get_default_exit_process(self) -> bool:

# Check if running in Scrapy by attempting to import it.
with suppress(ImportError):
import scrapy # noqa: F401
import scrapy # noqa: F401 PLC0415

self.log.debug('Running in Scrapy, setting default `exit_process` to False.')
return False
Expand Down
6 changes: 2 additions & 4 deletions src/apify/_charging.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,7 @@ def calculate_chargeable() -> dict[str, int | None]:
PricingInfoItem(
price=Decimal()
if self._is_at_home
else Decimal(
'1'
), # Use a nonzero price for local development so that the maximum budget can be reached,
else Decimal(1), # Use a nonzero price for local development so that the maximum budget can be reached,
title=f"Unknown event '{event_name}'",
),
)
Expand Down Expand Up @@ -282,7 +280,7 @@ def calculate_max_event_charge_count_within_limit(self, event_name: str) -> int
if pricing_info is not None:
price = pricing_info.price
elif not self._is_at_home:
price = Decimal('1') # Use a nonzero price for local development so that the maximum budget can be reached
price = Decimal(1) # Use a nonzero price for local development so that the maximum budget can be reached
else:
price = Decimal()

Expand Down
44 changes: 22 additions & 22 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.