Skip to content

Commit 73daebc

Browse files
committed
Fixed flake.
Signed-off-by: Pavel Kirilin <[email protected]>
1 parent 8de6a41 commit 73daebc

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

.flake8

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ per-file-ignores =
106106
DAR101,
107107
; Found too many arguments
108108
WPS211,
109+
; Found nested function
110+
WPS430,
111+
; Found too short name
112+
WPS111,
109113

110114
; all init files
111115
__init__.py:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ repos:
4141
language: system
4242
pass_filenames: false
4343
types: [python]
44-
args: [--count, taskiq_pipelines]
44+
args: [--count, taskiq_pipelines, tests]
4545

4646
- id: mypy
4747
name: Validate types with MyPy

taskiq_pipelines/pipeliner.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def call_next(
111111
"""
112112
self.steps.append(
113113
DumpedStep(
114-
step_type=SequentialStep._step_name,
114+
step_type=SequentialStep._step_name, # noqa: WPS437
115115
step_data=SequentialStep.from_task(
116116
task=task,
117117
param_name=param_name,
@@ -167,7 +167,7 @@ def call_after(
167167
"""
168168
self.steps.append(
169169
DumpedStep(
170-
step_type=SequentialStep._step_name,
170+
step_type=SequentialStep._step_name, # noqa: WPS437
171171
step_data=SequentialStep.from_task(
172172
task=task,
173173
param_name=EMPTY_PARAM_NAME,
@@ -236,7 +236,7 @@ def map(
236236
"""
237237
self.steps.append(
238238
DumpedStep(
239-
step_type=MapperStep._step_name,
239+
step_type=MapperStep._step_name, # noqa: WPS437
240240
step_data=MapperStep.from_task(
241241
task=task,
242242
param_name=param_name,
@@ -308,7 +308,7 @@ def filter(
308308
"""
309309
self.steps.append(
310310
DumpedStep(
311-
step_type=FilterStep._step_name,
311+
step_type=FilterStep._step_name, # noqa: WPS437
312312
step_data=FilterStep.from_task(
313313
task=task,
314314
param_name=param_name,

taskiq_pipelines/steps/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
def parse_step(step_type: str, step_data: str) -> AbstractStep:
13-
step_cls = AbstractStep._known_steps.get(step_type)
13+
step_cls = AbstractStep._known_steps.get(step_type) # noqa: WPS437
1414
if step_cls is None:
1515
logger.warning(f"Unknown step type: {step_type}")
1616
raise ValueError("Unknown step type.")

tests/test_steps.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
@pytest.mark.anyio
1010
async def test_success() -> None:
11-
"""Test stub for CI."""
12-
11+
"""Tests that sequential step works as expected."""
1312
broker = InMemoryBroker().with_middlewares(PipelineMiddleware())
1413

1514
@broker.task
@@ -28,8 +27,7 @@ def double(i: int) -> int:
2827

2928
@pytest.mark.anyio
3029
async def test_mapping_success() -> None:
31-
"""Test stub for CI."""
32-
30+
"""Test that map step works as expected."""
3331
broker = InMemoryBroker().with_middlewares(PipelineMiddleware())
3432

3533
@broker.task

0 commit comments

Comments
 (0)