From 1ad8bd30917f1be3d1c617d41bb226aed9f88f1d Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Mon, 27 Nov 2023 11:37:58 +1100 Subject: [PATCH 1/2] Add .pre-commit config file --- .pre-commit-config.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..9aefa25 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,6 @@ +repos: +- repo: https://github.com/google/yapf + rev: 'v0.40.2' # Use the sha / tag you want to point at + hooks: + - id: yapf + exclude: docs/conf.py From aad8985213a6bb07a0153929b63384aa64ee2647 Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Mon, 27 Nov 2023 11:40:13 +1100 Subject: [PATCH 2/2] Add formatting to test_affinder --- src/affinder/_tests/test_affinder.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/affinder/_tests/test_affinder.py b/src/affinder/_tests/test_affinder.py index 3e042b0..bd7ab72 100644 --- a/src/affinder/_tests/test_affinder.py +++ b/src/affinder/_tests/test_affinder.py @@ -9,7 +9,6 @@ from scipy import ndimage as ndi from pathlib import Path - layer0_pts = np.array([[140.38371886, 322.5390704], [181.91866481, 319.65803368], [176.15659138, 259.1562627], @@ -165,7 +164,4 @@ def test_load_affine(tmp_path): widget = load_affine() widget(layer, affile) - np.testing.assert_allclose( - layer.affine, affine - ) - + np.testing.assert_allclose(layer.affine, affine)