From 6ae43359db93544304c4d27e544cee743bfc968f Mon Sep 17 00:00:00 2001 From: Elisa-Visentin <121040436+Elisa-Visentin@users.noreply.github.com> Date: Tue, 14 Apr 2026 15:01:52 +0200 Subject: [PATCH 1/3] Update .pre-commit-config.yaml --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 37fb1650..731a06b3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: - id: black-jupyter # https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html?highlight=other%20tools#flake8 - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 + rev: 6.1.0 hooks: - id: flake8 args: [--max-line-length=88, "--extend-ignore=E203,E712"] From de31322d007d37a93921c093a7db2edff8760e2a Mon Sep 17 00:00:00 2001 From: Elisa-Visentin <121040436+Elisa-Visentin@users.noreply.github.com> Date: Tue, 14 Apr 2026 15:19:43 +0200 Subject: [PATCH 2/3] Update calib.py --- magicctapipe/image/calib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/magicctapipe/image/calib.py b/magicctapipe/image/calib.py index d51bef95..71e437f6 100644 --- a/magicctapipe/image/calib.py +++ b/magicctapipe/image/calib.py @@ -68,11 +68,11 @@ def calibrate( raise ValueError( "Check the provided parameters and the telescope type; LST calibration not possible if gamera_geoms not provided" ) - if (not is_lst) and (type(magic_clean[tel_id]) != MAGICClean): + if (not is_lst) and (not isinstance(magic_clean[tel_id]), MAGICClean): raise ValueError( "Check the provided magic_clean parameter; MAGIC calibration not possible if magic_clean not a dictionary of MAGICClean objects" ) - if (is_lst) and (type(camera_geoms[tel_id]) != CameraGeometry): + if (is_lst) and (not isinstance(camera_geoms[tel_id]), CameraGeometry): raise ValueError( "Check the provided camera_geoms parameter; LST calibration not possible if camera_geoms not a dictionary of CameraGeometry objects" ) From 02a35e66214e29ebbdb4207e3bf2e2c45365f043 Mon Sep 17 00:00:00 2001 From: Elisa-Visentin <121040436+Elisa-Visentin@users.noreply.github.com> Date: Wed, 15 Apr 2026 12:44:53 +0200 Subject: [PATCH 3/3] messed up parentheses --- magicctapipe/image/calib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/magicctapipe/image/calib.py b/magicctapipe/image/calib.py index 71e437f6..8505b05d 100644 --- a/magicctapipe/image/calib.py +++ b/magicctapipe/image/calib.py @@ -68,11 +68,11 @@ def calibrate( raise ValueError( "Check the provided parameters and the telescope type; LST calibration not possible if gamera_geoms not provided" ) - if (not is_lst) and (not isinstance(magic_clean[tel_id]), MAGICClean): + if (not is_lst) and (not isinstance(magic_clean[tel_id], MAGICClean)): raise ValueError( "Check the provided magic_clean parameter; MAGIC calibration not possible if magic_clean not a dictionary of MAGICClean objects" ) - if (is_lst) and (not isinstance(camera_geoms[tel_id]), CameraGeometry): + if (is_lst) and (not isinstance(camera_geoms[tel_id], CameraGeometry)): raise ValueError( "Check the provided camera_geoms parameter; LST calibration not possible if camera_geoms not a dictionary of CameraGeometry objects" )