From b13b9884378645a3c7cf788722b6314e11f6afc3 Mon Sep 17 00:00:00 2001 From: Ethan Rooke Date: Sun, 24 Mar 2024 12:17:52 -0500 Subject: [PATCH 1/3] build: use the new ruff.lint options instead of just ruff --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c3644e3..42329fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ requires-python = ">= 3.11" requires = ["hatchling"] build-backend = "hatchling.build" -[tool.ruff] +[tool.ruff.lint] select = ["E", "F", "I", "UP"] ignore = [] From 90ff0aa134f388335697b2d5988fcb70d4e39807 Mon Sep 17 00:00:00 2001 From: Ethan Rooke Date: Sun, 24 Mar 2024 12:21:13 -0500 Subject: [PATCH 2/3] chore: bump flake.lock --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 8e03912..7ed07fe 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1707451808, - "narHash": "sha256-UwDBUNHNRsYKFJzyTMVMTF5qS4xeJlWoeyJf+6vvamU=", + "lastModified": 1711231723, + "narHash": "sha256-dARJQ8AJOv6U+sdRePkbcVyVbXJTi1tReCrkkOeusiA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "442d407992384ed9c0e6d352de75b69079904e4e", + "rev": "e1d501922fd7351da4200e1275dfcf5faaad1220", "type": "github" }, "original": { From bfbf719a50ee8e44522347e9036d1aae7edc1fb0 Mon Sep 17 00:00:00 2001 From: Ethan Rooke Date: Sun, 24 Mar 2024 12:39:57 -0500 Subject: [PATCH 3/3] fmt: bump to Ruff formatter 2024.2 style --- src/zen_mapper/cluster.py | 3 +-- src/zen_mapper/cover.py | 9 +++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/zen_mapper/cluster.py b/src/zen_mapper/cluster.py index 223d889..f9701a1 100644 --- a/src/zen_mapper/cluster.py +++ b/src/zen_mapper/cluster.py @@ -14,8 +14,7 @@ class Clusterer(Protocol): iterator of arrays of indices into that array which are disjoint. """ - def __call__(self, data: np.ndarray) -> Iterator[np.ndarray]: - ... + def __call__(self, data: np.ndarray) -> Iterator[np.ndarray]: ... class sk_learn: diff --git a/src/zen_mapper/cover.py b/src/zen_mapper/cover.py index adeabbc..b11e563 100644 --- a/src/zen_mapper/cover.py +++ b/src/zen_mapper/cover.py @@ -8,16 +8,13 @@ class Cover(Protocol): - def __len__(self: Self) -> int: - ... + def __len__(self: Self) -> int: ... - def __iter__(self: Self) -> Iterator[np.ndarray]: - ... + def __iter__(self: Self) -> Iterator[np.ndarray]: ... class CoverScheme(Protocol): - def __call__(self: Self, data: np.ndarray) -> Cover: - ... + def __call__(self: Self, data: np.ndarray) -> Cover: ... def rectangular_cover(centers, widths, data, tol=1e-9):