Skip to content

Commit cae02e5

Browse files
Merge pull request #3 from adjust/fix-complain
fix(complain): fix lint
2 parents 6098152 + 71c01ae commit cae02e5

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

Diff for: .github/workflows/ci.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,7 @@ jobs:
138138
- name: build
139139
run: python -m build
140140

141-
- name: Upload package to PyPI
142-
uses: pypa/gh-action-pypi-publish@release/v1
143-
144-
- name: publish docs
145-
if: '!fromJSON(steps.check-version.outputs.IS_PRERELEASE)'
146-
run: make publish-docs
147-
env:
148-
NETLIFY: ${{ secrets.netlify_token }}
141+
- name: Upload wheel to PyPI
142+
if: env.PYPI_SSH_KEY
143+
run: |
144+
scp dist/*.whl automate-infra-1.adjust.com:~/pypi/wheels

Diff for: arq/connections.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ def __repr__(self) -> str:
8989
enqueued_jobs = 0
9090

9191

92-
9392
class ArqRedis(BaseRedis):
9493
"""
9594
Thin subclass of ``redis.asyncio.Redis`` which adds :func:`arq.connections.enqueue_job`.
@@ -130,7 +129,7 @@ async def enqueue_job(
130129
_defer_by: Union[None, int, float, timedelta] = None,
131130
_expires: Union[None, int, float, timedelta] = None,
132131
_job_try: Optional[int] = None,
133-
distribution: str = None, # example 5:2
132+
distribution: Optional[str] = None, # example 5:2
134133
**kwargs: Any,
135134
) -> Optional[Job]:
136135
"""
@@ -195,8 +194,8 @@ async def enqueue_job(
195194
return None
196195
return Job(job_id, redis=self, _queue_name=_queue_name, _deserializer=self.job_deserializer)
197196

198-
def _get_queue_index(self, distribution) -> int:
199-
ratios = list(map(lambda x: int(x), distribution.split(':')))
197+
def _get_queue_index(self, distribution: Optional[str]) -> int:
198+
ratios = list(map(lambda x: int(x), distribution.split(':'))) # type: ignore[union-attr]
200199
ratios_sum = sum(ratios)
201200
up_to_ratio = ratios[0]
202201
queue_index = 0

Diff for: arq/worker.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def func(
8181

8282
if isinstance(coroutine, str):
8383
name = name or coroutine
84-
coroutine_: 'WorkerCoroutine' = import_string(coroutine)
84+
coroutine_: WorkerCoroutine = import_string(coroutine)
8585
else:
8686
coroutine_ = coroutine
8787

@@ -187,7 +187,7 @@ def __init__(
187187
self,
188188
functions: Sequence[Union[Function, 'WorkerCoroutine']] = (),
189189
*,
190-
distribution_index: int = None,
190+
distribution_index: Optional[int] = None,
191191
queue_name: Optional[str] = default_queue_name,
192192
cron_jobs: Optional[Sequence[CronJob]] = None,
193193
redis_settings: Optional[RedisSettings] = None,

0 commit comments

Comments
 (0)