Skip to content

Commit 4267e6b

Browse files
authored
Merge pull request #1 from Vizonex/linter-test
Linter test
2 parents 844f119 + 0dc2aa9 commit 4267e6b

File tree

15 files changed

+123
-35
lines changed

15 files changed

+123
-35
lines changed

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ dependencies = [
1414
"reductable-params==0.2.2",
1515
]
1616

17+
[project.optional-dependencies]
18+
# attrs is included but might be removed in the future
19+
# but mainly readded back into the future documentation
20+
# on how to wrap in attrs.
21+
attrs = ["attrs>=26.1.0"]
22+
1723
[build-system]
1824
requires = ["setuptools"]
1925

requirements/dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
-r pytest.txt
2-
-r ruff.txt
2+
-r lint.txt
33
-e .

requirements/lint.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ruff>=0.15.9
2+
# mypy==1.20.0 TODO

requirements/pytest.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
-e .
2+
-r lint.txt
23
pytest
34
pytest-cov==7.1.0
45
anyio

requirements/ruff.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

ruff.toml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
1-
line-length = 79
1+
line-length = 80
22
indent-width = 4
3+
4+
[lint]
5+
select = [
6+
# Pyflakes
7+
"F",
8+
# Pycodestyle
9+
"E",
10+
"W",
11+
# isort
12+
"I001"
13+
]

src/aioplugin/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
from .plugin import Plugin
1111

1212
__author__ = "Vizonex"
13-
__version__ = "0.1.0"
13+
__version__ = "0.1.1"
1414
__all__ = ("event", "Plugin")

src/aioplugin/attrs.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
from .paramsignal import ParamSignal
77
from .plugin import AbstractPlugin
88

9+
# TODO: These might be deprecated in the future and put into the
10+
# documentation on how to use with other dataclass libraries.
11+
912

1013
@define
1114
class AttrsPlugin(AbstractPlugin):
@@ -20,7 +23,8 @@ class AttrsPlugin(AbstractPlugin):
2023

2124
@define(slots=True)
2225
class AttrsSlotsPlugin(AbstractPlugin):
23-
"""Use if your main plugin object requires the use of attrs object with slots enabled."""
26+
"""Use if your main plugin object requires the use of attrs object
27+
with slots enabled."""
2428

2529
_events: FrozenDict[str, ParamSignal[...]] = field(
2630
factory=FrozenDict, init=False

src/aioplugin/dataclass.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ class DataclassPlugin(_Plugin):
2222

2323
@dataclass(slots=True)
2424
class DataclassSlotsPlugin(_Plugin):
25-
"""Use if your main plugin object requires the use of dataclasses with slots enabled."""
25+
"""Use if your main plugin object requires the use of dataclasses
26+
with slots enabled."""
2627

2728
_events: FrozenDict[str, ParamSignal[...]] = field(
2829
default_factory=FrozenDict, init=False

src/aioplugin/event.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from __future__ import annotations
2+
23
import sys
34
from collections.abc import Awaitable, Callable, Mapping
45
from typing import Any, Generic, Protocol, TypeVar, overload

0 commit comments

Comments
 (0)