Skip to content

Commit aa50783

Browse files
authored
🏷️ have stubdefaulter fill in the missing defaults (#907)
2 parents 7dd7ddc + c53118d commit aa50783

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1771
-1595
lines changed

scipy-stubs/_lib/_ccallback.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class LowLevelCallable(tuple[PyCapsule, _FuncT_co, _DataT_co], Generic[_FuncT_co
122122
@overload
123123
def __new__(cls, function: Self, user_data: _DataT_co | None = None, signature: str | None = None) -> Self: ...
124124
@overload
125-
def __new__(cls, function: _FuncT_co, user_data: _DataT_co = ..., signature: str | None = None) -> Self: ...
125+
def __new__(cls, function: _FuncT_co, user_data: _DataT_co, signature: str | None = None) -> Self: ...
126126
@classmethod
127127
@overload
128128
def from_cython(

scipy-stubs/constants/codata.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ __all__ = ["ConstantWarning", "c", "find", "k", "physical_constants", "precision
1010
class ConstantWarning(DeprecationWarning): ...
1111

1212
@deprecated("will be removed in SciPy v2.0.0")
13-
def find(sub: str | None = ..., disp: bool = ...) -> object: ...
13+
def find(sub: str | None = None, disp: bool = False) -> object: ...
1414
@deprecated("will be removed in SciPy v2.0.0")
1515
def precision(key: str) -> float: ...
1616
@deprecated("will be removed in SciPy v2.0.0")

scipy-stubs/fftpack/basic.pyi

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ __all__ = ["fft", "fft2", "fftn", "ifft", "ifft2", "ifftn", "irfft", "rfft"]
77
__MESSAGE: Final = "will be removed in SciPy v2.0.0"
88

99
@deprecated(__MESSAGE)
10-
def fft(x: object, n: object = ..., axis: object = ..., overwrite_x: object = ...) -> object: ...
10+
def fft(x: object, n: object = None, axis: object = -1, overwrite_x: object = False) -> object: ...
1111
@deprecated(__MESSAGE)
12-
def ifft(x: object, n: object = ..., axis: object = ..., overwrite_x: object = ...) -> object: ...
12+
def ifft(x: object, n: object = None, axis: object = -1, overwrite_x: object = False) -> object: ...
1313
@deprecated(__MESSAGE)
14-
def rfft(x: object, n: object = ..., axis: object = ..., overwrite_x: object = ...) -> object: ...
14+
def rfft(x: object, n: object = None, axis: object = -1, overwrite_x: object = False) -> object: ...
1515
@deprecated(__MESSAGE)
16-
def irfft(x: object, n: object = ..., axis: object = ..., overwrite_x: object = ...) -> object: ...
16+
def irfft(x: object, n: object = None, axis: object = -1, overwrite_x: object = False) -> object: ...
1717
@deprecated(__MESSAGE)
18-
def fftn(x: object, shape: object = ..., axes: object = ..., overwrite_x: object = ...) -> object: ...
18+
def fftn(x: object, shape: object = None, axes: object = None, overwrite_x: object = False) -> object: ...
1919
@deprecated(__MESSAGE)
20-
def ifftn(x: object, shape: object = ..., axes: object = ..., overwrite_x: object = ...) -> object: ...
20+
def ifftn(x: object, shape: object = None, axes: object = None, overwrite_x: object = False) -> object: ...
2121
@deprecated(__MESSAGE)
22-
def fft2(x: object, shape: object = ..., axes: object = ..., overwrite_x: object = ...) -> object: ...
22+
def fft2(x: object, shape: object = None, axes: object = (-2, -1), overwrite_x: object = False) -> object: ...
2323
@deprecated(__MESSAGE)
24-
def ifft2(x: object, shape: object = ..., axes: object = ..., overwrite_x: object = ...) -> object: ...
24+
def ifft2(x: object, shape: object = None, axes: object = (-2, -1), overwrite_x: object = False) -> object: ...

scipy-stubs/fftpack/helper.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ __all__ = ["fftfreq", "fftshift", "ifftshift", "next_fast_len", "rfftfreq"]
99
__MESSAGE: Final = "will be removed in SciPy v2.0.0"
1010

1111
@deprecated(__MESSAGE)
12-
def fftshift(x: object, axes: object = ...) -> object: ...
12+
def fftshift(x: object, axes: object = None) -> object: ...
1313
@deprecated(__MESSAGE)
14-
def ifftshift(x: object, axes: object = ...) -> object: ...
14+
def ifftshift(x: object, axes: object = None) -> object: ...
1515
@deprecated(__MESSAGE)
1616
def next_fast_len(target: object) -> object: ...
1717
@deprecated(__MESSAGE)
18-
def rfftfreq(n: object, d: object = ...) -> object: ...
18+
def rfftfreq(n: object, d: object = 1.0) -> object: ...

scipy-stubs/fftpack/pseudo_diffs.pyi

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ __all__ = ["cc_diff", "convolve", "cs_diff", "diff", "hilbert", "ihilbert", "iti
99
__MESSAGE: Final = "will be removed in SciPy v2.0.0"
1010

1111
@deprecated(__MESSAGE)
12-
def diff(x: object, order: object = 1, period: object = ..., _cache: object = ...) -> object: ...
12+
def diff(x: object, order: object = 1, period: object = None, _cache: object = ...) -> object: ...
1313
@deprecated(__MESSAGE)
14-
def tilbert(x: object, h: object, period: object = ..., _cache: object = ...) -> object: ...
14+
def tilbert(x: object, h: object, period: object = None, _cache: object = ...) -> object: ...
1515
@deprecated(__MESSAGE)
16-
def itilbert(x: object, h: object, period: object = ..., _cache: object = ...) -> object: ...
16+
def itilbert(x: object, h: object, period: object = None, _cache: object = ...) -> object: ...
1717
@deprecated(__MESSAGE)
1818
def hilbert(x: object, _cache: object = ...) -> object: ...
1919
@deprecated(__MESSAGE)
2020
def ihilbert(x: object) -> object: ...
2121
@deprecated(__MESSAGE)
22-
def cs_diff(x: object, a: object, b: object, period: object = ..., _cache: object = ...) -> object: ...
22+
def cs_diff(x: object, a: object, b: object, period: object = None, _cache: object = ...) -> object: ...
2323
@deprecated(__MESSAGE)
24-
def sc_diff(x: object, a: object, b: object, period: object = ..., _cache: object = ...) -> object: ...
24+
def sc_diff(x: object, a: object, b: object, period: object = None, _cache: object = ...) -> object: ...
2525
@deprecated(__MESSAGE)
26-
def ss_diff(x: object, a: object, b: object, period: object = ..., _cache: object = ...) -> object: ...
26+
def ss_diff(x: object, a: object, b: object, period: object = None, _cache: object = ...) -> object: ...
2727
@deprecated(__MESSAGE)
28-
def cc_diff(x: object, a: object, b: object, period: object = ..., _cache: object = ...) -> object: ...
28+
def cc_diff(x: object, a: object, b: object, period: object = None, _cache: object = ...) -> object: ...
2929
@deprecated(__MESSAGE)
30-
def shift(x: object, a: object, period: object = ..., _cache: object = ...) -> object: ...
30+
def shift(x: object, a: object, period: object = None, _cache: object = ...) -> object: ...

scipy-stubs/fftpack/realtransforms.pyi

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,33 @@ __MESSAGE: Final = "will be removed in SciPy v2.0.0"
88

99
@deprecated(__MESSAGE)
1010
def dctn(
11-
x: object, type: object = ..., shape: object = ..., axes: object = ..., norm: object = ..., overwrite_x: object = ...
11+
x: object, type: object = 2, shape: object = None, axes: object = None, norm: object = None, overwrite_x: object = False
1212
) -> object: ...
1313
@deprecated(__MESSAGE)
1414
def idctn(
15-
x: object, type: object = ..., shape: object = ..., axes: object = ..., norm: object = ..., overwrite_x: object = ...
15+
x: object, type: object = 2, shape: object = None, axes: object = None, norm: object = None, overwrite_x: object = False
1616
) -> object: ...
1717
@deprecated(__MESSAGE)
1818
def dstn(
19-
x: object, type: object = ..., shape: object = ..., axes: object = ..., norm: object = ..., overwrite_x: object = ...
19+
x: object, type: object = 2, shape: object = None, axes: object = None, norm: object = None, overwrite_x: object = False
2020
) -> object: ...
2121
@deprecated(__MESSAGE)
2222
def idstn(
23-
x: object, type: object = ..., shape: object = ..., axes: object = ..., norm: object = ..., overwrite_x: object = ...
23+
x: object, type: object = 2, shape: object = None, axes: object = None, norm: object = None, overwrite_x: object = False
2424
) -> object: ...
2525
@deprecated(__MESSAGE)
2626
def dct(
27-
x: object, type: object = ..., n: object = ..., axis: object = ..., norm: object = ..., overwrite_x: object = ...
27+
x: object, type: object = 2, n: object = None, axis: object = -1, norm: object = None, overwrite_x: object = False
2828
) -> object: ...
2929
@deprecated(__MESSAGE)
3030
def idct(
31-
x: object, type: object = ..., n: object = ..., axis: object = ..., norm: object = ..., overwrite_x: object = ...
31+
x: object, type: object = 2, n: object = None, axis: object = -1, norm: object = None, overwrite_x: object = False
3232
) -> object: ...
3333
@deprecated(__MESSAGE)
3434
def dst(
35-
x: object, type: object = ..., n: object = ..., axis: object = ..., norm: object = ..., overwrite_x: object = ...
35+
x: object, type: object = 2, n: object = None, axis: object = -1, norm: object = None, overwrite_x: object = False
3636
) -> object: ...
3737
@deprecated(__MESSAGE)
3838
def idst(
39-
x: object, type: object = ..., n: object = ..., axis: object = ..., norm: object = ..., overwrite_x: object = ...
39+
x: object, type: object = 2, n: object = None, axis: object = -1, norm: object = None, overwrite_x: object = False
4040
) -> object: ...

scipy-stubs/integrate/odepack.pyi

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ def odeint(
1111
func: object,
1212
y0: object,
1313
t: object,
14-
args: object = ...,
15-
Dfun: object = ...,
16-
col_deriv: object = ...,
17-
full_output: object = ...,
18-
ml: object = ...,
19-
mu: object = ...,
20-
rtol: object = ...,
21-
atol: object = ...,
22-
tcrit: object = ...,
23-
h0: object = ...,
24-
hmax: object = ...,
25-
hmin: object = ...,
26-
ixpr: object = ...,
27-
mxstep: object = ...,
28-
mxhnil: object = ...,
29-
mxordn: object = ...,
30-
mxords: object = ...,
31-
printmessg: object = ...,
32-
tfirst: object = ...,
14+
args: object = (),
15+
Dfun: object = None,
16+
col_deriv: object = 0,
17+
full_output: object = 0,
18+
ml: object = None,
19+
mu: object = None,
20+
rtol: object = None,
21+
atol: object = None,
22+
tcrit: object = None,
23+
h0: object = 0.0,
24+
hmax: object = 0.0,
25+
hmin: object = 0.0,
26+
ixpr: object = 0,
27+
mxstep: object = 0,
28+
mxhnil: object = 0,
29+
mxordn: object = 12,
30+
mxords: object = 5,
31+
printmessg: object = 0,
32+
tfirst: object = False,
3333
) -> object: ...

scipy-stubs/integrate/quadpack.pyi

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,34 @@ class IntegrationWarning(UserWarning): ...
88

99
@deprecated("will be removed in SciPy v2.0.0")
1010
def dblquad(
11-
func: object, a: object, b: object, gfun: object, hfun: object, args: object = ..., epsabs: object = ..., epsrel: object = ...
11+
func: object,
12+
a: object,
13+
b: object,
14+
gfun: object,
15+
hfun: object,
16+
args: object = (),
17+
epsabs: object = 1.49e-8,
18+
epsrel: object = 1.49e-8,
1219
) -> object: ...
1320
@deprecated("will be removed in SciPy v2.0.0")
14-
def nquad(func: object, ranges: object, args: object = ..., opts: object = ..., full_output: object = ...) -> object: ...
21+
def nquad(func: object, ranges: object, args: object = None, opts: object = None, full_output: object = False) -> object: ...
1522
@deprecated("will be removed in SciPy v2.0.0")
1623
def quad(
1724
func: object,
1825
a: object,
1926
b: object,
20-
args: object = ...,
21-
full_output: object = ...,
22-
epsabs: object = ...,
23-
epsrel: object = ...,
24-
limit: object = ...,
25-
points: object = ...,
26-
weight: object = ...,
27-
wvar: object = ...,
28-
wopts: object = ...,
29-
maxp1: object = ...,
30-
limlst: object = ...,
31-
complex_func: object = ...,
27+
args: object = (),
28+
full_output: object = 0,
29+
epsabs: object = 1.49e-8,
30+
epsrel: object = 1.49e-8,
31+
limit: object = 50,
32+
points: object = None,
33+
weight: object = None,
34+
wvar: object = None,
35+
wopts: object = None,
36+
maxp1: object = 50,
37+
limlst: object = 50,
38+
complex_func: object = False,
3239
) -> object: ...
3340
@deprecated("will be removed in SciPy v2.0.0")
3441
def tplquad(
@@ -39,7 +46,7 @@ def tplquad(
3946
hfun: object,
4047
qfun: object,
4148
rfun: object,
42-
args: object = ...,
43-
epsabs: object = ...,
44-
epsrel: object = ...,
49+
args: object = (),
50+
epsabs: object = 1.49e-8,
51+
epsrel: object = 1.49e-8,
4552
) -> object: ...

scipy-stubs/interpolate/_interpolate.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ class interp2d:
4343
x: Never,
4444
y: Never,
4545
z: Never,
46-
kind: object = ...,
47-
copy: object = ...,
48-
bounds_error: object = ...,
49-
fill_value: object = ...,
46+
kind: object = "linear",
47+
copy: object = True,
48+
bounds_error: object = False,
49+
fill_value: object = None,
5050
) -> Never: ...
5151

5252
class interp1d(_Interpolator1D): # legacy

scipy-stubs/interpolate/fitpack.pyi

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -26,68 +26,68 @@ class BSpline(_BSpline): ...
2626
@deprecated("will be removed in SciPy v2.0.0")
2727
def splprep(
2828
x: object,
29-
w: object = ...,
30-
u: object = ...,
31-
ub: object = ...,
32-
ue: object = ...,
33-
k: object = ...,
34-
task: object = ...,
35-
s: object = ...,
36-
t: object = ...,
37-
full_output: object = ...,
38-
nest: object = ...,
39-
per: object = ...,
40-
quiet: object = ...,
29+
w: object = None,
30+
u: object = None,
31+
ub: object = None,
32+
ue: object = None,
33+
k: object = 3,
34+
task: object = 0,
35+
s: object = None,
36+
t: object = None,
37+
full_output: object = 0,
38+
nest: object = None,
39+
per: object = 0,
40+
quiet: object = 1,
4141
) -> object: ...
4242
@deprecated("will be removed in SciPy v2.0.0")
4343
def splrep(
4444
x: object,
4545
y: object,
46-
w: object = ...,
47-
xb: object = ...,
48-
xe: object = ...,
49-
k: object = ...,
50-
task: object = ...,
51-
s: object = ...,
52-
t: object = ...,
53-
full_output: object = ...,
54-
per: object = ...,
55-
quiet: object = ...,
46+
w: object = None,
47+
xb: object = None,
48+
xe: object = None,
49+
k: object = 3,
50+
task: object = 0,
51+
s: object = None,
52+
t: object = None,
53+
full_output: object = 0,
54+
per: object = 0,
55+
quiet: object = 1,
5656
) -> object: ...
5757
@deprecated("will be removed in SciPy v2.0.0")
58-
def splev(x: object, tck: object, der: object = ..., ext: object = ...) -> object: ...
58+
def splev(x: object, tck: object, der: object = 0, ext: object = 0) -> object: ...
5959
@deprecated("will be removed in SciPy v2.0.0")
60-
def splint(a: object, b: object, tck: object, full_output: object = ...) -> object: ...
60+
def splint(a: object, b: object, tck: object, full_output: object = 0) -> object: ...
6161
@deprecated("will be removed in SciPy v2.0.0")
62-
def sproot(tck: object, mest: object = ...) -> object: ...
62+
def sproot(tck: object, mest: object = 10) -> object: ...
6363
@deprecated("will be removed in SciPy v2.0.0")
6464
def spalde(x: object, tck: object) -> object: ...
6565
@deprecated("will be removed in SciPy v2.0.0")
66-
def insert(x: object, tck: object, m: object = ..., per: object = ...) -> object: ...
66+
def insert(x: object, tck: object, m: object = 1, per: object = 0) -> object: ...
6767
@deprecated("will be removed in SciPy v2.0.0")
68-
def splder(tck: object, n: object = ...) -> object: ...
68+
def splder(tck: object, n: object = 1) -> object: ...
6969
@deprecated("will be removed in SciPy v2.0.0")
70-
def splantider(tck: object, n: object = ...) -> object: ...
70+
def splantider(tck: object, n: object = 1) -> object: ...
7171
@deprecated("will be removed in SciPy v2.0.0")
7272
def bisplrep(
7373
x: object,
7474
y: object,
7575
z: object,
76-
w: object = ...,
77-
xb: object = ...,
78-
xe: object = ...,
79-
yb: object = ...,
80-
ye: object = ...,
81-
kx: object = ...,
82-
ky: object = ...,
83-
task: object = ...,
84-
s: object = ...,
85-
eps: object = ...,
86-
tx: object = ...,
87-
ty: object = ...,
88-
full_output: object = ...,
89-
nxest: object = ...,
90-
nyest: object = ...,
91-
quiet: object = ...,
76+
w: object = None,
77+
xb: object = None,
78+
xe: object = None,
79+
yb: object = None,
80+
ye: object = None,
81+
kx: object = 3,
82+
ky: object = 3,
83+
task: object = 0,
84+
s: object = None,
85+
eps: object = 1e-16,
86+
tx: object = None,
87+
ty: object = None,
88+
full_output: object = 0,
89+
nxest: object = None,
90+
nyest: object = None,
91+
quiet: object = 1,
9292
) -> object: ...
93-
def bisplev(x: object, y: object, tck: object, dx: object = ..., dy: object = ...) -> object: ...
93+
def bisplev(x: object, y: object, tck: object, dx: object = 0, dy: object = 0) -> object: ...

0 commit comments

Comments
 (0)