project updates
This commit is contained in:
27
.pre-commit-config.yaml
Normal file
27
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v6.0.0
|
||||||
|
hooks:
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
|
rev: v0.14.13
|
||||||
|
hooks:
|
||||||
|
- id: ruff-check
|
||||||
|
types_or: [ python, pyi ]
|
||||||
|
args: [--fix-only, --exit-non-zero-on-fix]
|
||||||
|
# - id: ruff-format
|
||||||
|
# types_or: [ python, pyi ]
|
||||||
|
- repo: https://github.com/codespell-project/codespell
|
||||||
|
# Configuration for codespell is in pyproject.toml
|
||||||
|
rev: v2.4.1
|
||||||
|
hooks:
|
||||||
|
- id: codespell
|
||||||
|
additional_dependencies:
|
||||||
|
- tomli
|
||||||
|
- repo: https://github.com/astral-sh/uv-pre-commit
|
||||||
|
# uv version.
|
||||||
|
rev: 0.9.26
|
||||||
|
hooks:
|
||||||
|
# Update the uv lockfile
|
||||||
|
- id: uv-lock
|
||||||
@@ -53,7 +53,7 @@ select = [
|
|||||||
"C4", # flake8-comprehensions
|
"C4", # flake8-comprehensions
|
||||||
"SIM", # flake8-simplify
|
"SIM", # flake8-simplify
|
||||||
]
|
]
|
||||||
ignore = []
|
ignore = ["UP046"]
|
||||||
|
|
||||||
[tool.ruff.lint.isort]
|
[tool.ruff.lint.isort]
|
||||||
known-first-party = ["daglib"]
|
known-first-party = ["daglib"]
|
||||||
|
|||||||
@@ -46,6 +46,11 @@ class TestDAGSetBasicOps:
|
|||||||
s = DAGSetView({1, 2, 3})
|
s = DAGSetView({1, 2, 3})
|
||||||
assert len(s) == 3
|
assert len(s) == 3
|
||||||
|
|
||||||
|
def test_iter(self) -> None:
|
||||||
|
s = DAGSetView({1, 2, 3})
|
||||||
|
for i, v in enumerate(s):
|
||||||
|
assert v == i + 1
|
||||||
|
|
||||||
def test_contains(self) -> None:
|
def test_contains(self) -> None:
|
||||||
s = DAGSetView({1, 2, 3})
|
s = DAGSetView({1, 2, 3})
|
||||||
assert 1 in s
|
assert 1 in s
|
||||||
@@ -80,11 +85,6 @@ class TestDAGSetBasicOps:
|
|||||||
with pytest.raises(KeyError):
|
with pytest.raises(KeyError):
|
||||||
s.remove(99)
|
s.remove(99)
|
||||||
|
|
||||||
def test_iter(self) -> None:
|
|
||||||
s = DAGSetView({1, 2, 3})
|
|
||||||
for i, v in enumerate(s):
|
|
||||||
assert v == i + 1
|
|
||||||
|
|
||||||
|
|
||||||
class TestDAGSetCallbacks:
|
class TestDAGSetCallbacks:
|
||||||
"""Test callback mechanisms."""
|
"""Test callback mechanisms."""
|
||||||
|
|||||||
Reference in New Issue
Block a user