Skip to content

Commit 06ed165

Browse files
committed
fix-format
1 parent f4a9cca commit 06ed165

4 files changed

Lines changed: 14 additions & 50 deletions

File tree

src/numpy-stubs/lib/_function_base_impl.pyi

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -524,49 +524,31 @@ def gradient(
524524
) -> _nt.Array1D[_InexactTimeT] | Any: ...
525525
@overload # 1d, known inexact scalar-type
526526
def gradient(
527-
f: _nt.Array1D[_InexactTimeT],
528-
*varargs: _nt.CoComplex_nd,
529-
axis: _nt.ToShape | None = None,
530-
edge_order: L[1, 2] = 1,
527+
f: _nt.Array1D[_InexactTimeT], *varargs: _nt.CoComplex_nd, axis: _nt.ToShape | None = None, edge_order: L[1, 2] = 1
531528
) -> _nt.Array1D[_InexactTimeT]: ...
532529
@overload # 2d, known inexact scalar-type
533530
def gradient(
534-
f: _nt.Array2D[_InexactTimeT],
535-
*varargs: _nt.CoComplex_nd,
536-
axis: _nt.ToShape | None = None,
537-
edge_order: L[1, 2] = 1,
531+
f: _nt.Array2D[_InexactTimeT], *varargs: _nt.CoComplex_nd, axis: _nt.ToShape | None = None, edge_order: L[1, 2] = 1
538532
) -> _Mesh2[_InexactTimeT, _InexactTimeT]: ...
539533
@overload # 3d, known inexact scalar-type
540534
def gradient(
541-
f: _nt.Array3D[_InexactTimeT],
542-
*varargs: _nt.CoComplex_nd,
543-
axis: _nt.ToShape | None = None,
544-
edge_order: L[1, 2] = 1,
535+
f: _nt.Array3D[_InexactTimeT], *varargs: _nt.CoComplex_nd, axis: _nt.ToShape | None = None, edge_order: L[1, 2] = 1
545536
) -> _Mesh3[_InexactTimeT, _InexactTimeT, _InexactTimeT]: ...
546537
@overload # ?d, datetime64 scalar-type
547538
def gradient(
548539
f: _ArrayNoD[np.datetime64], *varargs: _nt.CoComplex_nd, axis: _nt.ToShape | None = None, edge_order: L[1, 2] = 1
549540
) -> _nt.Array1D[np.timedelta64] | tuple[_nt.Array[np.timedelta64], ...]: ...
550541
@overload # 1d, datetime64 scalar-type
551542
def gradient(
552-
f: _nt.Array1D[np.datetime64],
553-
*varargs: _nt.CoComplex_nd,
554-
axis: _nt.ToShape | None = None,
555-
edge_order: L[1, 2] = 1,
543+
f: _nt.Array1D[np.datetime64], *varargs: _nt.CoComplex_nd, axis: _nt.ToShape | None = None, edge_order: L[1, 2] = 1
556544
) -> _nt.Array1D[np.timedelta64]: ...
557545
@overload # 2d, datetime64 scalar-type
558546
def gradient(
559-
f: _nt.Array2D[np.datetime64],
560-
*varargs: _nt.CoComplex_nd,
561-
axis: _nt.ToShape | None = None,
562-
edge_order: L[1, 2] = 1,
547+
f: _nt.Array2D[np.datetime64], *varargs: _nt.CoComplex_nd, axis: _nt.ToShape | None = None, edge_order: L[1, 2] = 1
563548
) -> _Mesh2[np.timedelta64, np.timedelta64]: ...
564549
@overload # 3d, datetime64 scalar-type
565550
def gradient(
566-
f: _nt.Array3D[np.datetime64],
567-
*varargs: _nt.CoComplex_nd,
568-
axis: _nt.ToShape | None = None,
569-
edge_order: L[1, 2] = 1,
551+
f: _nt.Array3D[np.datetime64], *varargs: _nt.CoComplex_nd, axis: _nt.ToShape | None = None, edge_order: L[1, 2] = 1
570552
) -> _Mesh3[np.timedelta64, np.timedelta64, np.timedelta64]: ...
571553
@overload # 1d float-like
572554
def gradient(
@@ -1337,11 +1319,7 @@ def median(
13371319
) -> _nt.Array[np.float64]: ...
13381320
@overload # float array-like, axis=<given>
13391321
def median(
1340-
a: _nt.SequenceND[float],
1341-
axis: _nt.ToShape,
1342-
out: None = None,
1343-
overwrite_input: bool = False,
1344-
keepdims: bool = False,
1322+
a: _nt.SequenceND[float], axis: _nt.ToShape, out: None = None, overwrite_input: bool = False, keepdims: bool = False
13451323
) -> _nt.Array[np.float64]: ...
13461324
@overload # complex array-like, keepdims=True
13471325
def median(

src/numpy-stubs/ma/core.pyi

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,9 +1309,7 @@ class MaskedArray(np.ndarray[_ShapeT_co, _DTypeT_co]):
13091309
self, axis: _nt.ToShape | None = None, out: None = None, keepdims: bool | _NoValueType = ...
13101310
) -> bool_ | _nt.MArray[bool_]: ...
13111311
@overload
1312-
def all(
1313-
self, axis: _nt.ToShape | None = None, *, out: _ArrayT, keepdims: bool | _NoValueType = ...
1314-
) -> _ArrayT: ...
1312+
def all(self, axis: _nt.ToShape | None = None, *, out: _ArrayT, keepdims: bool | _NoValueType = ...) -> _ArrayT: ...
13151313
@overload
13161314
def all(self, axis: _nt.ToShape | None, out: _ArrayT, keepdims: bool | _NoValueType = ...) -> _ArrayT: ... # pyright: ignore[reportIncompatibleMethodOverride]
13171315

@@ -1328,9 +1326,7 @@ class MaskedArray(np.ndarray[_ShapeT_co, _DTypeT_co]):
13281326
self, axis: _nt.ToShape | None = None, out: None = None, keepdims: bool | _NoValueType = ...
13291327
) -> bool_ | _nt.MArray[bool_]: ...
13301328
@overload
1331-
def any(
1332-
self, axis: _nt.ToShape | None = None, *, out: _ArrayT, keepdims: bool | _NoValueType = ...
1333-
) -> _ArrayT: ...
1329+
def any(self, axis: _nt.ToShape | None = None, *, out: _ArrayT, keepdims: bool | _NoValueType = ...) -> _ArrayT: ...
13341330
@overload
13351331
def any(self, axis: _nt.ToShape | None, out: _ArrayT, keepdims: bool | _NoValueType = ...) -> _ArrayT: ... # pyright: ignore[reportIncompatibleMethodOverride]
13361332

src/numpy-stubs/random/_generator.pyi

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,7 @@ class Generator:
434434
@overload # size: (int, ...)
435435
def chisquare(self, /, df: _nt.CoFloating_nd, size: _nt.ToShape) -> _nt.Array[np.float64]: ...
436436
@overload # fallback
437-
def chisquare(
438-
self, /, df: _nt.CoFloating_nd, size: _nt.ToShape | None = None
439-
) -> float | _nt.Array[np.float64]: ...
437+
def chisquare(self, /, df: _nt.CoFloating_nd, size: _nt.ToShape | None = None) -> float | _nt.Array[np.float64]: ...
440438

441439
#
442440
@overload # workaround for microsoft/pyright#10232
@@ -685,9 +683,7 @@ class Generator:
685683
@overload # size: None (default)
686684
def f(self, /, dfnum: _nt.CoFloating_0d, dfden: _nt.CoFloating_0d, size: None = None) -> float: ...
687685
@overload # size: (int, ...)
688-
def f(
689-
self, /, dfnum: _nt.CoFloating_nd, dfden: _nt.CoFloating_nd, size: _nt.ToShape
690-
) -> _nt.Array[np.float64]: ...
686+
def f(self, /, dfnum: _nt.CoFloating_nd, dfden: _nt.CoFloating_nd, size: _nt.ToShape) -> _nt.Array[np.float64]: ...
691687
@overload # fallback
692688
def f(
693689
self, /, dfnum: _nt.CoFloating_nd, dfden: _nt.CoFloating_nd, size: _nt.ToShape | None = None

src/numpy-stubs/random/mtrand.pyi

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,7 @@ class RandomState:
306306
@overload # size: (int, ...)
307307
def chisquare(self, /, df: _nt.CoFloating_nd, size: _nt.ToShape) -> _nt.Array[np.float64]: ...
308308
@overload # fallback
309-
def chisquare(
310-
self, /, df: _nt.CoFloating_nd, size: _nt.ToShape | None = None
311-
) -> float | _nt.Array[np.float64]: ...
309+
def chisquare(self, /, df: _nt.CoFloating_nd, size: _nt.ToShape | None = None) -> float | _nt.Array[np.float64]: ...
312310

313311
#
314312
@overload # size: None (default)
@@ -418,9 +416,7 @@ class RandomState:
418416
@overload # size: None (default)
419417
def f(self, /, dfnum: float, dfden: float, size: None = None) -> float: ...
420418
@overload # size: (int, ...)
421-
def f(
422-
self, /, dfnum: _nt.CoFloating_nd, dfden: _nt.CoFloating_nd, size: _nt.ToShape
423-
) -> _nt.Array[np.float64]: ...
419+
def f(self, /, dfnum: _nt.CoFloating_nd, dfden: _nt.CoFloating_nd, size: _nt.ToShape) -> _nt.Array[np.float64]: ...
424420
@overload # fallback
425421
def f(
426422
self, /, dfnum: _nt.CoFloating_nd, dfden: _nt.CoFloating_nd, size: _nt.ToShape | None = None
@@ -816,9 +812,7 @@ class RandomState:
816812
@overload # size: (int, ...) (keyword)
817813
def poisson(self, /, lam: _nt.CoFloating_nd = 1.0, *, size: _nt.ToShape) -> _nt.Array[np.int_]: ...
818814
@overload # fallback
819-
def poisson(
820-
self, /, lam: _nt.CoFloating_nd = 1.0, size: _nt.ToShape | None = None
821-
) -> int | _nt.Array[np.int_]: ...
815+
def poisson(self, /, lam: _nt.CoFloating_nd = 1.0, size: _nt.ToShape | None = None) -> int | _nt.Array[np.int_]: ...
822816

823817
#
824818
@overload # size: None (default)

0 commit comments

Comments
 (0)