From 6dafafd3140de6f7450079a59ed6670df9df629c Mon Sep 17 00:00:00 2001 From: "askerosted@gmail.com" Date: Wed, 18 Dec 2024 13:55:26 +0900 Subject: [PATCH] typings to str --- .../data/extractors/icecube/i3highesteparticleextractor.py | 4 ++-- src/graphnet/data/extractors/icecube/utilities/gcd_hull.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/graphnet/data/extractors/icecube/i3highesteparticleextractor.py b/src/graphnet/data/extractors/icecube/i3highesteparticleextractor.py index 43434cde9..f28f1cf11 100644 --- a/src/graphnet/data/extractors/icecube/i3highesteparticleextractor.py +++ b/src/graphnet/data/extractors/icecube/i3highesteparticleextractor.py @@ -93,7 +93,7 @@ def frame_contains_info(self, frame: "icetray.I3Frame") -> bool: def highest_energy_track( self, frame: "icetray.I3Frame", checked_id_list: List = [] - ) -> dataclasses.I3Particle: + ) -> "dataclasses.I3Particle": """Get the highest energy track in the event. Args: @@ -153,7 +153,7 @@ def highest_energy_track( def highest_energy_cascade( self, frame: "icetray.I3Frame", checked_id_list: List = [] - ) -> dataclasses.I3Particle: + ) -> "dataclasses.I3Particle": """Get the highest energy cascade in the event. Args: diff --git a/src/graphnet/data/extractors/icecube/utilities/gcd_hull.py b/src/graphnet/data/extractors/icecube/utilities/gcd_hull.py index 0a2c63782..a831f8d48 100644 --- a/src/graphnet/data/extractors/icecube/utilities/gcd_hull.py +++ b/src/graphnet/data/extractors/icecube/utilities/gcd_hull.py @@ -11,6 +11,7 @@ if has_icecube_package() or TYPE_CHECKING: from icecube import ( MuonGun, + dataclasses, ) # pyright: reportMissingImports=false @@ -42,7 +43,9 @@ def __init__(self, gcd_file: str, padding: float = 0.0): # Base class constructor super().__init__(self.coords) - def point_in_hull(self, point: np.array, tolerance: float = 1e-12) -> bool: + def point_in_hull( + self, point: "dataclasses.I3Particle", tolerance: float = 1e-12 + ) -> bool: """Check if a point is inside the convex hull. Args: