Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"python.testing.pytestArgs": ["tests"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"isort.check": true,
"markdownlint.config": {
"MD033": false,
"MD036": false,
Expand Down
41 changes: 26 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,6 @@ source = "regex_commit"
path = "src/nextline_schedule/__about__.py"
tag_sign = false

[tool.hatch.envs.default]
dependencies = ["pytest", "pytest-cov"]
[tool.hatch.envs.default.scripts]
cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src/nextline_schedule --cov=tests {args}"
no-cov = "cov --no-cov {args}"

[[tool.hatch.envs.test.matrix]]
python = ["310", "311", "312"]

[tool.pytest.ini_options]
asyncio_mode = "auto"
timeout = 60
Expand All @@ -75,9 +66,32 @@ filterwarnings = ["ignore::hypothesis.errors.NonInteractiveExampleWarning"]
log_cli = false
log_cli_level = "INFO"

[tool.black]
skip-string-normalization = true
target_version = ['py310', 'py311', 'py312']
[tool.ruff]
line-length = 88

[tool.ruff.format]
quote-style = "preserve"

[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
]
ignore = [
"E203", # Whitespace before '{symbol}'
"E265", # Block comment should start with #
"E266", # Too many leading # before block comment
"E501", # Line too long ({width} > {limit})
"E741", # Ambiguous variable name '{name}'
]

[tool.ruff.lint.mccabe]
max-complexity = 20

[tool.ruff.lint.isort]
known-first-party = ["nextline", "nextlinegraphql"]

[tool.coverage.run]
branch = true
Expand All @@ -93,9 +107,6 @@ exclude_lines = [
"^ *\\.\\.\\.$",
]

[tool.isort]
profile = "black"

[tool.mypy]
plugins = "strawberry.ext.mypy_plugin"
disallow_untyped_defs = true
Expand Down
4 changes: 0 additions & 4 deletions setup.cfg

This file was deleted.

1 change: 0 additions & 1 deletion src/nextline_schedule/auto/auto_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from nextline import Nextline
from nextline.utils import pubsub

from nextline_schedule.types import Statement

from .callback import Callback, build_state_machine
Expand Down
3 changes: 2 additions & 1 deletion src/nextline_schedule/auto/state_machine/machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
from logging import getLogger
from typing import Any, Protocol

from nextline.utils import pubsub
from transitions.extensions.asyncio import HierarchicalAsyncMachine

from nextline.utils import pubsub

from .config import CONFIG


Expand Down
1 change: 1 addition & 0 deletions src/nextline_schedule/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from apluggy import asynccontextmanager
from dynaconf import Dynaconf, Validator

from nextlinegraphql.hook import spec

from .__about__ import __version__
Expand Down
2 changes: 1 addition & 1 deletion src/nextline_schedule/schema/scheduler/mutation.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from typing import Optional

import strawberry
from nextline import Nextline
from strawberry.types import Info

from nextline import Nextline
from nextline_schedule.scheduler import Scheduler


Expand Down
1 change: 0 additions & 1 deletion tests/auto/test_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from nextline import Nextline
from nextline.events import OnStartRun
from nextline.plugin.spec import hookimpl

from nextline_schedule.auto import AutoMode

STATEMENT_SCHEDULER = '''
Expand Down
1 change: 0 additions & 1 deletion tests/auto/test_auto_on_raised.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from typing import NoReturn

from nextline import Nextline

from nextline_schedule.auto import AutoMode

STATEMENT_QUEUE = '''
Expand Down
1 change: 0 additions & 1 deletion tests/auto/test_auto_turn_off.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from collections.abc import Callable

from nextline import Nextline

from nextline_schedule.auto import AutoMode

STATEMENT_QUEUE = '''
Expand Down
6 changes: 3 additions & 3 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
from collections.abc import AsyncIterator

import pytest
from nextlinegraphql import create_app
from nextlinegraphql.plugins.ctrl.graphql import SUBSCRIBE_STATE
from nextlinegraphql.plugins.graphql.test import TestClient, gql_request, gql_subscribe
from pytest_httpx import HTTPXMock

from nextline_schedule.graphql import (
Expand All @@ -14,6 +11,9 @@
QUERY_SCHEDULER,
SUBSCRIBE_AUTO_MODE_STATE,
)
from nextlinegraphql import create_app
from nextlinegraphql.plugins.ctrl.graphql import SUBSCRIBE_STATE
from nextlinegraphql.plugins.graphql.test import TestClient, gql_request, gql_subscribe


@pytest.fixture
Expand Down