Skip to content

Commit

Permalink
format and also add pdm scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sneakers-the-rat committed Oct 4, 2024
1 parent 8f1eb6e commit 7dbb22f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ distribution = true

[tool.pdm.build]
includes = []

[tool.pdm.scripts]
lint = "ruff check"
format = {shell = "ruff check --fix ; black ."}
test = "pytest"

[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _hdf5_array(
) -> H5ArrayPath:
array_path = "/" + "_".join([str(s) for s in shape]) + "__" + dtype.__name__
generator = np.random.default_rng()

if not compound:
if dtype is str:
data = generator.random(shape).astype(bytes)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_interface/test_interface_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Interfaces:

def test_interface_match_error(interfaces):
"""
Test that `match` and `match_output` raises errors when no or multiple matches
Test that `match` and `match_output` raises errors when no or multiple matches
are found
"""
with pytest.raises(ValueError) as e:
Expand Down
1 change: 1 addition & 0 deletions tests/test_ndarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ class Model(BaseModel):

def test_ndarray_union():
generator = np.random.default_rng()

class Model(BaseModel):
array: Optional[
Union[
Expand Down
2 changes: 1 addition & 1 deletion tests/test_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def test_absolute_path(hdf5_at_path, tmp_output_dir, model_blank):

def test_walk_and_apply():
"""
Walk and apply should recursively apply a function to everything in a
Walk and apply should recursively apply a function to everything in a
nesty structure
"""
test = {
Expand Down

0 comments on commit 7dbb22f

Please sign in to comment.