Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix stubtest __all__ errors #14

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

# TODO: don't continue on error
- name: basedmypy stubtest
run: poetry run stubtest --concise --mypy-config-file=pyproject.toml --allowlist=tests/stubtest/allowlist.txt scipy
run: poetry run stubtest --concise --ignore-positional-only --mypy-config-file=pyproject.toml --allowlist=tests/stubtest/allowlist.txt scipy
continue-on-error: true

# TODO
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ pyright), the "type completeness score" is **42.4%**.
| `scipy.odr` | 1: skeleton |
| `scipy.optimize` | 2: partial |
| `scipy.optimize.cython_optimize` | 0: missing |
| `scipy.optimize.zeros` | 0: missing |
| `scipy.signal` | 2: partial |
| `scipy.signal.windows` | 1: skeleton |
| `scipy.sparse` | 2: partial |
Expand Down
2 changes: 0 additions & 2 deletions scipy-stubs/constants/codata.pyi

This file was deleted.

2 changes: 0 additions & 2 deletions scipy-stubs/constants/constants.pyi

This file was deleted.

6 changes: 0 additions & 6 deletions scipy-stubs/optimize/elementwise.pyi

This file was deleted.

2 changes: 1 addition & 1 deletion scipy-stubs/spatial/transform/rotation.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from ._rotation import Rotation, Slerp

__all__ = "Rotation", "Slerp"
__all__ = ["Rotation", "Slerp"]
2,954 changes: 0 additions & 2,954 deletions stubtest.txt

This file was deleted.

80 changes: 76 additions & 4 deletions tests/stubtest/allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,35 +72,107 @@ scipy._lib.array_api_compat.dask.*
scipy._lib.array_api_compat.numpy.*
scipy._lib.array_api_compat.torch
scipy._lib.array_api_compat.common._typing.*
scipy._lib.cobyqa
scipy._lib.cobyqa.*
scipy._lib.messagestream
scipy.fft._pocketfft.pypocketfft.*
scipy.special.add_newdocs
scipy.special.libsf_error_state
scipy.special._precompute.*
scipy.special._support_alternative_backends.*
scipy.stats._rcont.rcont
scipy.stats._rcont.rcont
scipy.stats._unuran.unuran_wrapper

# deprecated public api
# deprecated public api (will be removed in scipy 2.0.0)
scipy.constants.codata
scipy.constants.constants
scipy.integrate.lsoda.*
scipy.integrate.odepack.*
scipy.integrate.quadpack.*
scipy.integrate.quadrature
scipy.integrate.romberg
scipy.integrate._quadrature.quadrature
scipy.integrate._quadrature.romberg
scipy.linalg.basic.*
scipy.linalg.decomp.*
scipy.linalg.matfuncs.*
scipy.linalg.misc.*
scipy.linalg.special_matrices.*
scipy.optimize.cobyla.*
scipy.optimize.lbfgsb.*
scipy.optimize.linesearch.*
scipy.optimize.minpack.*
scipy.optimize.nonlin.*
scipy.optimize.optimize.*
scipy.optimize.slsqp.*
scipy.optimize.tnc.*
scipy.optimize.zeros.*
scipy.special.basic
scipy.special.orthogonal
scipy.special.sf_error
scipy.special.specfun
scipy.special.spfun_stats
scipy.linalg.basic
scipy.linalg.decomp*
scipy.stats.kde.*
scipy.stats.morestats.*
scipy.stats.mstats_basic.*
scipy.stats.mstats_extras.*
scipy.stats.stats.*

# random mypy hallucinations
scipy.interpolate.AAA
scipy.interpolate._aaa
scipy.interpolate._interpnd_info

# mypy didn't read the typing specs on `__all__` within stubs
scipy._lib._ccallback.__all__
scipy._lib.array_api_compat.__all__
scipy._lib.array_api_compat.common.__all__
scipy.integrate._ivp.__all__
scipy.linalg._decomp_lu_cython.__all__
scipy.linalg._solve_toeplitz.__all__
scipy.optimize._constraints.__all__
scipy.optimize._lsap.__all__
scipy.optimize._remove_redundancy.__all__
scipy.optimize._trlib._trlib.__all__
scipy.signal._signaltools.__all__
scipy.sparse._matrix.__all__
scipy.sparse.csgraph.__all__
scipy.sparse.csgraph._flow.__all__
scipy.sparse.csgraph._laplacian.__all__
scipy.sparse.csgraph._matching.__all__
scipy.sparse.csgraph._min_spanning_tree.__all__
scipy.sparse.csgraph._reordering.__all__
scipy.sparse.csgraph._shortest_path.__all__
scipy.sparse.csgraph._tools.__all__
scipy.sparse.csgraph._traversal.__all__
scipy.sparse.linalg._dsolve._superlu.__all__
scipy.spatial.transform._rotation.__all__
scipy.spatial.transform._rotation_spline.__all__
scipy.special._add_newdocs.__all__
scipy.special._ellip_harm.__all__
scipy.special._lambertw.__all__
scipy.special._orthogonal.__all__
scipy.special._sf_error.__all__
scipy.special._spherical_bessel.__all__
scipy.special.cython_special.__all__
scipy.stats._binomtest.__all__
scipy.stats._bws_test.__all__
scipy.stats._censored_data.__all__
scipy.stats._common.__all__
scipy.stats._distn_infrastructure.__all__
scipy.stats._distr_params.__all__

# mypy doesn't know how to sort `__all__`
scipy.constants.__all__
scipy.integrate.__all__
scipy.linalg.__all__
scipy.sparse.linalg._dsolve.__all__
scipy.spatial.ckdtree.__all__
scipy.spatial.kdtree.__all__
scipy.spatial.qhull.__all__
scipy.special.__all__
scipy.stats.__all__
scipy.stats._continuous_distns.__all__
scipy.stats._discrete_distns.__all__
scipy.stats.distributions.__all__
scipy.stats.sampling.__all__
Loading