Skip to content

Commit

Permalink
Update mypy (python-arq#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
phy1729 authored and rossmacarthur committed Mar 4, 2024
1 parent 996c297 commit 03e57d1
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 25 deletions.
2 changes: 1 addition & 1 deletion arq/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ async def queued_jobs(self, *, queue_name: Optional[str] = None) -> List[JobDef]


async def create_pool(
settings_: RedisSettings = None,
settings_: Optional[RedisSettings] = None,
*,
retry: int = 0,
job_serializer: Optional[Serializer] = None,
Expand Down
2 changes: 1 addition & 1 deletion arq/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def __init__(
self._deserializer = _deserializer

async def result(
self, timeout: Optional[float] = None, *, poll_delay: float = 0.5, pole_delay: float = None
self, timeout: Optional[float] = None, *, poll_delay: float = 0.5, pole_delay: Optional[float] = None
) -> Any:
"""
Get the result of the job or, if the job raised an exception, reraise it.
Expand Down
4 changes: 2 additions & 2 deletions arq/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ def __init__(
*,
queue_name: Optional[str] = default_queue_name,
cron_jobs: Optional[Sequence[CronJob]] = None,
redis_settings: RedisSettings = None,
redis_pool: ArqRedis = None,
redis_settings: Optional[RedisSettings] = None,
redis_pool: Optional[ArqRedis] = None,
burst: bool = False,
on_startup: Optional['StartupShutdown'] = None,
on_shutdown: Optional['StartupShutdown'] = None,
Expand Down
20 changes: 2 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,23 +92,7 @@ combine_as_imports = true
color_output = true

[tool.mypy]
show_error_codes = true
follow_imports = 'silent'
strict_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
warn_unused_configs = true
disallow_subclassing_any = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
disallow_untyped_calls = true

# for strict mypy: (this is the tricky one :-))
disallow_untyped_defs = true
strict = true

# remaining arguments from `mypy --strict` which cause errors
#no_implicit_optional = true
#warn_return_any = true
warn_return_any = false
2 changes: 1 addition & 1 deletion requirements/linting.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ black>=22,<23
flake8>=5,<6
flake8-quotes>=3,<4
isort[colors]>=5,<6
mypy<1
mypy>=1,<2
types-pytz
types_redis>=4
4 changes: 2 additions & 2 deletions requirements/linting.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ isort[colors]==5.10.1
# via -r requirements/linting.in
mccabe==0.7.0
# via flake8
mypy==0.971
mypy==1.3.0
# via -r requirements/linting.in
mypy-extensions==0.4.3
mypy-extensions==1.0.0
# via
# black
# mypy
Expand Down

0 comments on commit 03e57d1

Please sign in to comment.