From 0e9e8c2a54fe923670497e6deea60d7fbe93b6cf Mon Sep 17 00:00:00 2001 From: Alec Koumjian Date: Fri, 26 Jul 2024 13:30:16 -0400 Subject: [PATCH] typing --- src/adam_core/coordinates/residuals.py | 2 +- src/adam_core/coordinates/transform.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/adam_core/coordinates/residuals.py b/src/adam_core/coordinates/residuals.py index 71490b83..e8c0cbec 100644 --- a/src/adam_core/coordinates/residuals.py +++ b/src/adam_core/coordinates/residuals.py @@ -194,7 +194,7 @@ def calculate( raise TypeError( f"Predicted coordinates must be one of {SUPPORTED_COORDINATES}, not {type(predicted)}." ) - if type(observed) != type(predicted): + if type(observed) is not type(predicted): raise TypeError( "Observed and predicted coordinates must be the same type, " f"not {type(observed)} and {type(predicted)}." diff --git a/src/adam_core/coordinates/transform.py b/src/adam_core/coordinates/transform.py index d4265f47..f531d5c9 100644 --- a/src/adam_core/coordinates/transform.py +++ b/src/adam_core/coordinates/transform.py @@ -1368,7 +1368,7 @@ def transform_coordinates( # `~adam_core.coordinates.origin.OriginCodes` so we can compare them directly. # If its not an OriginCodes enum then origin_out will be an array of strings which # also can be checked for equality. - if type(coords) == representation_out_: + if type(coords) is representation_out_: if coord_frame == frame_out and np.all(coord_origin == origin_out): return coords