@@ -215,38 +215,38 @@ def _getitem(
215
215
)
216
216
if hasattr (array , "_longitudinal_type" ):
217
217
longitudinal = array ._longitudinal_type .ObjectClass (
218
- * (out [x ] for x in _coordinate_class_to_names [_ltype (array )]) # type: ignore[arg-type]
218
+ * (out [x ] for x in _coordinate_class_to_names [_ltype (array )])
219
219
)
220
220
if hasattr (array , "_temporal_type" ):
221
221
temporal = array ._temporal_type .ObjectClass (
222
- * (out [x ] for x in _coordinate_class_to_names [_ttype (array )]) # type: ignore[arg-type]
222
+ * (out [x ] for x in _coordinate_class_to_names [_ttype (array )])
223
223
)
224
224
if temporal is not None :
225
225
return array .ObjectClass (
226
226
azimuthal = azimuthal ,
227
- longitudinal = longitudinal , # type: ignore[arg-type, return-value ]
227
+ longitudinal = longitudinal , # type: ignore[arg-type]
228
228
temporal = temporal , # type: ignore[arg-type]
229
229
)
230
230
elif longitudinal is not None :
231
- return array .ObjectClass (azimuthal = azimuthal , longitudinal = longitudinal ) # type: ignore[arg-type, return-value ]
231
+ return array .ObjectClass (azimuthal = azimuthal , longitudinal = longitudinal ) # type: ignore[arg-type]
232
232
elif azimuthal is not None :
233
- return array .ObjectClass (azimuthal = azimuthal ) # type: ignore[return-value]
233
+ return array .ObjectClass (azimuthal = azimuthal )
234
234
elif issubclass (array .ObjectClass , vector .backends .object .AzimuthalObject ):
235
- return array .ObjectClass (* tuple (out )[:2 ]) # type: ignore[arg-type, return-value ]
235
+ return array .ObjectClass (* tuple (out )[:2 ]) # type: ignore[arg-type]
236
236
elif issubclass (array .ObjectClass , vector .backends .object .LongitudinalObject ):
237
237
coords = (
238
238
out .view (numpy .ndarray )[0 ]
239
239
if len (out ) == 1 # type: ignore[arg-type]
240
240
else out .view (numpy .ndarray )[2 ]
241
241
)
242
- return array .ObjectClass (coords ) # type: ignore[return-value]
242
+ return array .ObjectClass (coords )
243
243
else :
244
244
coords = (
245
245
out .view (numpy .ndarray )[0 ]
246
246
if len (out ) == 1 # type: ignore[arg-type]
247
247
else out .view (numpy .ndarray )[3 ]
248
248
)
249
- return array .ObjectClass (coords ) # type: ignore[return-value]
249
+ return array .ObjectClass (coords )
250
250
251
251
252
252
def _array_repr (
@@ -879,14 +879,14 @@ def sum(
879
879
keepdims = keepdims ,
880
880
initial = initial ,
881
881
where = where ,
882
- ), # type: ignore[call-overload]
882
+ ),
883
883
)
884
884
885
885
def __eq__ (self , other : typing .Any ) -> typing .Any :
886
- return numpy .equal (self , other ) # type: ignore[call-overload]
886
+ return numpy .equal (self , other )
887
887
888
888
def __ne__ (self , other : typing .Any ) -> typing .Any :
889
- return numpy .not_equal (self , other ) # type: ignore[call-overload]
889
+ return numpy .not_equal (self , other )
890
890
891
891
def __reduce__ (self ) -> str | tuple [typing .Any , ...]:
892
892
pickled_state = super ().__reduce__ ()
@@ -1197,7 +1197,7 @@ def azimuthal(self) -> AzimuthalNumpy:
1197
1197
AzimuthalNumpyXY([(1.1, 2.1), (1.2, 2.2), (1.3, 2.3), (1.4, 2.4),
1198
1198
(1.5, 2.5)], dtype=[('x', '<f8'), ('y', '<f8')])
1199
1199
"""
1200
- return self .view (self ._azimuthal_type ) # type: ignore[return-value]
1200
+ return self .view (self ._azimuthal_type )
1201
1201
1202
1202
def _wrap_result (
1203
1203
self ,
@@ -1305,7 +1305,7 @@ def __setitem__(self, where: typing.Any, what: typing.Any) -> None:
1305
1305
return _setitem (self , where , what , False )
1306
1306
1307
1307
1308
- class MomentumNumpy2D (PlanarMomentum , VectorNumpy2D ): # type: ignore[misc]
1308
+ class MomentumNumpy2D (PlanarMomentum , VectorNumpy2D ):
1309
1309
"""
1310
1310
Two dimensional momentum vector class for the NumPy backend. This class can be directly
1311
1311
used to construct two dimensional NumPy momentum vectors. For two dimensional
@@ -1427,13 +1427,13 @@ def __repr__(self) -> str:
1427
1427
def azimuthal (self ) -> AzimuthalNumpy :
1428
1428
"""Returns the azimuthal type class for the given ``VectorNumpy3D`` object."""
1429
1429
# TODO: Add an example here - see https://github.com/scikit-hep/vector/issues/194
1430
- return self .view (self ._azimuthal_type ) # type: ignore[return-value]
1430
+ return self .view (self ._azimuthal_type )
1431
1431
1432
1432
@property
1433
1433
def longitudinal (self ) -> LongitudinalNumpy :
1434
1434
"""Returns the longitudinal type class for the given ``VectorNumpy3D`` object."""
1435
1435
# TODO: Add an example here - see https://github.com/scikit-hep/vector/issues/194
1436
- return self .view (self ._longitudinal_type ) # type: ignore[return-value]
1436
+ return self .view (self ._longitudinal_type )
1437
1437
1438
1438
def _wrap_result (
1439
1439
self ,
@@ -1562,7 +1562,7 @@ def __setitem__(self, where: typing.Any, what: typing.Any) -> None:
1562
1562
return _setitem (self , where , what , False )
1563
1563
1564
1564
1565
- class MomentumNumpy3D (SpatialMomentum , VectorNumpy3D ): # type: ignore[misc]
1565
+ class MomentumNumpy3D (SpatialMomentum , VectorNumpy3D ):
1566
1566
"""
1567
1567
Three dimensional momentum vector class for the NumPy backend. This class can be directly
1568
1568
used to construct three dimensional NumPy momentum vectors. For three dimensional
@@ -1707,19 +1707,19 @@ def __repr__(self) -> str:
1707
1707
def azimuthal (self ) -> AzimuthalNumpy :
1708
1708
"""Returns the azimuthal type class for the given ``VectorNumpy4D`` object."""
1709
1709
# TODO: Add an example here - see https://github.com/scikit-hep/vector/issues/194
1710
- return self .view (self ._azimuthal_type ) # type: ignore[return-value]
1710
+ return self .view (self ._azimuthal_type )
1711
1711
1712
1712
@property
1713
1713
def longitudinal (self ) -> LongitudinalNumpy :
1714
1714
"""Returns the longitudinal type class for the given ``Vectornumpy4D`` object."""
1715
1715
# TODO: Add an example here - see https://github.com/scikit-hep/vector/issues/194
1716
- return self .view (self ._longitudinal_type ) # type: ignore[return-value]
1716
+ return self .view (self ._longitudinal_type )
1717
1717
1718
1718
@property
1719
1719
def temporal (self ) -> TemporalNumpy :
1720
1720
"""Returns the azimuthal type class for the given ``VectorNumpy4D`` object."""
1721
1721
# TODO: Add an example here - see https://github.com/scikit-hep/vector/issues/194
1722
- return self .view (self ._temporal_type ) # type: ignore[return-value]
1722
+ return self .view (self ._temporal_type )
1723
1723
1724
1724
def _wrap_result (
1725
1725
self ,
@@ -1882,7 +1882,7 @@ def __setitem__(self, where: typing.Any, what: typing.Any) -> None:
1882
1882
return _setitem (self , where , what , False )
1883
1883
1884
1884
1885
- class MomentumNumpy4D (LorentzMomentum , VectorNumpy4D ): # type: ignore[misc]
1885
+ class MomentumNumpy4D (LorentzMomentum , VectorNumpy4D ):
1886
1886
"""
1887
1887
Four dimensional momentum vector class for the NumPy backend. This class can be directly
1888
1888
used to construct four dimensional NumPy momentum vectors. For three dimensional
0 commit comments