Skip to content

Commit afe9d6a

Browse files
committed
Linting and improving the Makefile
1 parent 8b2fcbc commit afe9d6a

File tree

8 files changed

+12
-9
lines changed

8 files changed

+12
-9
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ venv: poetry.lock
2929
format: venv
3030
poetry run black nodestream tests
3131
poetry run isort nodestream tests
32+
poetry run ruff check nodestream tests --fix
3233

3334
.PHONY: lint
3435
lint: venv
3536
poetry run black nodestream tests --check
3637
poetry run ruff check nodestream tests
38+
poetry run isort nodestream tests --check-only
3739

3840
.PHONY: test-unit
3941
test-unit: venv

nodestream/cli/operations/run_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from logging import getLogger
12
from typing import Iterable, Optional
23

34
from yaml import safe_dump
@@ -9,7 +10,6 @@
910
from ...utils import StringSuggester
1011
from ..commands.nodestream_command import NodestreamCommand
1112
from .operation import Operation
12-
from logging import getLogger
1313

1414
STATS_TABLE_COLS = ["Statistic", "Value"]
1515

nodestream/databases/query_executor_with_statistics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from typing import Iterable
22

33
from ..metrics import (
4+
Metric,
45
Metrics,
56
NodestreamMetricRegistry,
6-
Metric,
77
)
88
from ..model import IngestionHook, Node, RelationshipWithNodes, TimeToLiveConfiguration
99
from .query_executor import (

nodestream/metrics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from abc import ABC, abstractmethod
22
from contextlib import contextmanager
33
from contextvars import ContextVar
4-
from logging import getLogger
5-
from typing import Optional, Union, Dict
64
from dataclasses import dataclass
5+
from logging import getLogger
6+
from typing import Dict, Optional, Union
77

88
from cleo.commands.command import Command
99

tests/unit/cli/operations/test_run_pipeline.py

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

44
from nodestream.cli.operations.run_pipeline import (
55
WARNING_NO_TARGETS_PROVIDED,
6+
JsonProgressIndicator,
67
ProgressIndicator,
78
RunPipeline,
89
SpinnerProgressIndicator,
9-
JsonProgressIndicator,
1010
)
1111
from nodestream.metrics import Metrics
1212
from nodestream.project import PipelineConfiguration, PipelineDefinition, Project

tests/unit/databases/test_query_executor_with_statistics.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import pytest
21
from unittest.mock import call
32

3+
import pytest
4+
45
from nodestream.databases.query_executor_with_statistics import (
56
QueryExecutorWithStatistics,
67
)
78
from nodestream.metrics import Metrics, NodestreamMetricRegistry
8-
from nodestream.model import Node, RelationshipWithNodes, Relationship
9+
from nodestream.model import Node, Relationship, RelationshipWithNodes
910

1011

1112
@pytest.fixture

tests/unit/pipeline/test_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pytest
22

33
from nodestream.pipeline import Extractor
4+
from nodestream.pipeline.channel import Channel
45
from nodestream.pipeline.object_storage import NullObjectStore
56
from nodestream.pipeline.pipeline import (
67
Pipeline,
@@ -12,7 +13,6 @@
1213
StepInput,
1314
StepOutput,
1415
)
15-
from nodestream.pipeline.channel import Channel
1616

1717

1818
@pytest.fixture

tests/unit/test_metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
ConsoleMetricHandler,
88
JsonLogMetricHandler,
99
Metric,
10-
NodestreamMetricRegistry,
1110
Metrics,
11+
NodestreamMetricRegistry,
1212
NullMetricHandler,
1313
PrometheusMetricHandler,
1414
)

0 commit comments

Comments
 (0)