From 9eea4e7b90de089cb9d8ad529435bd94049aab65 Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Mon, 27 Nov 2023 09:19:46 +0100 Subject: [PATCH] add pre commit (#86) - Add .pre-commit config file - Add formatting to test_affinder --- .pre-commit-config.yaml | 6 ++++++ src/affinder/_tests/test_affinder.py | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) 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 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)