@@ -269,18 +269,18 @@ def __post_init__(self):
269269 raise ValueError ("Reference sound speed must be greater than 0" )
270270 if self .ref_density <= 0 :
271271 raise ValueError ("Reference density must be greater than 0" )
272- if not isinstance (self .mainlobe_aspect_ratio , ( tuple , list ) ) or len (self .mainlobe_aspect_ratio ) != 3 :
272+ if not isinstance (self .mainlobe_aspect_ratio , tuple | list ) or len (self .mainlobe_aspect_ratio ) != 3 :
273273 raise TypeError ("Mainlobe aspect ratio must be a tuple or list of three floats (lat, ele, ax)" )
274274 self .mainlobe_aspect_ratio = tuple (self .mainlobe_aspect_ratio ) # Ensure it's a tuple
275- if not all (isinstance (x , ( int , float ) ) for x in self .mainlobe_aspect_ratio ):
275+ if not all (isinstance (x , int | float ) for x in self .mainlobe_aspect_ratio ):
276276 raise TypeError ("Mainlobe aspect ratio must contain only numbers" )
277- if not isinstance (self .mainlobe_radius , ( int , float ) ) or self .mainlobe_radius <= 0 :
277+ if not isinstance (self .mainlobe_radius , int | float ) or self .mainlobe_radius <= 0 :
278278 raise ValueError ("Mainlobe radius must be a positive number" )
279- if not isinstance (self .beamwidth_radius , ( int , float ) ) or self .beamwidth_radius <= 0 :
279+ if not isinstance (self .beamwidth_radius , int | float ) or self .beamwidth_radius <= 0 :
280280 raise ValueError ("Beamwidth radius must be a positive number" )
281- if not isinstance (self .sidelobe_radius , ( int , float ) ) or self .sidelobe_radius <= 0 :
281+ if not isinstance (self .sidelobe_radius , int | float ) or self .sidelobe_radius <= 0 :
282282 raise ValueError ("Sidelobe radius must be a positive number" )
283- if not isinstance (self .sidelobe_zmin , ( int , float ) ) or self .sidelobe_zmin < 0 :
283+ if not isinstance (self .sidelobe_zmin , int | float ) or self .sidelobe_zmin < 0 :
284284 raise ValueError ("Sidelobe minimum z must be a non-negative number" )
285285 if not isinstance (self .distance_units , str ):
286286 raise TypeError ("Distance units must be a string" )
0 commit comments