From 2e0624116ea217a06c29a7e84f96a78b9db1d2b2 Mon Sep 17 00:00:00 2001 From: Avasam Date: Fri, 3 May 2024 12:38:08 -0400 Subject: [PATCH 1/2] Fx sympy stubs to enable CI checks (#310) --- .../sklearn/externals/_packaging/version.pyi | 30 +++++++++++-------- stubs/sympy-stubs/algebras/quaternion.pyi | 4 +-- stubs/sympy-stubs/assumptions/assume.pyi | 3 +- stubs/sympy-stubs/assumptions/cnf.pyi | 3 +- .../assumptions/handlers/common.pyi | 3 +- .../assumptions/predicates/matrices.pyi | 2 +- .../assumptions/predicates/ntheory.pyi | 2 +- .../assumptions/predicates/order.pyi | 2 +- .../assumptions/relation/binrel.pyi | 3 +- stubs/sympy-stubs/assumptions/wrapper.pyi | 3 +- .../calculus/accumulationbounds.pyi | 2 +- stubs/sympy-stubs/categories/baseclasses.pyi | 3 +- stubs/sympy-stubs/codegen/ast.pyi | 3 +- stubs/sympy-stubs/codegen/cnodes.pyi | 2 +- stubs/sympy-stubs/codegen/fnodes.pyi | 2 +- .../sympy-stubs/combinatorics/coset_table.pyi | 3 +- stubs/sympy-stubs/combinatorics/fp_groups.pyi | 3 +- .../sympy-stubs/combinatorics/free_groups.pyi | 5 ++-- stubs/sympy-stubs/combinatorics/graycode.pyi | 3 +- .../sympy-stubs/combinatorics/partitions.pyi | 3 +- .../sympy-stubs/combinatorics/perm_groups.pyi | 3 +- .../combinatorics/permutations.pyi | 3 +- .../sympy-stubs/combinatorics/polyhedron.pyi | 3 +- stubs/sympy-stubs/combinatorics/prufer.pyi | 3 +- .../combinatorics/rewritingsystem_fsm.pyi | 2 +- stubs/sympy-stubs/combinatorics/subsets.pyi | 3 +- .../concrete/expr_with_intlimits.pyi | 2 +- .../sympy-stubs/concrete/expr_with_limits.pyi | 3 +- stubs/sympy-stubs/concrete/products.pyi | 3 +- stubs/sympy-stubs/concrete/summations.pyi | 3 +- stubs/sympy-stubs/core/add.pyi | 3 +- stubs/sympy-stubs/core/assumptions.pyi | 3 +- stubs/sympy-stubs/core/basic.pyi | 3 +- stubs/sympy-stubs/core/containers.pyi | 3 +- stubs/sympy-stubs/core/evalf.pyi | 16 +--------- stubs/sympy-stubs/core/expr.pyi | 6 ++-- stubs/sympy-stubs/core/exprtools.pyi | 3 +- stubs/sympy-stubs/core/function.pyi | 3 +- stubs/sympy-stubs/core/kind.pyi | 3 +- stubs/sympy-stubs/core/logic.pyi | 3 +- stubs/sympy-stubs/core/mul.pyi | 3 +- stubs/sympy-stubs/core/numbers.pyi | 4 +-- stubs/sympy-stubs/core/operations.pyi | 3 +- stubs/sympy-stubs/core/power.pyi | 3 +- stubs/sympy-stubs/core/relational.pyi | 3 +- stubs/sympy-stubs/core/symbol.pyi | 3 +- stubs/sympy-stubs/core/traversal.pyi | 3 +- stubs/sympy-stubs/crypto/crypto.pyi | 4 +-- stubs/sympy-stubs/diffgeom/diffgeom.pyi | 3 +- stubs/sympy-stubs/external/pythonmpq.pyi | 3 +- .../functions/combinatorial/numbers.pyi | 3 +- .../functions/elementary/complexes.pyi | 3 +- .../functions/elementary/exponential.pyi | 3 +- .../functions/elementary/hyperbolic.pyi | 3 +- .../functions/elementary/miscellaneous.pyi | 2 +- .../functions/elementary/piecewise.pyi | 3 +- .../functions/elementary/trigonometric.pyi | 3 +- .../functions/special/beta_functions.pyi | 2 +- .../functions/special/delta_functions.pyi | 3 +- stubs/sympy-stubs/functions/special/hyper.pyi | 2 +- .../functions/special/mathieu_functions.pyi | 2 +- .../special/singularity_functions.pyi | 2 +- .../functions/special/tensor_functions.pyi | 3 +- .../functions/special/zeta_functions.pyi | 2 +- stubs/sympy-stubs/geometry/curve.pyi | 3 +- stubs/sympy-stubs/geometry/ellipse.pyi | 3 +- stubs/sympy-stubs/geometry/entity.pyi | 3 +- stubs/sympy-stubs/geometry/line.pyi | 4 +-- stubs/sympy-stubs/geometry/parabola.pyi | 3 +- stubs/sympy-stubs/geometry/plane.pyi | 3 +- stubs/sympy-stubs/geometry/point.pyi | 3 +- stubs/sympy-stubs/geometry/polygon.pyi | 3 +- stubs/sympy-stubs/holonomic/holonomic.pyi | 3 +- stubs/sympy-stubs/holonomic/recurrence.pyi | 2 +- stubs/sympy-stubs/integrals/integrals.pyi | 5 ++-- stubs/sympy-stubs/integrals/transforms.pyi | 3 +- stubs/sympy-stubs/liealgebras/cartan_type.pyi | 3 +- stubs/sympy-stubs/liealgebras/type_a.pyi | 3 +- stubs/sympy-stubs/liealgebras/type_b.pyi | 3 +- stubs/sympy-stubs/liealgebras/type_c.pyi | 3 +- stubs/sympy-stubs/liealgebras/type_d.pyi | 3 +- stubs/sympy-stubs/liealgebras/type_e.pyi | 3 +- stubs/sympy-stubs/liealgebras/type_f.pyi | 3 +- stubs/sympy-stubs/liealgebras/type_g.pyi | 3 +- stubs/sympy-stubs/logic/boolalg.pyi | 3 +- .../matrices/expressions/applyfunc.pyi | 2 +- .../matrices/expressions/blockmatrix.pyi | 3 +- .../matrices/expressions/companion.pyi | 3 +- .../matrices/expressions/determinant.pyi | 2 +- .../matrices/expressions/diagonal.pyi | 3 +- .../matrices/expressions/dotproduct.pyi | 3 +- .../matrices/expressions/fourier.pyi | 2 +- .../matrices/expressions/funcmatrix.pyi | 2 +- .../matrices/expressions/hadamard.pyi | 2 +- .../matrices/expressions/inverse.pyi | 2 +- .../matrices/expressions/kronecker.pyi | 3 +- .../matrices/expressions/matadd.pyi | 2 +- .../matrices/expressions/matexpr.pyi | 3 +- .../matrices/expressions/matmul.pyi | 3 +- .../matrices/expressions/matpow.pyi | 3 +- .../matrices/expressions/permutation.pyi | 3 +- .../sympy-stubs/matrices/expressions/sets.pyi | 2 +- .../matrices/expressions/slice.pyi | 3 +- .../matrices/expressions/special.pyi | 3 +- .../matrices/expressions/trace.pyi | 2 +- stubs/sympy-stubs/matrices/immutable.pyi | 3 +- stubs/sympy-stubs/matrices/repmatrix.pyi | 4 +-- .../multipledispatch/dispatcher.pyi | 3 +- stubs/sympy-stubs/ntheory/ecm.pyi | 3 +- stubs/sympy-stubs/ntheory/factor_.pyi | 5 ++-- stubs/sympy-stubs/physics/control/lti.pyi | 3 +- .../sympy-stubs/physics/units/dimensions.pyi | 3 +- stubs/sympy-stubs/physics/units/prefixes.pyi | 3 +- .../sympy-stubs/physics/units/quantities.pyi | 3 +- .../intervalmath/interval_arithmetic.pyi | 2 +- stubs/sympy-stubs/polys/agca/extensions.pyi | 3 +- .../sympy-stubs/polys/agca/homomorphisms.pyi | 2 +- stubs/sympy-stubs/polys/agca/ideals.pyi | 3 +- stubs/sympy-stubs/polys/agca/modules.pyi | 3 +- .../sympy-stubs/polys/distributedmodules.pyi | 7 +++-- .../polys/domains/compositedomain.pyi | 2 +- stubs/sympy-stubs/polys/domains/domain.pyi | 3 +- stubs/sympy-stubs/polys/domains/field.pyi | 3 +- .../sympy-stubs/polys/domains/finitefield.pyi | 5 ++-- .../polys/domains/gaussiandomains.pyi | 7 +++-- .../polys/domains/modularinteger.pyi | 3 +- .../polys/domains/old_fractionfield.pyi | 3 +- .../polys/domains/old_polynomialring.pyi | 2 +- .../polys/domains/rationalfield.pyi | 4 +-- stubs/sympy-stubs/polys/domains/realfield.pyi | 4 +-- stubs/sympy-stubs/polys/domains/ring.pyi | 3 +- .../polys/domains/simpledomain.pyi | 2 +- stubs/sympy-stubs/polys/fields.pyi | 3 +- stubs/sympy-stubs/polys/matrices/ddm.pyi | 4 +-- .../polys/matrices/domainmatrix.pyi | 4 +-- .../polys/matrices/domainscalar.pyi | 3 +- stubs/sympy-stubs/polys/matrices/sdm.pyi | 4 +-- stubs/sympy-stubs/polys/monomials.pyi | 3 +- .../polys/numberfields/galois_resolvents.pyi | 3 +- .../polys/numberfields/modules.pyi | 3 +- stubs/sympy-stubs/polys/polyerrors.pyi | 2 +- stubs/sympy-stubs/polys/polymatrix.pyi | 3 +- stubs/sympy-stubs/polys/polyoptions.pyi | 3 +- stubs/sympy-stubs/polys/polytools.pyi | 11 +++++-- stubs/sympy-stubs/polys/polyutils.pyi | 4 +-- stubs/sympy-stubs/polys/rings.pyi | 3 +- stubs/sympy-stubs/polys/rootisolation.pyi | 3 +- stubs/sympy-stubs/polys/rootoftools.pyi | 3 +- stubs/sympy-stubs/printing/latex.pyi | 4 +-- .../printing/pretty/pretty_symbology.pyi | 2 -- .../printing/pretty/stringpict.pyi | 3 +- stubs/sympy-stubs/printing/repr.pyi | 3 +- stubs/sympy-stubs/series/formal.pyi | 3 +- stubs/sympy-stubs/series/fourier.pyi | 3 +- stubs/sympy-stubs/series/limits.pyi | 2 +- stubs/sympy-stubs/series/order.pyi | 3 +- stubs/sympy-stubs/series/sequences.pyi | 3 +- stubs/sympy-stubs/sets/conditionset.pyi | 3 +- stubs/sympy-stubs/sets/contains.pyi | 2 +- stubs/sympy-stubs/sets/fancysets.pyi | 3 +- stubs/sympy-stubs/sets/ordinals.pyi | 3 +- stubs/sympy-stubs/sets/powerset.pyi | 3 +- stubs/sympy-stubs/sets/setexpr.pyi | 2 +- stubs/sympy-stubs/sets/sets.pyi | 6 ++-- stubs/sympy-stubs/simplify/epathtools.pyi | 3 +- stubs/sympy-stubs/simplify/hyperexpand.pyi | 3 +- stubs/sympy-stubs/stats/compound_rv.pyi | 3 +- stubs/sympy-stubs/stats/crv.pyi | 3 +- stubs/sympy-stubs/stats/crv_types.pyi | 3 +- stubs/sympy-stubs/stats/drv.pyi | 7 ++--- stubs/sympy-stubs/stats/drv_types.pyi | 2 +- stubs/sympy-stubs/stats/frv.pyi | 3 +- stubs/sympy-stubs/stats/joint_rv.pyi | 3 +- .../stats/matrix_distributions.pyi | 3 +- stubs/sympy-stubs/stats/random_matrix.pyi | 2 +- .../stats/random_matrix_models.pyi | 3 +- stubs/sympy-stubs/stats/rv.pyi | 3 +- .../sympy-stubs/stats/stochastic_process.pyi | 2 +- .../stats/stochastic_process_types.pyi | 3 +- .../symbolic_multivariate_probability.pyi | 2 +- .../stats/symbolic_probability.pyi | 7 +++-- .../tensor/array/array_comprehension.pyi | 3 +- stubs/sympy-stubs/tensor/array/arrayop.pyi | 3 +- .../tensor/array/dense_ndim_array.pyi | 3 +- .../array/expressions/array_expressions.pyi | 4 +-- .../tensor/array/mutable_ndim_array.pyi | 2 +- stubs/sympy-stubs/tensor/array/ndim_array.pyi | 3 +- .../tensor/array/sparse_ndim_array.pyi | 3 +- stubs/sympy-stubs/tensor/functions.pyi | 2 +- stubs/sympy-stubs/tensor/indexed.pyi | 3 +- stubs/sympy-stubs/tensor/tensor.pyi | 3 +- stubs/sympy-stubs/utilities/exceptions.pyi | 3 +- stubs/sympy-stubs/utilities/misc.pyi | 3 +- stubs/sympy-stubs/vector/basisdependent.pyi | 6 ++-- stubs/sympy-stubs/vector/deloperator.pyi | 2 +- stubs/sympy-stubs/vector/dyadic.pyi | 2 +- stubs/sympy-stubs/vector/implicitregion.pyi | 3 +- stubs/sympy-stubs/vector/integrals.pyi | 3 +- stubs/sympy-stubs/vector/operators.pyi | 2 +- stubs/sympy-stubs/vector/orienters.pyi | 2 +- stubs/sympy-stubs/vector/parametricregion.pyi | 3 +- stubs/sympy-stubs/vector/point.pyi | 3 +- stubs/sympy-stubs/vector/scalar.pyi | 2 +- stubs/sympy-stubs/vector/vector.pyi | 3 +- 204 files changed, 391 insertions(+), 270 deletions(-) diff --git a/stubs/sklearn/externals/_packaging/version.pyi b/stubs/sklearn/externals/_packaging/version.pyi index efd6b977..5d5e2fff 100644 --- a/stubs/sklearn/externals/_packaging/version.pyi +++ b/stubs/sklearn/externals/_packaging/version.pyi @@ -1,8 +1,4 @@ -import collections -import itertools -import re -import warnings -from typing import ClassVar, Optional, Tuple, Union +from typing import Callable, ClassVar, Optional, Tuple, Union from ._structures import ( Infinity as Infinity, @@ -37,13 +33,23 @@ from ._structures import ( __all__ = ["parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN"] -InfiniteTypes = ... -PrePostDevType = ... -SubLocalType = ... -LocalType = ... -CmpKey = ... -LegacyCmpKey = ... -VersionComparisonMethod = ... +InfiniteTypes = Union[InfinityType, NegativeInfinityType] +PrePostDevType = Union[InfiniteTypes, Tuple[str, int]] +SubLocalType = Union[InfiniteTypes, int, str] +LocalType = Union[ + NegativeInfinityType, + Tuple[ + Union[ + SubLocalType, + Tuple[SubLocalType, str], + Tuple[NegativeInfinityType, SubLocalType], + ], + ..., + ], +] +CmpKey = Tuple[int, Tuple[int, ...], PrePostDevType, PrePostDevType, PrePostDevType, LocalType] +LegacyCmpKey = Tuple[int, Tuple[str, ...]] +VersionComparisonMethod = Callable[[Union[CmpKey, LegacyCmpKey], Union[CmpKey, LegacyCmpKey]], bool] _Version = ... diff --git a/stubs/sympy-stubs/algebras/quaternion.pyi b/stubs/sympy-stubs/algebras/quaternion.pyi index 8bdb3803..fa01f537 100644 --- a/stubs/sympy-stubs/algebras/quaternion.pyi +++ b/stubs/sympy-stubs/algebras/quaternion.pyi @@ -1,7 +1,7 @@ from types import NotImplementedType -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self -from sympy.core.basic import Basic from sympy.core.expr import Expr from sympy.core.function import UndefinedFunction from sympy.core.power import Pow diff --git a/stubs/sympy-stubs/assumptions/assume.pyi b/stubs/sympy-stubs/assumptions/assume.pyi index 4f0d9643..8f5da1be 100644 --- a/stubs/sympy-stubs/assumptions/assume.pyi +++ b/stubs/sympy-stubs/assumptions/assume.pyi @@ -1,5 +1,6 @@ from contextlib import contextmanager -from typing import Any, Callable, Generator, Self +from typing import Any, Callable, Generator +from typing_extensions import Self from sympy.core.basic import Basic from sympy.logic.boolalg import Boolean diff --git a/stubs/sympy-stubs/assumptions/cnf.pyi b/stubs/sympy-stubs/assumptions/cnf.pyi index e2edc7a2..0618384c 100644 --- a/stubs/sympy-stubs/assumptions/cnf.pyi +++ b/stubs/sympy-stubs/assumptions/cnf.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core.logic import And diff --git a/stubs/sympy-stubs/assumptions/handlers/common.pyi b/stubs/sympy-stubs/assumptions/handlers/common.pyi index 1a2f9d2f..b08af347 100644 --- a/stubs/sympy-stubs/assumptions/handlers/common.pyi +++ b/stubs/sympy-stubs/assumptions/handlers/common.pyi @@ -1,4 +1,5 @@ -from typing import Literal, Self +from typing import Literal +from typing_extensions import Self from sympy.assumptions import AppliedPredicate from sympy.assumptions.predicates.common import CommutativePredicate, IsTruePredicate diff --git a/stubs/sympy-stubs/assumptions/predicates/matrices.pyi b/stubs/sympy-stubs/assumptions/predicates/matrices.pyi index 07d543cd..dfaa2cff 100644 --- a/stubs/sympy-stubs/assumptions/predicates/matrices.pyi +++ b/stubs/sympy-stubs/assumptions/predicates/matrices.pyi @@ -1,4 +1,4 @@ -from typing import LiteralString +from typing_extensions import LiteralString from sympy.assumptions import Predicate from sympy.multipledispatch import Dispatcher diff --git a/stubs/sympy-stubs/assumptions/predicates/ntheory.pyi b/stubs/sympy-stubs/assumptions/predicates/ntheory.pyi index 6ec4c53c..332eb9fd 100644 --- a/stubs/sympy-stubs/assumptions/predicates/ntheory.pyi +++ b/stubs/sympy-stubs/assumptions/predicates/ntheory.pyi @@ -1,4 +1,4 @@ -from typing import LiteralString +from typing_extensions import LiteralString from sympy.assumptions import Predicate from sympy.multipledispatch import Dispatcher diff --git a/stubs/sympy-stubs/assumptions/predicates/order.pyi b/stubs/sympy-stubs/assumptions/predicates/order.pyi index 8a4a0aec..1e50a56f 100644 --- a/stubs/sympy-stubs/assumptions/predicates/order.pyi +++ b/stubs/sympy-stubs/assumptions/predicates/order.pyi @@ -1,4 +1,4 @@ -from typing import Any, LiteralString +from typing_extensions import LiteralString from sympy.assumptions import Predicate from sympy.multipledispatch import Dispatcher diff --git a/stubs/sympy-stubs/assumptions/relation/binrel.pyi b/stubs/sympy-stubs/assumptions/relation/binrel.pyi index 01541f8b..ea9e720e 100644 --- a/stubs/sympy-stubs/assumptions/relation/binrel.pyi +++ b/stubs/sympy-stubs/assumptions/relation/binrel.pyi @@ -1,4 +1,5 @@ -from typing import Optional, Self +from typing import Optional +from typing_extensions import Self from sympy.assumptions import AppliedPredicate, Predicate from sympy.core.basic import Basic diff --git a/stubs/sympy-stubs/assumptions/wrapper.pyi b/stubs/sympy-stubs/assumptions/wrapper.pyi index 2e538ddd..cc5629db 100644 --- a/stubs/sympy-stubs/assumptions/wrapper.pyi +++ b/stubs/sympy-stubs/assumptions/wrapper.pyi @@ -1,4 +1,5 @@ -from typing import Callable, Self +from typing import Callable +from typing_extensions import Self from sympy.core.basic import Basic diff --git a/stubs/sympy-stubs/calculus/accumulationbounds.pyi b/stubs/sympy-stubs/calculus/accumulationbounds.pyi index 4d5dfde8..c8e21833 100644 --- a/stubs/sympy-stubs/calculus/accumulationbounds.pyi +++ b/stubs/sympy-stubs/calculus/accumulationbounds.pyi @@ -1,5 +1,5 @@ from types import NotImplementedType -from typing import Self +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.expr import Expr diff --git a/stubs/sympy-stubs/categories/baseclasses.pyi b/stubs/sympy-stubs/categories/baseclasses.pyi index e2f36898..2fadedb5 100644 --- a/stubs/sympy-stubs/categories/baseclasses.pyi +++ b/stubs/sympy-stubs/categories/baseclasses.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core import Basic, Symbol from sympy.sets import Set diff --git a/stubs/sympy-stubs/codegen/ast.pyi b/stubs/sympy-stubs/codegen/ast.pyi index a1860dd4..8a509dcc 100644 --- a/stubs/sympy-stubs/codegen/ast.pyi +++ b/stubs/sympy-stubs/codegen/ast.pyi @@ -1,4 +1,5 @@ -from typing import Any, Callable, Iterator, Literal, Self +from typing import Any, Callable, Iterator, Literal +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.expr import Atom, Expr diff --git a/stubs/sympy-stubs/codegen/cnodes.pyi b/stubs/sympy-stubs/codegen/cnodes.pyi index 87841cc8..d598e708 100644 --- a/stubs/sympy-stubs/codegen/cnodes.pyi +++ b/stubs/sympy-stubs/codegen/cnodes.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.codegen.ast import FunctionCall, Node, String, Token from sympy.core.basic import Basic diff --git a/stubs/sympy-stubs/codegen/fnodes.pyi b/stubs/sympy-stubs/codegen/fnodes.pyi index 6c3d8069..7db65b95 100644 --- a/stubs/sympy-stubs/codegen/fnodes.pyi +++ b/stubs/sympy-stubs/codegen/fnodes.pyi @@ -1,5 +1,5 @@ from ast import Attribute -from typing import Self +from typing_extensions import Self from sympy.codegen.ast import FunctionCall, Node, String, Token, Variable from sympy.core.basic import Basic diff --git a/stubs/sympy-stubs/combinatorics/coset_table.pyi b/stubs/sympy-stubs/combinatorics/coset_table.pyi index ce216599..2b95b99e 100644 --- a/stubs/sympy-stubs/combinatorics/coset_table.pyi +++ b/stubs/sympy-stubs/combinatorics/coset_table.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.printing.defaults import DefaultPrinting diff --git a/stubs/sympy-stubs/combinatorics/fp_groups.pyi b/stubs/sympy-stubs/combinatorics/fp_groups.pyi index d760ffc9..c4043a8f 100644 --- a/stubs/sympy-stubs/combinatorics/fp_groups.pyi +++ b/stubs/sympy-stubs/combinatorics/fp_groups.pyi @@ -1,4 +1,5 @@ from typing import Any, Callable +from typing_extensions import Unpack from sympy.combinatorics.coset_table import CosetTable from sympy.combinatorics.free_groups import FreeGroupElement @@ -7,7 +8,7 @@ from sympy.printing.defaults import DefaultPrinting from sympy.utilities import public @public -def fp_group(fr_grp, relators=...) -> tuple[FpGroup, *tuple[Any, ...]]: ... +def fp_group(fr_grp, relators=...) -> tuple[FpGroup, Unpack[tuple[Any, ...]]]: ... @public def xfp_group(fr_grp, relators=...) -> tuple[FpGroup, Callable[[], Any]]: ... @public diff --git a/stubs/sympy-stubs/combinatorics/free_groups.pyi b/stubs/sympy-stubs/combinatorics/free_groups.pyi index 3ece265d..ef497073 100644 --- a/stubs/sympy-stubs/combinatorics/free_groups.pyi +++ b/stubs/sympy-stubs/combinatorics/free_groups.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self, Unpack from sympy.core.expr import Expr from sympy.core.sympify import CantSympify @@ -7,7 +8,7 @@ from sympy.printing.defaults import DefaultPrinting from sympy.utilities import public @public -def free_group(symbols) -> tuple[FreeGroup, *tuple[Any, ...]]: ... +def free_group(symbols) -> tuple[FreeGroup, Unpack[tuple[Any, ...]]]: ... @public def xfree_group(symbols) -> tuple[FreeGroup, Any]: ... @public diff --git a/stubs/sympy-stubs/combinatorics/graycode.pyi b/stubs/sympy-stubs/combinatorics/graycode.pyi index 9f8b47e6..b5ca8c0a 100644 --- a/stubs/sympy-stubs/combinatorics/graycode.pyi +++ b/stubs/sympy-stubs/combinatorics/graycode.pyi @@ -1,4 +1,5 @@ -from typing import Any, Generator, LiteralString, Self +from typing import Any, Generator +from typing_extensions import LiteralString, Self from sympy.core import Basic diff --git a/stubs/sympy-stubs/combinatorics/partitions.pyi b/stubs/sympy-stubs/combinatorics/partitions.pyi index 6ad5341c..167d3d33 100644 --- a/stubs/sympy-stubs/combinatorics/partitions.pyi +++ b/stubs/sympy-stubs/combinatorics/partitions.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, LiteralString, Self +from typing import Any, Literal +from typing_extensions import LiteralString, Self from sympy.core import Basic from sympy.core.function import UndefinedFunction diff --git a/stubs/sympy-stubs/combinatorics/perm_groups.pyi b/stubs/sympy-stubs/combinatorics/perm_groups.pyi index 23ecaa82..7a789a52 100644 --- a/stubs/sympy-stubs/combinatorics/perm_groups.pyi +++ b/stubs/sympy-stubs/combinatorics/perm_groups.pyi @@ -1,4 +1,5 @@ -from typing import Any, Generator, Literal, Self +from typing import Any, Generator, Literal +from typing_extensions import Self from sympy.combinatorics.fp_groups import FpGroup from sympy.combinatorics.pc_groups import PolycyclicGroup diff --git a/stubs/sympy-stubs/combinatorics/permutations.pyi b/stubs/sympy-stubs/combinatorics/permutations.pyi index 7ba61ff8..13bac83e 100644 --- a/stubs/sympy-stubs/combinatorics/permutations.pyi +++ b/stubs/sympy-stubs/combinatorics/permutations.pyi @@ -1,4 +1,5 @@ -from typing import Any, Generator, Literal, Self +from typing import Any, Generator, Literal +from typing_extensions import Self from sympy.combinatorics.perm_groups import Coset from sympy.core.basic import Atom diff --git a/stubs/sympy-stubs/combinatorics/polyhedron.pyi b/stubs/sympy-stubs/combinatorics/polyhedron.pyi index e074e02d..0d41960a 100644 --- a/stubs/sympy-stubs/combinatorics/polyhedron.pyi +++ b/stubs/sympy-stubs/combinatorics/polyhedron.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core import Basic from sympy.sets.sets import FiniteSet diff --git a/stubs/sympy-stubs/combinatorics/prufer.pyi b/stubs/sympy-stubs/combinatorics/prufer.pyi index a3b13c3e..36e0b689 100644 --- a/stubs/sympy-stubs/combinatorics/prufer.pyi +++ b/stubs/sympy-stubs/combinatorics/prufer.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy.core import Basic diff --git a/stubs/sympy-stubs/combinatorics/rewritingsystem_fsm.pyi b/stubs/sympy-stubs/combinatorics/rewritingsystem_fsm.pyi index ff7952b3..1f44cc84 100644 --- a/stubs/sympy-stubs/combinatorics/rewritingsystem_fsm.pyi +++ b/stubs/sympy-stubs/combinatorics/rewritingsystem_fsm.pyi @@ -1,4 +1,4 @@ -from typing import LiteralString +from typing_extensions import LiteralString class State: def __init__(self, name, state_machine, state_type=..., rh_rule=...) -> None: ... diff --git a/stubs/sympy-stubs/combinatorics/subsets.pyi b/stubs/sympy-stubs/combinatorics/subsets.pyi index f8d1dfa2..2c923d31 100644 --- a/stubs/sympy-stubs/combinatorics/subsets.pyi +++ b/stubs/sympy-stubs/combinatorics/subsets.pyi @@ -1,5 +1,6 @@ from itertools import combinations -from typing import Any, Self +from typing import Any +from typing_extensions import Self class Subset: _rank_binary = ... diff --git a/stubs/sympy-stubs/concrete/expr_with_intlimits.pyi b/stubs/sympy-stubs/concrete/expr_with_intlimits.pyi index 3e0c0ba8..c6ee5285 100644 --- a/stubs/sympy-stubs/concrete/expr_with_intlimits.pyi +++ b/stubs/sympy-stubs/concrete/expr_with_intlimits.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.concrete.expr_with_limits import ExprWithLimits diff --git a/stubs/sympy-stubs/concrete/expr_with_limits.pyi b/stubs/sympy-stubs/concrete/expr_with_limits.pyi index f38baf10..31770f89 100644 --- a/stubs/sympy-stubs/concrete/expr_with_limits.pyi +++ b/stubs/sympy-stubs/concrete/expr_with_limits.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.expr import Expr diff --git a/stubs/sympy-stubs/concrete/products.pyi b/stubs/sympy-stubs/concrete/products.pyi index 87736ee1..9b804fcc 100644 --- a/stubs/sympy-stubs/concrete/products.pyi +++ b/stubs/sympy-stubs/concrete/products.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self, Tuple as tTuple +from typing import Any +from typing_extensions import Self, Tuple as tTuple from sympy.concrete.expr_with_intlimits import ExprWithIntLimits from sympy.core.basic import Basic diff --git a/stubs/sympy-stubs/concrete/summations.pyi b/stubs/sympy-stubs/concrete/summations.pyi index c089a0c1..89ebb168 100644 --- a/stubs/sympy-stubs/concrete/summations.pyi +++ b/stubs/sympy-stubs/concrete/summations.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self, Tuple as tTuple +from typing import Any +from typing_extensions import Self, Tuple as tTuple from sympy.concrete.expr_with_intlimits import ExprWithIntLimits from sympy.concrete.expr_with_limits import AddWithLimits diff --git a/stubs/sympy-stubs/core/add.pyi b/stubs/sympy-stubs/core/add.pyi index 7afb49b4..2aa7dd95 100644 --- a/stubs/sympy-stubs/core/add.pyi +++ b/stubs/sympy-stubs/core/add.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self, Tuple as tTuple +from typing import Any, Literal +from typing_extensions import Self, Tuple as tTuple from sympy.core.cache import cacheit from sympy.core.expr import Expr diff --git a/stubs/sympy-stubs/core/assumptions.pyi b/stubs/sympy-stubs/core/assumptions.pyi index 6558a432..79b84664 100644 --- a/stubs/sympy-stubs/core/assumptions.pyi +++ b/stubs/sympy-stubs/core/assumptions.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core.facts import FactKB diff --git a/stubs/sympy-stubs/core/basic.pyi b/stubs/sympy-stubs/core/basic.pyi index f5ebdfca..5fca6c4a 100644 --- a/stubs/sympy-stubs/core/basic.pyi +++ b/stubs/sympy-stubs/core/basic.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy import Symbol from sympy.core._print_helpers import Printable diff --git a/stubs/sympy-stubs/core/containers.pyi b/stubs/sympy-stubs/core/containers.pyi index 066efed5..a35c2ac1 100644 --- a/stubs/sympy-stubs/core/containers.pyi +++ b/stubs/sympy-stubs/core/containers.pyi @@ -1,6 +1,7 @@ from collections.abc import MutableSet from types import NotImplementedType -from typing import Any, Callable, Generator, Iterator, Self +from typing import Any, Callable, Generator, Iterator +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.kind import Kind diff --git a/stubs/sympy-stubs/core/evalf.pyi b/stubs/sympy-stubs/core/evalf.pyi index 8d0ff322..d7fb438d 100644 --- a/stubs/sympy-stubs/core/evalf.pyi +++ b/stubs/sympy-stubs/core/evalf.pyi @@ -1,16 +1,4 @@ -from typing import ( - TYPE_CHECKING, - Any, - Callable, - Dict as tDict, - List, - Optional, - Self, - Tuple as tTuple, - Type, - Union as tUnion, - overload, -) +from typing import Any, Callable, Dict as tDict, List, Optional, Self, Tuple as tTuple, Type, Union as tUnion, overload from mpmath import mpc, mpf from sympy.concrete.products import Product @@ -27,8 +15,6 @@ from sympy.functions.elementary.integers import ceiling, floor from sympy.functions.elementary.trigonometric import atan from sympy.integrals.integrals import Integral -if TYPE_CHECKING: - ... LG10 = ... rnd = ... diff --git a/stubs/sympy-stubs/core/expr.pyi b/stubs/sympy-stubs/core/expr.pyi index 4aa20709..6b11a644 100644 --- a/stubs/sympy-stubs/core/expr.pyi +++ b/stubs/sympy-stubs/core/expr.pyi @@ -1,5 +1,6 @@ from collections import defaultdict -from typing import TYPE_CHECKING, Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy import Derivative, Equality, Integer, Mul, Order, Pow from sympy.core.basic import Atom, Basic @@ -13,9 +14,6 @@ from sympy.series.formal import FormalPowerSeries from sympy.series.fourier import FiniteFourierSeries, FourierSeries from sympy.tensor.array.array_derivatives import ArrayDerivative -if TYPE_CHECKING: - ... - @sympify_method_args class Expr(Basic, EvalfMixin): __slots__: tuple[str, ...] = ... diff --git a/stubs/sympy-stubs/core/exprtools.pyi b/stubs/sympy-stubs/core/exprtools.pyi index 4cc53fd0..d1391a6f 100644 --- a/stubs/sympy-stubs/core/exprtools.pyi +++ b/stubs/sympy-stubs/core/exprtools.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Dict, LiteralString, Tuple as tTuple +from typing import Any, Dict, Tuple as tTuple +from typing_extensions import LiteralString from sympy import Order from sympy.core.add import Add diff --git a/stubs/sympy-stubs/core/function.pyi b/stubs/sympy-stubs/core/function.pyi index a033e1a5..1c7db3e9 100644 --- a/stubs/sympy-stubs/core/function.pyi +++ b/stubs/sympy-stubs/core/function.pyi @@ -1,6 +1,7 @@ from inspect import Signature from types import NotImplementedType -from typing import Any, Callable, Dict, Literal, Self +from typing import Any, Callable, Dict, Literal +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.cache import cacheit diff --git a/stubs/sympy-stubs/core/kind.pyi b/stubs/sympy-stubs/core/kind.pyi index 56884753..7bb63b59 100644 --- a/stubs/sympy-stubs/core/kind.pyi +++ b/stubs/sympy-stubs/core/kind.pyi @@ -1,4 +1,5 @@ -from typing import Callable, Literal, LiteralString, Self +from typing import Callable, Literal +from typing_extensions import LiteralString, Self from sympy.core.cache import cacheit diff --git a/stubs/sympy-stubs/core/logic.pyi b/stubs/sympy-stubs/core/logic.pyi index e52b6e5d..0583a31e 100644 --- a/stubs/sympy-stubs/core/logic.pyi +++ b/stubs/sympy-stubs/core/logic.pyi @@ -1,4 +1,5 @@ -from typing import Any, Optional, Self +from typing import Any, Optional +from typing_extensions import Self FuzzyBool = Optional[bool] diff --git a/stubs/sympy-stubs/core/mul.pyi b/stubs/sympy-stubs/core/mul.pyi index c53f301b..5e8502a6 100644 --- a/stubs/sympy-stubs/core/mul.pyi +++ b/stubs/sympy-stubs/core/mul.pyi @@ -1,5 +1,6 @@ from collections import defaultdict -from typing import Any, Literal, Self, Tuple as tTuple +from typing import Any, Literal +from typing_extensions import Self, Tuple as tTuple from sympy.core.cache import cacheit from sympy.core.expr import Expr diff --git a/stubs/sympy-stubs/core/numbers.pyi b/stubs/sympy-stubs/core/numbers.pyi index f014f8e4..f2cb390d 100644 --- a/stubs/sympy-stubs/core/numbers.pyi +++ b/stubs/sympy-stubs/core/numbers.pyi @@ -1,6 +1,7 @@ from functools import lru_cache from types import NotImplementedType -from typing import Any, Literal, Self, Tuple +from typing import Any, Literal +from typing_extensions import Self, Tuple from sympy.core.basic import Basic from sympy.core.cache import cacheit @@ -8,7 +9,6 @@ from sympy.core.decorators import _sympifyit from sympy.core.expr import AtomicExpr, Expr from sympy.core.mul import Mul from sympy.core.singleton import Singleton -from sympy.external.gmpy import gmpy from sympy.series.order import Order _LOG2 = ... diff --git a/stubs/sympy-stubs/core/operations.pyi b/stubs/sympy-stubs/core/operations.pyi index a45f4021..f2397aea 100644 --- a/stubs/sympy-stubs/core/operations.pyi +++ b/stubs/sympy-stubs/core/operations.pyi @@ -1,4 +1,5 @@ -from typing import Any, LiteralString, Self +from typing import Any +from typing_extensions import LiteralString, Self from sympy.core.basic import Basic from sympy.core.cache import cacheit diff --git a/stubs/sympy-stubs/core/power.pyi b/stubs/sympy-stubs/core/power.pyi index 86e7e922..2e8a58ab 100644 --- a/stubs/sympy-stubs/core/power.pyi +++ b/stubs/sympy-stubs/core/power.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.cache import cacheit diff --git a/stubs/sympy-stubs/core/relational.pyi b/stubs/sympy-stubs/core/relational.pyi index 55c3c58d..372b8991 100644 --- a/stubs/sympy-stubs/core/relational.pyi +++ b/stubs/sympy-stubs/core/relational.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.evalf import EvalfMixin diff --git a/stubs/sympy-stubs/core/symbol.pyi b/stubs/sympy-stubs/core/symbol.pyi index 11bbbdc4..1e11f94a 100644 --- a/stubs/sympy-stubs/core/symbol.pyi +++ b/stubs/sympy-stubs/core/symbol.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self, Tuple +from typing import Any, Literal +from typing_extensions import Self, Tuple from sympy.core.basic import Atom, Basic from sympy.core.cache import cacheit diff --git a/stubs/sympy-stubs/core/traversal.pyi b/stubs/sympy-stubs/core/traversal.pyi index 4717e93b..e77d8dc6 100644 --- a/stubs/sympy-stubs/core/traversal.pyi +++ b/stubs/sympy-stubs/core/traversal.pyi @@ -1,4 +1,5 @@ -from typing import Any, Generator, Self +from typing import Any, Generator +from typing_extensions import Self from sympy.core.basic import Basic diff --git a/stubs/sympy-stubs/crypto/crypto.pyi b/stubs/sympy-stubs/crypto/crypto.pyi index 4c20da4d..72be6750 100644 --- a/stubs/sympy-stubs/crypto/crypto.pyi +++ b/stubs/sympy-stubs/crypto/crypto.pyi @@ -1,9 +1,9 @@ from array import array -from typing import Any, Literal, LiteralString +from typing import Any, Literal +from typing_extensions import LiteralString from sympy.core.numbers import Integer, Rational from sympy.matrices import Matrix -from sympy.utilities.decorator import doctest_depends_on class NonInvertibleCipherWarning(RuntimeWarning): def __init__(self, msg) -> None: ... diff --git a/stubs/sympy-stubs/diffgeom/diffgeom.pyi b/stubs/sympy-stubs/diffgeom/diffgeom.pyi index a8824815..47c77080 100644 --- a/stubs/sympy-stubs/diffgeom/diffgeom.pyi +++ b/stubs/sympy-stubs/diffgeom/diffgeom.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy.core import Basic, Expr from sympy.core.function import Lambda diff --git a/stubs/sympy-stubs/external/pythonmpq.pyi b/stubs/sympy-stubs/external/pythonmpq.pyi index e8f64759..71f4480f 100644 --- a/stubs/sympy-stubs/external/pythonmpq.pyi +++ b/stubs/sympy-stubs/external/pythonmpq.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Self, Tuple as tTuple, Type +from typing import Any +from typing_extensions import Self, Tuple as tTuple, Type _PyHASH_MODULUS = ... _PyHASH_INF = ... diff --git a/stubs/sympy-stubs/functions/combinatorial/numbers.pyi b/stubs/sympy-stubs/functions/combinatorial/numbers.pyi index 660db8be..11edc53e 100644 --- a/stubs/sympy-stubs/functions/combinatorial/numbers.pyi +++ b/stubs/sympy-stubs/functions/combinatorial/numbers.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self, Tuple as tTuple +from typing import Any +from typing_extensions import Self, Tuple as tTuple from sympy.core.function import Function, UndefinedFunction from sympy.core.numbers import Float, Integer, Rational diff --git a/stubs/sympy-stubs/functions/elementary/complexes.pyi b/stubs/sympy-stubs/functions/elementary/complexes.pyi index e8bde77e..5a53d9b8 100644 --- a/stubs/sympy-stubs/functions/elementary/complexes.pyi +++ b/stubs/sympy-stubs/functions/elementary/complexes.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self, Tuple as tTuple +from typing import Any, Literal +from typing_extensions import Self, Tuple as tTuple from sympy.core.basic import Basic from sympy.core.expr import Expr diff --git a/stubs/sympy-stubs/functions/elementary/exponential.pyi b/stubs/sympy-stubs/functions/elementary/exponential.pyi index 02dd5037..b1ab5e84 100644 --- a/stubs/sympy-stubs/functions/elementary/exponential.pyi +++ b/stubs/sympy-stubs/functions/elementary/exponential.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self, Tuple as tTuple +from typing import Any, Literal +from typing_extensions import Self, Tuple as tTuple from sympy.core.basic import Basic from sympy.core.cache import cacheit diff --git a/stubs/sympy-stubs/functions/elementary/hyperbolic.pyi b/stubs/sympy-stubs/functions/elementary/hyperbolic.pyi index 2166f693..7ebf513f 100644 --- a/stubs/sympy-stubs/functions/elementary/hyperbolic.pyi +++ b/stubs/sympy-stubs/functions/elementary/hyperbolic.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core import cacheit from sympy.core.basic import Basic diff --git a/stubs/sympy-stubs/functions/elementary/miscellaneous.pyi b/stubs/sympy-stubs/functions/elementary/miscellaneous.pyi index a1bdd974..c9e6ebb1 100644 --- a/stubs/sympy-stubs/functions/elementary/miscellaneous.pyi +++ b/stubs/sympy-stubs/functions/elementary/miscellaneous.pyi @@ -1,4 +1,4 @@ -from typing import Self, Tuple +from typing_extensions import Self, Tuple from sympy.core import Function from sympy.core.expr import Expr diff --git a/stubs/sympy-stubs/functions/elementary/piecewise.pyi b/stubs/sympy-stubs/functions/elementary/piecewise.pyi index 17725ce6..09a9a945 100644 --- a/stubs/sympy-stubs/functions/elementary/piecewise.pyi +++ b/stubs/sympy-stubs/functions/elementary/piecewise.pyi @@ -1,4 +1,5 @@ -from typing import Any, Generator, Self +from typing import Any, Generator +from typing_extensions import Self from sympy.core import Function, Tuple from sympy.core.basic import Basic diff --git a/stubs/sympy-stubs/functions/elementary/trigonometric.pyi b/stubs/sympy-stubs/functions/elementary/trigonometric.pyi index 38c6d583..0ca8124e 100644 --- a/stubs/sympy-stubs/functions/elementary/trigonometric.pyi +++ b/stubs/sympy-stubs/functions/elementary/trigonometric.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self, Tuple as tTuple +from typing import Any +from typing_extensions import Self, Tuple as tTuple from sympy.calculus.accumulationbounds import AccumBounds from sympy.core.cache import cacheit diff --git a/stubs/sympy-stubs/functions/special/beta_functions.pyi b/stubs/sympy-stubs/functions/special/beta_functions.pyi index 60512fff..746668de 100644 --- a/stubs/sympy-stubs/functions/special/beta_functions.pyi +++ b/stubs/sympy-stubs/functions/special/beta_functions.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core.function import Function, UndefinedFunction diff --git a/stubs/sympy-stubs/functions/special/delta_functions.pyi b/stubs/sympy-stubs/functions/special/delta_functions.pyi index 378258ca..95eabb71 100644 --- a/stubs/sympy-stubs/functions/special/delta_functions.pyi +++ b/stubs/sympy-stubs/functions/special/delta_functions.pyi @@ -1,4 +1,5 @@ -from typing import Literal, Self +from typing import Literal +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.function import Function, UndefinedFunction diff --git a/stubs/sympy-stubs/functions/special/hyper.pyi b/stubs/sympy-stubs/functions/special/hyper.pyi index 3e3af77b..29af56a1 100644 --- a/stubs/sympy-stubs/functions/special/hyper.pyi +++ b/stubs/sympy-stubs/functions/special/hyper.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.containers import Tuple diff --git a/stubs/sympy-stubs/functions/special/mathieu_functions.pyi b/stubs/sympy-stubs/functions/special/mathieu_functions.pyi index fe024fcf..79e65524 100644 --- a/stubs/sympy-stubs/functions/special/mathieu_functions.pyi +++ b/stubs/sympy-stubs/functions/special/mathieu_functions.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core.function import Function, UndefinedFunction from sympy.core.mul import Mul diff --git a/stubs/sympy-stubs/functions/special/singularity_functions.pyi b/stubs/sympy-stubs/functions/special/singularity_functions.pyi index 2b2bcaca..53325f91 100644 --- a/stubs/sympy-stubs/functions/special/singularity_functions.pyi +++ b/stubs/sympy-stubs/functions/special/singularity_functions.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core.function import Function diff --git a/stubs/sympy-stubs/functions/special/tensor_functions.pyi b/stubs/sympy-stubs/functions/special/tensor_functions.pyi index dc871073..b0b78c60 100644 --- a/stubs/sympy-stubs/functions/special/tensor_functions.pyi +++ b/stubs/sympy-stubs/functions/special/tensor_functions.pyi @@ -1,4 +1,5 @@ -from typing import Literal, Self +from typing import Literal +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.function import Function, UndefinedFunction diff --git a/stubs/sympy-stubs/functions/special/zeta_functions.pyi b/stubs/sympy-stubs/functions/special/zeta_functions.pyi index f4efc436..e65c365d 100644 --- a/stubs/sympy-stubs/functions/special/zeta_functions.pyi +++ b/stubs/sympy-stubs/functions/special/zeta_functions.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core.function import Function, UndefinedFunction diff --git a/stubs/sympy-stubs/geometry/curve.pyi b/stubs/sympy-stubs/geometry/curve.pyi index ab9a172e..e72576a8 100644 --- a/stubs/sympy-stubs/geometry/curve.pyi +++ b/stubs/sympy-stubs/geometry/curve.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.relational import Equality, Ne, Relational diff --git a/stubs/sympy-stubs/geometry/ellipse.pyi b/stubs/sympy-stubs/geometry/ellipse.pyi index 2070a5c7..8981ee6f 100644 --- a/stubs/sympy-stubs/geometry/ellipse.pyi +++ b/stubs/sympy-stubs/geometry/ellipse.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.power import Pow diff --git a/stubs/sympy-stubs/geometry/entity.pyi b/stubs/sympy-stubs/geometry/entity.pyi index 2416945f..4b5e3536 100644 --- a/stubs/sympy-stubs/geometry/entity.pyi +++ b/stubs/sympy-stubs/geometry/entity.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.evalf import EvalfMixin diff --git a/stubs/sympy-stubs/geometry/line.pyi b/stubs/sympy-stubs/geometry/line.pyi index 4b3a2965..f932fb21 100644 --- a/stubs/sympy-stubs/geometry/line.pyi +++ b/stubs/sympy-stubs/geometry/line.pyi @@ -1,9 +1,9 @@ from types import NotImplementedType -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.containers import Tuple -from sympy.core.expr import Expr from sympy.core.function import UndefinedFunction from sympy.core.power import Pow from sympy.geometry.entity import GeometrySet diff --git a/stubs/sympy-stubs/geometry/parabola.pyi b/stubs/sympy-stubs/geometry/parabola.pyi index 256f4ef0..a7e7295c 100644 --- a/stubs/sympy-stubs/geometry/parabola.pyi +++ b/stubs/sympy-stubs/geometry/parabola.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy.core.basic import Basic from sympy.geometry.entity import GeometrySet diff --git a/stubs/sympy-stubs/geometry/plane.pyi b/stubs/sympy-stubs/geometry/plane.pyi index 5b7b4833..1080603e 100644 --- a/stubs/sympy-stubs/geometry/plane.pyi +++ b/stubs/sympy-stubs/geometry/plane.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.expr import Expr diff --git a/stubs/sympy-stubs/geometry/point.pyi b/stubs/sympy-stubs/geometry/point.pyi index a7015140..0d891ed5 100644 --- a/stubs/sympy-stubs/geometry/point.pyi +++ b/stubs/sympy-stubs/geometry/point.pyi @@ -1,4 +1,5 @@ -from typing import Any, Iterator, Self +from typing import Any, Iterator +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.power import Pow diff --git a/stubs/sympy-stubs/geometry/polygon.pyi b/stubs/sympy-stubs/geometry/polygon.pyi index 3676b1d3..4eb6ea7a 100644 --- a/stubs/sympy-stubs/geometry/polygon.pyi +++ b/stubs/sympy-stubs/geometry/polygon.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, LiteralString, Self +from typing import Any +from typing_extensions import LiteralString, Self from sympy.core.basic import Basic from sympy.core.power import Pow diff --git a/stubs/sympy-stubs/holonomic/holonomic.pyi b/stubs/sympy-stubs/holonomic/holonomic.pyi index fcde2962..eec0da5a 100644 --- a/stubs/sympy-stubs/holonomic/holonomic.pyi +++ b/stubs/sympy-stubs/holonomic/holonomic.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.holonomic.recurrence import HolonomicSequence diff --git a/stubs/sympy-stubs/holonomic/recurrence.pyi b/stubs/sympy-stubs/holonomic/recurrence.pyi index eec89e11..17c72659 100644 --- a/stubs/sympy-stubs/holonomic/recurrence.pyi +++ b/stubs/sympy-stubs/holonomic/recurrence.pyi @@ -1,4 +1,4 @@ -from typing import LiteralString, Self +from typing_extensions import LiteralString, Self def RecurrenceOperators(base, generator) -> tuple[RecurrenceOperatorAlgebra, RecurrenceOperator]: ... diff --git a/stubs/sympy-stubs/integrals/integrals.pyi b/stubs/sympy-stubs/integrals/integrals.pyi index 983f300c..57fc19c5 100644 --- a/stubs/sympy-stubs/integrals/integrals.pyi +++ b/stubs/sympy-stubs/integrals/integrals.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self, Tuple as tTuple +from typing import Any, Tuple as tTuple +from typing_extensions import Self, Unpack from sympy.concrete.expr_with_limits import AddWithLimits from sympy.core.basic import Basic @@ -11,7 +12,7 @@ class Integral(AddWithLimits): __slots__ = ... args: tTuple[Expr, Tuple] def __new__(cls, function, *symbols, **assumptions) -> Equality | Relational | Ne | Self: ... - def __getnewargs__(self) -> tuple[Basic, *tuple[tuple[Any], ...]]: ... + def __getnewargs__(self) -> tuple[Basic, Unpack[tuple[tuple[Any], ...]]]: ... @property def free_symbols(self) -> set[Any]: ... def transform(self, x, u) -> Self: ... diff --git a/stubs/sympy-stubs/integrals/transforms.pyi b/stubs/sympy-stubs/integrals/transforms.pyi index 39d6e962..95d94d7a 100644 --- a/stubs/sympy-stubs/integrals/transforms.pyi +++ b/stubs/sympy-stubs/integrals/transforms.pyi @@ -1,4 +1,5 @@ from typing import Any, Literal +from typing_extensions import Unpack import sympy.integrals.laplace as _laplace from sympy.core.basic import Basic @@ -21,7 +22,7 @@ class IntegralTransform(Function): def transform_variable(self) -> Basic: ... @property def free_symbols(self) -> set[Basic]: ... - def doit(self, **hints) -> Order | tuple[Any | Order, *tuple[Any, ...]] | tuple[Any | Order, Any | And]: ... + def doit(self, **hints) -> Order | tuple[Any | Order, Unpack[tuple[Any, ...]]] | tuple[Any | Order, Any | And]: ... @property def as_integral(self): ... diff --git a/stubs/sympy-stubs/liealgebras/cartan_type.pyi b/stubs/sympy-stubs/liealgebras/cartan_type.pyi index a86042d3..54e42afd 100644 --- a/stubs/sympy-stubs/liealgebras/cartan_type.pyi +++ b/stubs/sympy-stubs/liealgebras/cartan_type.pyi @@ -1,4 +1,5 @@ -from typing import Any, Callable, Self +from typing import Any, Callable +from typing_extensions import Self from sympy.core import Atom from sympy.liealgebras.type_a import TypeA diff --git a/stubs/sympy-stubs/liealgebras/type_a.pyi b/stubs/sympy-stubs/liealgebras/type_a.pyi index b98d9f6c..492787c7 100644 --- a/stubs/sympy-stubs/liealgebras/type_a.pyi +++ b/stubs/sympy-stubs/liealgebras/type_a.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.liealgebras.cartan_type import Standard_Cartan diff --git a/stubs/sympy-stubs/liealgebras/type_b.pyi b/stubs/sympy-stubs/liealgebras/type_b.pyi index 37c34a29..81d219c9 100644 --- a/stubs/sympy-stubs/liealgebras/type_b.pyi +++ b/stubs/sympy-stubs/liealgebras/type_b.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.liealgebras.cartan_type import Standard_Cartan diff --git a/stubs/sympy-stubs/liealgebras/type_c.pyi b/stubs/sympy-stubs/liealgebras/type_c.pyi index a0e8b2af..6d0e686a 100644 --- a/stubs/sympy-stubs/liealgebras/type_c.pyi +++ b/stubs/sympy-stubs/liealgebras/type_c.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.liealgebras.cartan_type import Standard_Cartan diff --git a/stubs/sympy-stubs/liealgebras/type_d.pyi b/stubs/sympy-stubs/liealgebras/type_d.pyi index e0c6d2ef..dcb16c38 100644 --- a/stubs/sympy-stubs/liealgebras/type_d.pyi +++ b/stubs/sympy-stubs/liealgebras/type_d.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.liealgebras.cartan_type import Standard_Cartan diff --git a/stubs/sympy-stubs/liealgebras/type_e.pyi b/stubs/sympy-stubs/liealgebras/type_e.pyi index 8f6bde7d..4e50fe04 100644 --- a/stubs/sympy-stubs/liealgebras/type_e.pyi +++ b/stubs/sympy-stubs/liealgebras/type_e.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy.liealgebras.cartan_type import Standard_Cartan diff --git a/stubs/sympy-stubs/liealgebras/type_f.pyi b/stubs/sympy-stubs/liealgebras/type_f.pyi index 4a205d02..d3f28b73 100644 --- a/stubs/sympy-stubs/liealgebras/type_f.pyi +++ b/stubs/sympy-stubs/liealgebras/type_f.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy.core.numbers import Integer, Rational from sympy.liealgebras.cartan_type import Standard_Cartan diff --git a/stubs/sympy-stubs/liealgebras/type_g.pyi b/stubs/sympy-stubs/liealgebras/type_g.pyi index 0f6cfabe..d4e9cde6 100644 --- a/stubs/sympy-stubs/liealgebras/type_g.pyi +++ b/stubs/sympy-stubs/liealgebras/type_g.pyi @@ -1,4 +1,5 @@ -from typing import Literal, Self +from typing import Literal +from typing_extensions import Self from sympy.liealgebras.cartan_type import Standard_Cartan from sympy.matrices import Matrix diff --git a/stubs/sympy-stubs/logic/boolalg.pyi b/stubs/sympy-stubs/logic/boolalg.pyi index 17f1b377..ffd23698 100644 --- a/stubs/sympy-stubs/logic/boolalg.pyi +++ b/stubs/sympy-stubs/logic/boolalg.pyi @@ -1,4 +1,5 @@ -from typing import Any, Generator, Literal, Self +from typing import Any, Generator, Literal +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.cache import cacheit diff --git a/stubs/sympy-stubs/matrices/expressions/applyfunc.pyi b/stubs/sympy-stubs/matrices/expressions/applyfunc.pyi index f86f4a84..ac578477 100644 --- a/stubs/sympy-stubs/matrices/expressions/applyfunc.pyi +++ b/stubs/sympy-stubs/matrices/expressions/applyfunc.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core.basic import Basic from sympy.matrices.expressions import MatrixExpr diff --git a/stubs/sympy-stubs/matrices/expressions/blockmatrix.pyi b/stubs/sympy-stubs/matrices/expressions/blockmatrix.pyi index 2561a2d6..72073022 100644 --- a/stubs/sympy-stubs/matrices/expressions/blockmatrix.pyi +++ b/stubs/sympy-stubs/matrices/expressions/blockmatrix.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy.core.basic import Basic from sympy.matrices.expressions.matadd import MatAdd diff --git a/stubs/sympy-stubs/matrices/expressions/companion.pyi b/stubs/sympy-stubs/matrices/expressions/companion.pyi index f0081f63..f60c447b 100644 --- a/stubs/sympy-stubs/matrices/expressions/companion.pyi +++ b/stubs/sympy-stubs/matrices/expressions/companion.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.matrices.expressions.matexpr import MatrixExpr diff --git a/stubs/sympy-stubs/matrices/expressions/determinant.pyi b/stubs/sympy-stubs/matrices/expressions/determinant.pyi index fb233a5e..3e96b051 100644 --- a/stubs/sympy-stubs/matrices/expressions/determinant.pyi +++ b/stubs/sympy-stubs/matrices/expressions/determinant.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.expr import Expr diff --git a/stubs/sympy-stubs/matrices/expressions/diagonal.pyi b/stubs/sympy-stubs/matrices/expressions/diagonal.pyi index 6135b790..b165aeda 100644 --- a/stubs/sympy-stubs/matrices/expressions/diagonal.pyi +++ b/stubs/sympy-stubs/matrices/expressions/diagonal.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy import MatrixBase from sympy.core.expr import Expr diff --git a/stubs/sympy-stubs/matrices/expressions/dotproduct.pyi b/stubs/sympy-stubs/matrices/expressions/dotproduct.pyi index 3b4f67e0..a2a30522 100644 --- a/stubs/sympy-stubs/matrices/expressions/dotproduct.pyi +++ b/stubs/sympy-stubs/matrices/expressions/dotproduct.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core import Expr from sympy.matrices.expressions.slice import MatrixSlice diff --git a/stubs/sympy-stubs/matrices/expressions/fourier.pyi b/stubs/sympy-stubs/matrices/expressions/fourier.pyi index 24b0dfa5..be64a942 100644 --- a/stubs/sympy-stubs/matrices/expressions/fourier.pyi +++ b/stubs/sympy-stubs/matrices/expressions/fourier.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.matrices.expressions import MatrixExpr diff --git a/stubs/sympy-stubs/matrices/expressions/funcmatrix.pyi b/stubs/sympy-stubs/matrices/expressions/funcmatrix.pyi index f232d50f..c5b0ca29 100644 --- a/stubs/sympy-stubs/matrices/expressions/funcmatrix.pyi +++ b/stubs/sympy-stubs/matrices/expressions/funcmatrix.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core.basic import Basic from sympy.matrices.expressions.matexpr import MatrixExpr diff --git a/stubs/sympy-stubs/matrices/expressions/hadamard.pyi b/stubs/sympy-stubs/matrices/expressions/hadamard.pyi index be2843b2..0d5a42ef 100644 --- a/stubs/sympy-stubs/matrices/expressions/hadamard.pyi +++ b/stubs/sympy-stubs/matrices/expressions/hadamard.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core.basic import Basic from sympy.matrices.expressions.matexpr import MatrixExpr diff --git a/stubs/sympy-stubs/matrices/expressions/inverse.pyi b/stubs/sympy-stubs/matrices/expressions/inverse.pyi index 5d033eda..5a67d48c 100644 --- a/stubs/sympy-stubs/matrices/expressions/inverse.pyi +++ b/stubs/sympy-stubs/matrices/expressions/inverse.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core.basic import Basic from sympy.matrices.expressions.matpow import MatPow diff --git a/stubs/sympy-stubs/matrices/expressions/kronecker.pyi b/stubs/sympy-stubs/matrices/expressions/kronecker.pyi index 5fe9715e..0fb04211 100644 --- a/stubs/sympy-stubs/matrices/expressions/kronecker.pyi +++ b/stubs/sympy-stubs/matrices/expressions/kronecker.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.matrices.expressions.matadd import MatAdd from sympy.matrices.expressions.matexpr import MatrixExpr diff --git a/stubs/sympy-stubs/matrices/expressions/matadd.pyi b/stubs/sympy-stubs/matrices/expressions/matadd.pyi index 54e65293..16bc7416 100644 --- a/stubs/sympy-stubs/matrices/expressions/matadd.pyi +++ b/stubs/sympy-stubs/matrices/expressions/matadd.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core.add import Add from sympy.matrices.expressions.matexpr import MatrixExpr diff --git a/stubs/sympy-stubs/matrices/expressions/matexpr.pyi b/stubs/sympy-stubs/matrices/expressions/matexpr.pyi index 6e861923..96e7fbba 100644 --- a/stubs/sympy-stubs/matrices/expressions/matexpr.pyi +++ b/stubs/sympy-stubs/matrices/expressions/matexpr.pyi @@ -1,4 +1,5 @@ -from typing import Any, Callable, Literal, Self +from typing import Any, Callable, Literal +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.decorators import _sympifyit, call_highest_priority diff --git a/stubs/sympy-stubs/matrices/expressions/matmul.pyi b/stubs/sympy-stubs/matrices/expressions/matmul.pyi index 30140aee..e1884d2a 100644 --- a/stubs/sympy-stubs/matrices/expressions/matmul.pyi +++ b/stubs/sympy-stubs/matrices/expressions/matmul.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core.expr import Expr from sympy.core.mul import Mul diff --git a/stubs/sympy-stubs/matrices/expressions/matpow.pyi b/stubs/sympy-stubs/matrices/expressions/matpow.pyi index dd34f4ee..b197f3e6 100644 --- a/stubs/sympy-stubs/matrices/expressions/matpow.pyi +++ b/stubs/sympy-stubs/matrices/expressions/matpow.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core.basic import Basic from sympy.matrices.expressions.inverse import Inverse diff --git a/stubs/sympy-stubs/matrices/expressions/permutation.pyi b/stubs/sympy-stubs/matrices/expressions/permutation.pyi index 810b988c..5847a3b8 100644 --- a/stubs/sympy-stubs/matrices/expressions/permutation.pyi +++ b/stubs/sympy-stubs/matrices/expressions/permutation.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core.basic import Basic from sympy.matrices.expressions.matexpr import MatrixExpr diff --git a/stubs/sympy-stubs/matrices/expressions/sets.pyi b/stubs/sympy-stubs/matrices/expressions/sets.pyi index 5458abb8..64a0fbd3 100644 --- a/stubs/sympy-stubs/matrices/expressions/sets.pyi +++ b/stubs/sympy-stubs/matrices/expressions/sets.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core.basic import Basic from sympy.sets.sets import Set diff --git a/stubs/sympy-stubs/matrices/expressions/slice.pyi b/stubs/sympy-stubs/matrices/expressions/slice.pyi index 6eeea819..bbdb83de 100644 --- a/stubs/sympy-stubs/matrices/expressions/slice.pyi +++ b/stubs/sympy-stubs/matrices/expressions/slice.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy.core.function import UndefinedFunction from sympy.matrices.expressions.matexpr import MatrixExpr diff --git a/stubs/sympy-stubs/matrices/expressions/special.pyi b/stubs/sympy-stubs/matrices/expressions/special.pyi index 968c124b..9728bde1 100644 --- a/stubs/sympy-stubs/matrices/expressions/special.pyi +++ b/stubs/sympy-stubs/matrices/expressions/special.pyi @@ -1,4 +1,5 @@ -from typing import Literal, Self +from typing import Literal +from typing_extensions import Self from sympy.core.basic import Basic from sympy.matrices.expressions.matexpr import MatrixExpr diff --git a/stubs/sympy-stubs/matrices/expressions/trace.pyi b/stubs/sympy-stubs/matrices/expressions/trace.pyi index 24859298..bf1568e0 100644 --- a/stubs/sympy-stubs/matrices/expressions/trace.pyi +++ b/stubs/sympy-stubs/matrices/expressions/trace.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.expr import Expr diff --git a/stubs/sympy-stubs/matrices/immutable.pyi b/stubs/sympy-stubs/matrices/immutable.pyi index 6249910e..b2c80ffe 100644 --- a/stubs/sympy-stubs/matrices/immutable.pyi +++ b/stubs/sympy-stubs/matrices/immutable.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.matrices.dense import DenseMatrix from sympy.matrices.expressions import MatrixExpr diff --git a/stubs/sympy-stubs/matrices/repmatrix.pyi b/stubs/sympy-stubs/matrices/repmatrix.pyi index 37f02492..68725e90 100644 --- a/stubs/sympy-stubs/matrices/repmatrix.pyi +++ b/stubs/sympy-stubs/matrices/repmatrix.pyi @@ -1,8 +1,8 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy import MatrixBase from sympy.matrices.common import MatrixKind -from sympy.matrices.dense import MutableDenseMatrix from sympy.matrices.expressions.matexpr import MatrixElement from sympy.polys.matrices import DomainMatrix diff --git a/stubs/sympy-stubs/multipledispatch/dispatcher.pyi b/stubs/sympy-stubs/multipledispatch/dispatcher.pyi index 108c55cd..9d96073b 100644 --- a/stubs/sympy-stubs/multipledispatch/dispatcher.pyi +++ b/stubs/sympy-stubs/multipledispatch/dispatcher.pyi @@ -1,6 +1,7 @@ from inspect import Parameter from itertools import islice -from typing import Any, Callable, Generator, LiteralString, Self, ValuesView +from typing import Any, Callable, Generator +from typing_extensions import LiteralString, Self, ValuesView class MDNotImplementedError(NotImplementedError): ... diff --git a/stubs/sympy-stubs/ntheory/ecm.pyi b/stubs/sympy-stubs/ntheory/ecm.pyi index ab3a0cff..3c0654ce 100644 --- a/stubs/sympy-stubs/ntheory/ecm.pyi +++ b/stubs/sympy-stubs/ntheory/ecm.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self rgen = ... diff --git a/stubs/sympy-stubs/ntheory/factor_.pyi b/stubs/sympy-stubs/ntheory/factor_.pyi index b727ae45..03cf37d1 100644 --- a/stubs/sympy-stubs/ntheory/factor_.pyi +++ b/stubs/sympy-stubs/ntheory/factor_.pyi @@ -1,10 +1,9 @@ -from typing import Any, Generator, Literal, LiteralString +from typing import Any, Generator, Literal +from typing_extensions import LiteralString from sympy import Function -from sympy.core.function import UndefinedFunction from sympy.core.numbers import Integer from sympy.series.order import Order -from sympy.utilities.decorator import deprecated MERSENNE_PRIME_EXPONENTS = ... PERFECT = ... diff --git a/stubs/sympy-stubs/physics/control/lti.pyi b/stubs/sympy-stubs/physics/control/lti.pyi index 0831a84f..a575090d 100644 --- a/stubs/sympy-stubs/physics/control/lti.pyi +++ b/stubs/sympy-stubs/physics/control/lti.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Callable, Self, Type +from typing import Any, Callable, Type +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.evalf import EvalfMixin diff --git a/stubs/sympy-stubs/physics/units/dimensions.pyi b/stubs/sympy-stubs/physics/units/dimensions.pyi index 2461996a..3a92461e 100644 --- a/stubs/sympy-stubs/physics/units/dimensions.pyi +++ b/stubs/sympy-stubs/physics/units/dimensions.pyi @@ -1,4 +1,5 @@ -from typing import Any, LiteralString, Self +from typing import Any +from typing_extensions import LiteralString, Self from sympy.core.basic import Basic from sympy.core.expr import Expr diff --git a/stubs/sympy-stubs/physics/units/prefixes.pyi b/stubs/sympy-stubs/physics/units/prefixes.pyi index 6bb3e285..391e3f06 100644 --- a/stubs/sympy-stubs/physics/units/prefixes.pyi +++ b/stubs/sympy-stubs/physics/units/prefixes.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy.core.expr import Expr diff --git a/stubs/sympy-stubs/physics/units/quantities.pyi b/stubs/sympy-stubs/physics/units/quantities.pyi index 1f3fdaba..b692bcc9 100644 --- a/stubs/sympy-stubs/physics/units/quantities.pyi +++ b/stubs/sympy-stubs/physics/units/quantities.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core.add import Add from sympy.core.expr import AtomicExpr, Expr diff --git a/stubs/sympy-stubs/plotting/intervalmath/interval_arithmetic.pyi b/stubs/sympy-stubs/plotting/intervalmath/interval_arithmetic.pyi index c6c943f6..4f40d131 100644 --- a/stubs/sympy-stubs/plotting/intervalmath/interval_arithmetic.pyi +++ b/stubs/sympy-stubs/plotting/intervalmath/interval_arithmetic.pyi @@ -1,5 +1,5 @@ from types import NotImplementedType -from typing import Self +from typing_extensions import Self class interval: def __init__(self, *args, is_valid=..., **kwargs) -> None: ... diff --git a/stubs/sympy-stubs/polys/agca/extensions.pyi b/stubs/sympy-stubs/polys/agca/extensions.pyi index 29097eac..7994647d 100644 --- a/stubs/sympy-stubs/polys/agca/extensions.pyi +++ b/stubs/sympy-stubs/polys/agca/extensions.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy.polys.domains.domain import Domain from sympy.polys.domains.domainelement import DomainElement diff --git a/stubs/sympy-stubs/polys/agca/homomorphisms.pyi b/stubs/sympy-stubs/polys/agca/homomorphisms.pyi index 14ccfd44..a5691601 100644 --- a/stubs/sympy-stubs/polys/agca/homomorphisms.pyi +++ b/stubs/sympy-stubs/polys/agca/homomorphisms.pyi @@ -1,5 +1,5 @@ from types import NotImplementedType -from typing import Self +from typing_extensions import Self class ModuleHomomorphism: def __init__(self, domain, codomain) -> None: ... diff --git a/stubs/sympy-stubs/polys/agca/ideals.pyi b/stubs/sympy-stubs/polys/agca/ideals.pyi index 911a577c..f87ee3d3 100644 --- a/stubs/sympy-stubs/polys/agca/ideals.pyi +++ b/stubs/sympy-stubs/polys/agca/ideals.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Generator, LiteralString +from typing import Any, Generator +from typing_extensions import LiteralString from sympy.polys.polyutils import IntegerPowerable diff --git a/stubs/sympy-stubs/polys/agca/modules.pyi b/stubs/sympy-stubs/polys/agca/modules.pyi index b924ee3d..9715d89b 100644 --- a/stubs/sympy-stubs/polys/agca/modules.pyi +++ b/stubs/sympy-stubs/polys/agca/modules.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Literal, LiteralString, Self +from typing import Any, Literal +from typing_extensions import LiteralString, Self from sympy.polys.agca.homomorphisms import FreeModuleHomomorphism from sympy.polys.orderings import ProductOrder diff --git a/stubs/sympy-stubs/polys/distributedmodules.pyi b/stubs/sympy-stubs/polys/distributedmodules.pyi index 2f372bda..d2990b0f 100644 --- a/stubs/sympy-stubs/polys/distributedmodules.pyi +++ b/stubs/sympy-stubs/polys/distributedmodules.pyi @@ -1,8 +1,9 @@ from typing import Any +from typing_extensions import Unpack -def sdm_monomial_mul(M, X) -> tuple[Any, *tuple[Any, ...]]: ... +def sdm_monomial_mul(M, X) -> tuple[Any, Unpack[tuple[Any, ...]]]: ... def sdm_monomial_deg(M) -> int: ... -def sdm_monomial_lcm(A, B) -> tuple[Any, *tuple[Any, ...]]: ... +def sdm_monomial_lcm(A, B) -> tuple[Any, Unpack[tuple[Any, ...]]]: ... def sdm_monomial_divides(A, B) -> bool: ... def sdm_LC(f, K): ... def sdm_to_dict(f) -> dict[Any, Any]: ... @@ -12,7 +13,7 @@ def sdm_strip(f) -> list[tuple[Any, Any]]: ... def sdm_add(f, g, O, K) -> list[tuple[Any, Any]]: ... def sdm_LM(f): ... def sdm_LT(f): ... -def sdm_mul_term(f, term, O, K) -> list[Any] | list[tuple[tuple[Any, *tuple[Any, ...]], Any]]: ... +def sdm_mul_term(f, term, O, K) -> list[Any] | list[tuple[tuple[Any, Unpack[tuple[Any, ...]]], Any]]: ... def sdm_zero() -> list[Any]: ... def sdm_deg(f) -> int: ... def sdm_from_vector(vec, O, K, **opts) -> list[tuple[Any, Any]]: ... diff --git a/stubs/sympy-stubs/polys/domains/compositedomain.pyi b/stubs/sympy-stubs/polys/domains/compositedomain.pyi index b39d34ac..bbc869c6 100644 --- a/stubs/sympy-stubs/polys/domains/compositedomain.pyi +++ b/stubs/sympy-stubs/polys/domains/compositedomain.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.polys.domains.domain import Domain diff --git a/stubs/sympy-stubs/polys/domains/domain.pyi b/stubs/sympy-stubs/polys/domains/domain.pyi index 2870b7c2..70c4376c 100644 --- a/stubs/sympy-stubs/polys/domains/domain.pyi +++ b/stubs/sympy-stubs/polys/domains/domain.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self class Domain: dtype: type | None = ... diff --git a/stubs/sympy-stubs/polys/domains/field.pyi b/stubs/sympy-stubs/polys/domains/field.pyi index 525a12ef..bb737b24 100644 --- a/stubs/sympy-stubs/polys/domains/field.pyi +++ b/stubs/sympy-stubs/polys/domains/field.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.polys.domains.ring import Ring diff --git a/stubs/sympy-stubs/polys/domains/finitefield.pyi b/stubs/sympy-stubs/polys/domains/finitefield.pyi index be993958..72f4e78f 100644 --- a/stubs/sympy-stubs/polys/domains/finitefield.pyi +++ b/stubs/sympy-stubs/polys/domains/finitefield.pyi @@ -1,10 +1,9 @@ -from typing import Any, Literal, Self +from typing import Any +from typing_extensions import Self from sympy.core.numbers import Integer -from sympy.external.gmpy import GROUND_TYPES from sympy.polys.domains.field import Field from sympy.polys.domains.simpledomain import SimpleDomain -from sympy.utilities.decorator import doctest_depends_on class FiniteField(Field, SimpleDomain): # type: ignore rep = ... diff --git a/stubs/sympy-stubs/polys/domains/gaussiandomains.pyi b/stubs/sympy-stubs/polys/domains/gaussiandomains.pyi index 34243a18..91deebc4 100644 --- a/stubs/sympy-stubs/polys/domains/gaussiandomains.pyi +++ b/stubs/sympy-stubs/polys/domains/gaussiandomains.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Literal, LiteralString, Self +from typing import Any, Literal +from typing_extensions import LiteralString, Self, Unpack from sympy.polys.domains.domain import Domain from sympy.polys.domains.domainelement import DomainElement @@ -86,8 +87,8 @@ class GaussianIntegerRing(GaussianDomain, Ring): def __init__(self) -> None: ... def get_ring(self) -> Self: ... def get_field(self) -> GaussianRationalField: ... - def normalize(self, d, *args) -> tuple[Any, *tuple[Any, ...]]: ... - def gcd(self, a, b) -> tuple[Any, *tuple[Any, ...]]: ... + def normalize(self, d, *args) -> tuple[Any, Unpack[tuple[Any, ...]]]: ... + def gcd(self, a, b) -> tuple[Any, Unpack[tuple[Any, ...]]]: ... def lcm(self, a, b): ... def from_GaussianIntegerRing(K1, a, K0): ... def from_GaussianRationalField(K1, a, K0): ... diff --git a/stubs/sympy-stubs/polys/domains/modularinteger.pyi b/stubs/sympy-stubs/polys/domains/modularinteger.pyi index c340d49f..87535724 100644 --- a/stubs/sympy-stubs/polys/domains/modularinteger.pyi +++ b/stubs/sympy-stubs/polys/domains/modularinteger.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, LiteralString, Self +from typing import Any +from typing_extensions import LiteralString, Self from sympy.polys.domains.domainelement import DomainElement from sympy.polys.polyutils import PicklableWithSlots diff --git a/stubs/sympy-stubs/polys/domains/old_fractionfield.pyi b/stubs/sympy-stubs/polys/domains/old_fractionfield.pyi index 981e9682..85f88fd5 100644 --- a/stubs/sympy-stubs/polys/domains/old_fractionfield.pyi +++ b/stubs/sympy-stubs/polys/domains/old_fractionfield.pyi @@ -1,10 +1,9 @@ -from typing import Any, Self +from typing import Any from sympy.polys.domains.characteristiczero import CharacteristicZero from sympy.polys.domains.compositedomain import CompositeDomain from sympy.polys.domains.field import Field from sympy.polys.polyclasses import DMF -from sympy.utilities import public class FractionField(Field, CharacteristicZero, CompositeDomain): dtype = DMF diff --git a/stubs/sympy-stubs/polys/domains/old_polynomialring.pyi b/stubs/sympy-stubs/polys/domains/old_polynomialring.pyi index c30136f4..42b33945 100644 --- a/stubs/sympy-stubs/polys/domains/old_polynomialring.pyi +++ b/stubs/sympy-stubs/polys/domains/old_polynomialring.pyi @@ -1,4 +1,4 @@ -from typing import Any, Literal, Self +from typing import Any, Literal from sympy.polys.agca.modules import FreeModulePolyRing from sympy.polys.domains.characteristiczero import CharacteristicZero diff --git a/stubs/sympy-stubs/polys/domains/rationalfield.pyi b/stubs/sympy-stubs/polys/domains/rationalfield.pyi index 07946787..48f51bc9 100644 --- a/stubs/sympy-stubs/polys/domains/rationalfield.pyi +++ b/stubs/sympy-stubs/polys/domains/rationalfield.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Literal, Self +from typing import Any +from typing_extensions import Self from sympy.core.numbers import Integer, Rational from sympy.external.gmpy import MPQ @@ -7,7 +8,6 @@ from sympy.external.pythonmpq import PythonMPQ from sympy.polys.domains.characteristiczero import CharacteristicZero from sympy.polys.domains.field import Field from sympy.polys.domains.simpledomain import SimpleDomain -from sympy.utilities import public class RationalField(Field, CharacteristicZero, SimpleDomain): rep = ... diff --git a/stubs/sympy-stubs/polys/domains/realfield.pyi b/stubs/sympy-stubs/polys/domains/realfield.pyi index 634e30bc..6b92c787 100644 --- a/stubs/sympy-stubs/polys/domains/realfield.pyi +++ b/stubs/sympy-stubs/polys/domains/realfield.pyi @@ -1,10 +1,10 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core.numbers import Float from sympy.polys.domains.characteristiczero import CharacteristicZero from sympy.polys.domains.field import Field from sympy.polys.domains.simpledomain import SimpleDomain -from sympy.utilities import public class RealField(Field, CharacteristicZero, SimpleDomain): rep = ... diff --git a/stubs/sympy-stubs/polys/domains/ring.pyi b/stubs/sympy-stubs/polys/domains/ring.pyi index 287b5d07..9fe7b646 100644 --- a/stubs/sympy-stubs/polys/domains/ring.pyi +++ b/stubs/sympy-stubs/polys/domains/ring.pyi @@ -1,9 +1,8 @@ -from typing import Self +from typing_extensions import Self from sympy.polys.agca.ideals import ModuleImplementedIdeal from sympy.polys.domains.domain import Domain from sympy.polys.domains.quotientring import QuotientRing -from sympy.utilities import public class Ring(Domain): is_Ring = ... diff --git a/stubs/sympy-stubs/polys/domains/simpledomain.pyi b/stubs/sympy-stubs/polys/domains/simpledomain.pyi index 2b4fbecc..0827432f 100644 --- a/stubs/sympy-stubs/polys/domains/simpledomain.pyi +++ b/stubs/sympy-stubs/polys/domains/simpledomain.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.polys.domains.domain import Domain diff --git a/stubs/sympy-stubs/polys/fields.pyi b/stubs/sympy-stubs/polys/fields.pyi index a1fd06b6..6b217571 100644 --- a/stubs/sympy-stubs/polys/fields.pyi +++ b/stubs/sympy-stubs/polys/fields.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core.sympify import CantSympify from sympy.polys.domains.domainelement import DomainElement diff --git a/stubs/sympy-stubs/polys/matrices/ddm.pyi b/stubs/sympy-stubs/polys/matrices/ddm.pyi index e481e7df..65d5fd8c 100644 --- a/stubs/sympy-stubs/polys/matrices/ddm.pyi +++ b/stubs/sympy-stubs/polys/matrices/ddm.pyi @@ -1,9 +1,9 @@ from itertools import chain from types import NotImplementedType -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.polys.matrices.sdm import SDM -from sympy.utilities.decorator import doctest_depends_on class DDM(list): fmt = ... diff --git a/stubs/sympy-stubs/polys/matrices/domainmatrix.pyi b/stubs/sympy-stubs/polys/matrices/domainmatrix.pyi index 59122d1c..c72e5781 100644 --- a/stubs/sympy-stubs/polys/matrices/domainmatrix.pyi +++ b/stubs/sympy-stubs/polys/matrices/domainmatrix.pyi @@ -1,12 +1,12 @@ from types import NotImplementedType -from typing import Any, Literal, Self, Tuple as tTuple, Union as tUnion +from typing import Any, Literal +from typing_extensions import Self, Tuple as tTuple, Union as tUnion from sympy.matrices.dense import MutableDenseMatrix from sympy.polys.domains import Domain from sympy.polys.matrices.ddm import DDM from sympy.polys.matrices.domainscalar import DomainScalar from sympy.polys.matrices.sdm import SDM -from sympy.utilities.decorator import doctest_depends_on def DM(rows, domain) -> DomainMatrix: ... diff --git a/stubs/sympy-stubs/polys/matrices/domainscalar.pyi b/stubs/sympy-stubs/polys/matrices/domainscalar.pyi index 1468e3bb..3d019366 100644 --- a/stubs/sympy-stubs/polys/matrices/domainscalar.pyi +++ b/stubs/sympy-stubs/polys/matrices/domainscalar.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Self +from typing import Any +from typing_extensions import Self class DomainScalar: def __new__(cls, element, domain) -> Self: ... diff --git a/stubs/sympy-stubs/polys/matrices/sdm.pyi b/stubs/sympy-stubs/polys/matrices/sdm.pyi index 5ed6cfb2..6eefb38e 100644 --- a/stubs/sympy-stubs/polys/matrices/sdm.pyi +++ b/stubs/sympy-stubs/polys/matrices/sdm.pyi @@ -1,8 +1,8 @@ from types import NotImplementedType -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.polys.matrices.ddm import DDM -from sympy.utilities.decorator import doctest_depends_on class SDM(dict): fmt = ... diff --git a/stubs/sympy-stubs/polys/monomials.pyi b/stubs/sympy-stubs/polys/monomials.pyi index 531ae9fe..67fc3c58 100644 --- a/stubs/sympy-stubs/polys/monomials.pyi +++ b/stubs/sympy-stubs/polys/monomials.pyi @@ -1,4 +1,5 @@ -from typing import Any, Generator, Iterator, Self +from typing import Any, Generator, Iterator +from typing_extensions import Self from sympy.polys.polyutils import PicklableWithSlots from sympy.series.order import Order diff --git a/stubs/sympy-stubs/polys/numberfields/galois_resolvents.pyi b/stubs/sympy-stubs/polys/numberfields/galois_resolvents.pyi index ed565c57..0232517f 100644 --- a/stubs/sympy-stubs/polys/numberfields/galois_resolvents.pyi +++ b/stubs/sympy-stubs/polys/numberfields/galois_resolvents.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, LiteralString +from typing import Any, Literal +from typing_extensions import LiteralString class GaloisGroupException(Exception): ... class ResolventException(GaloisGroupException): ... diff --git a/stubs/sympy-stubs/polys/numberfields/modules.pyi b/stubs/sympy-stubs/polys/numberfields/modules.pyi index 8170fa4b..97aa1edd 100644 --- a/stubs/sympy-stubs/polys/numberfields/modules.pyi +++ b/stubs/sympy-stubs/polys/numberfields/modules.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy.polys.matrices.domainmatrix import DomainMatrix from sympy.polys.polyclasses import ANP diff --git a/stubs/sympy-stubs/polys/polyerrors.pyi b/stubs/sympy-stubs/polys/polyerrors.pyi index 778c14d0..449fe7f9 100644 --- a/stubs/sympy-stubs/polys/polyerrors.pyi +++ b/stubs/sympy-stubs/polys/polyerrors.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.utilities import public diff --git a/stubs/sympy-stubs/polys/polymatrix.pyi b/stubs/sympy-stubs/polys/polymatrix.pyi index bb581d0c..f4c9ddee 100644 --- a/stubs/sympy-stubs/polys/polymatrix.pyi +++ b/stubs/sympy-stubs/polys/polymatrix.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Self +from typing import Any +from typing_extensions import Self class MutablePolyDenseMatrix: def __new__(cls, *args, ring=...) -> Self: ... diff --git a/stubs/sympy-stubs/polys/polyoptions.pyi b/stubs/sympy-stubs/polys/polyoptions.pyi index e2526015..1b3141a0 100644 --- a/stubs/sympy-stubs/polys/polyoptions.pyi +++ b/stubs/sympy-stubs/polys/polyoptions.pyi @@ -1,4 +1,5 @@ -from typing import Any, Callable, Generator, Literal, NoReturn, Self +from typing import Any, Callable, Generator, Literal, NoReturn +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.symbol import Symbol diff --git a/stubs/sympy-stubs/polys/polytools.pyi b/stubs/sympy-stubs/polys/polytools.pyi index 5666a78f..4dfd5ba0 100644 --- a/stubs/sympy-stubs/polys/polytools.pyi +++ b/stubs/sympy-stubs/polys/polytools.pyi @@ -1,6 +1,7 @@ from functools import _Wrapped from types import NotImplementedType -from typing import Any, Callable, Iterator, Literal, Self, Tuple +from typing import Any, Iterator, Literal +from typing_extensions import Self, Tuple from sympy.combinatorics.galois import S1TransitiveSubgroups, S2TransitiveSubgroups, S3TransitiveSubgroups from sympy.combinatorics.perm_groups import PermutationGroup @@ -181,7 +182,13 @@ class Poly(Basic): def make_monic_over_integers_by_scaling_roots(f) -> tuple[Self, Any] | tuple[Any | Self, Any]: ... def galois_group(f, by_name=..., max_tries=..., randomize=...) -> tuple[ PermutationGroup - | Literal[S1TransitiveSubgroups.S1, S2TransitiveSubgroups.S2, S3TransitiveSubgroups.A3, S3TransitiveSubgroups.S3] + | Literal[ + # Looks like a false-positives, no code to specify + S1TransitiveSubgroups.S1, # pyright: ignore + S2TransitiveSubgroups.S2, # pyright: ignore + S3TransitiveSubgroups.A3, # pyright: ignore + S3TransitiveSubgroups.S3, # pyright: ignore + ] | None, bool, ]: ... diff --git a/stubs/sympy-stubs/polys/polyutils.pyi b/stubs/sympy-stubs/polys/polyutils.pyi index b5c2e1cb..2505d38f 100644 --- a/stubs/sympy-stubs/polys/polyutils.pyi +++ b/stubs/sympy-stubs/polys/polyutils.pyi @@ -1,7 +1,7 @@ from types import NotImplementedType -from typing import Any, Self +from typing import Any +from typing_extensions import Self -from sympy.external.gmpy import GROUND_TYPES from sympy.series.order import Order _gens_order = ... diff --git a/stubs/sympy-stubs/polys/rings.pyi b/stubs/sympy-stubs/polys/rings.pyi index 8e8edc3b..5e3433be 100644 --- a/stubs/sympy-stubs/polys/rings.pyi +++ b/stubs/sympy-stubs/polys/rings.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Iterator, Literal, LiteralString, Self +from typing import Any, Iterator, Literal, Self +from typing_extensions import LiteralString from sympy.core.sympify import CantSympify from sympy.polys.compatibility import IPolys diff --git a/stubs/sympy-stubs/polys/rootisolation.pyi b/stubs/sympy-stubs/polys/rootisolation.pyi index f0bdd159..c39a7a14 100644 --- a/stubs/sympy-stubs/polys/rootisolation.pyi +++ b/stubs/sympy-stubs/polys/rootisolation.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, LiteralString, Self +from typing import Any, Literal +from typing_extensions import LiteralString, Self def dup_sturm(f, K) -> list[Any | list[Any]]: ... def dup_root_upper_bound(f, K) -> None: ... diff --git a/stubs/sympy-stubs/polys/rootoftools.pyi b/stubs/sympy-stubs/polys/rootoftools.pyi index 9b4e1b65..9c1aa7f0 100644 --- a/stubs/sympy-stubs/polys/rootoftools.pyi +++ b/stubs/sympy-stubs/polys/rootoftools.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy.core import Expr from sympy.core.numbers import Integer diff --git a/stubs/sympy-stubs/printing/latex.pyi b/stubs/sympy-stubs/printing/latex.pyi index ad90152e..f8b80d26 100644 --- a/stubs/sympy-stubs/printing/latex.pyi +++ b/stubs/sympy-stubs/printing/latex.pyi @@ -1,9 +1,7 @@ -from typing import TYPE_CHECKING, Any, Callable +from typing import Any, Callable from sympy.printing.printer import Printer, print_function -if TYPE_CHECKING: - ... accepted_latex_functions = ... tex_greek_dictionary = ... other_symbols = ... diff --git a/stubs/sympy-stubs/printing/pretty/pretty_symbology.pyi b/stubs/sympy-stubs/printing/pretty/pretty_symbology.pyi index a271129e..31d2ad31 100644 --- a/stubs/sympy-stubs/printing/pretty/pretty_symbology.pyi +++ b/stubs/sympy-stubs/printing/pretty/pretty_symbology.pyi @@ -1,5 +1,3 @@ -from typing import Any, LiteralString - unicode_warnings = ... def U(name) -> str | None: ... diff --git a/stubs/sympy-stubs/printing/pretty/stringpict.pyi b/stubs/sympy-stubs/printing/pretty/stringpict.pyi index 5c8e2607..d7792dc0 100644 --- a/stubs/sympy-stubs/printing/pretty/stringpict.pyi +++ b/stubs/sympy-stubs/printing/pretty/stringpict.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, LiteralString, Self +from typing import Any, Literal +from typing_extensions import LiteralString, Self class stringPict: LINE = ... diff --git a/stubs/sympy-stubs/printing/repr.pyi b/stubs/sympy-stubs/printing/repr.pyi index a7a73c74..657668e2 100644 --- a/stubs/sympy-stubs/printing/repr.pyi +++ b/stubs/sympy-stubs/printing/repr.pyi @@ -1,4 +1,5 @@ -from typing import Any, LiteralString +from typing import Any +from typing_extensions import LiteralString from sympy.printing.printer import Printer, print_function diff --git a/stubs/sympy-stubs/series/formal.pyi b/stubs/sympy-stubs/series/formal.pyi index c23d9849..90d67c7a 100644 --- a/stubs/sympy-stubs/series/formal.pyi +++ b/stubs/sympy-stubs/series/formal.pyi @@ -1,4 +1,5 @@ -from typing import Any, Generator, Self +from typing import Any, Generator +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.function import Function, UndefinedFunction diff --git a/stubs/sympy-stubs/series/fourier.pyi b/stubs/sympy-stubs/series/fourier.pyi index 34070a17..5da6855a 100644 --- a/stubs/sympy-stubs/series/fourier.pyi +++ b/stubs/sympy-stubs/series/fourier.pyi @@ -1,4 +1,5 @@ -from typing import Any, Generator, Literal, Self +from typing import Any, Generator, Literal +from typing_extensions import Self from sympy.core.basic import Basic from sympy.series.order import Order diff --git a/stubs/sympy-stubs/series/limits.pyi b/stubs/sympy-stubs/series/limits.pyi index 7fe1e69f..ded577b9 100644 --- a/stubs/sympy-stubs/series/limits.pyi +++ b/stubs/sympy-stubs/series/limits.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core import Expr from sympy.core.basic import Basic diff --git a/stubs/sympy-stubs/series/order.pyi b/stubs/sympy-stubs/series/order.pyi index 85547d3b..0c3c1b96 100644 --- a/stubs/sympy-stubs/series/order.pyi +++ b/stubs/sympy-stubs/series/order.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core import Expr from sympy.core.basic import Basic diff --git a/stubs/sympy-stubs/series/sequences.pyi b/stubs/sympy-stubs/series/sequences.pyi index 11283aa0..7a0124f0 100644 --- a/stubs/sympy-stubs/series/sequences.pyi +++ b/stubs/sympy-stubs/series/sequences.pyi @@ -1,4 +1,5 @@ -from typing import Any, Generator, Iterator, NoReturn, Self +from typing import Any, Generator, Iterator, NoReturn +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.cache import cacheit diff --git a/stubs/sympy-stubs/sets/conditionset.pyi b/stubs/sympy-stubs/sets/conditionset.pyi index 1e2c5613..5aca7ab9 100644 --- a/stubs/sympy-stubs/sets/conditionset.pyi +++ b/stubs/sympy-stubs/sets/conditionset.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core.logic import And from sympy.sets.sets import Complement, FiniteSet, Intersection, Set, Union diff --git a/stubs/sympy-stubs/sets/contains.pyi b/stubs/sympy-stubs/sets/contains.pyi index 4692f804..ce03e0a0 100644 --- a/stubs/sympy-stubs/sets/contains.pyi +++ b/stubs/sympy-stubs/sets/contains.pyi @@ -1,4 +1,4 @@ -from typing import Any, Self +from typing import Any from sympy.core.basic import Basic from sympy.logic.boolalg import BooleanFunction diff --git a/stubs/sympy-stubs/sets/fancysets.pyi b/stubs/sympy-stubs/sets/fancysets.pyi index 2c84496e..87dc58b2 100644 --- a/stubs/sympy-stubs/sets/fancysets.pyi +++ b/stubs/sympy-stubs/sets/fancysets.pyi @@ -1,4 +1,5 @@ -from typing import Any, Generator, Literal, NoReturn, Self +from typing import Any, Generator, Literal, NoReturn +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.logic import And diff --git a/stubs/sympy-stubs/sets/ordinals.pyi b/stubs/sympy-stubs/sets/ordinals.pyi index 9e93961a..5ee7dd1e 100644 --- a/stubs/sympy-stubs/sets/ordinals.pyi +++ b/stubs/sympy-stubs/sets/ordinals.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Literal, Self +from typing import Literal +from typing_extensions import Self from sympy.core import Basic diff --git a/stubs/sympy-stubs/sets/powerset.pyi b/stubs/sympy-stubs/sets/powerset.pyi index 33bb42d8..b81c5349 100644 --- a/stubs/sympy-stubs/sets/powerset.pyi +++ b/stubs/sympy-stubs/sets/powerset.pyi @@ -1,4 +1,5 @@ -from typing import Any, Generator, Self +from typing import Any, Generator +from typing_extensions import Self from sympy.core.basic import Basic from sympy.sets.sets import Set, SetKind diff --git a/stubs/sympy-stubs/sets/setexpr.pyi b/stubs/sympy-stubs/sets/setexpr.pyi index 282cfac0..26aef525 100644 --- a/stubs/sympy-stubs/sets/setexpr.pyi +++ b/stubs/sympy-stubs/sets/setexpr.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core import Expr from sympy.core.decorators import _sympifyit, call_highest_priority diff --git a/stubs/sympy-stubs/sets/sets.pyi b/stubs/sympy-stubs/sets/sets.pyi index f0b9ce62..7161e86f 100644 --- a/stubs/sympy-stubs/sets/sets.pyi +++ b/stubs/sympy-stubs/sets/sets.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Callable, Generator, Iterator, Literal, Self +from typing import Any, Callable, Generator, Iterator, Literal +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.decorators import sympify_method_args, sympify_return @@ -9,11 +10,10 @@ from sympy.core.kind import Kind from sympy.core.logic import And, FuzzyBool, Not, Or from sympy.core.operations import LatticeOp from sympy.core.singleton import Singleton -from sympy.logic.boolalg import Boolean, BooleanFalse, BooleanTrue, Xor +from sympy.logic.boolalg import BooleanFalse, BooleanTrue, Xor from sympy.sets.contains import Contains from sympy.sets.fancysets import ImageSet from sympy.sets.powerset import PowerSet -from sympy.utilities.decorator import deprecated tfn = ... diff --git a/stubs/sympy-stubs/simplify/epathtools.pyi b/stubs/sympy-stubs/simplify/epathtools.pyi index 551b4ddd..90450fac 100644 --- a/stubs/sympy-stubs/simplify/epathtools.pyi +++ b/stubs/sympy-stubs/simplify/epathtools.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core.basic import Basic diff --git a/stubs/sympy-stubs/simplify/hyperexpand.pyi b/stubs/sympy-stubs/simplify/hyperexpand.pyi index 178c60f2..7413afa0 100644 --- a/stubs/sympy-stubs/simplify/hyperexpand.pyi +++ b/stubs/sympy-stubs/simplify/hyperexpand.pyi @@ -1,4 +1,5 @@ -from typing import Any, Callable, Literal, Self +from typing import Any, Callable, Literal +from typing_extensions import Self from sympy.core import Expr from sympy.core.function import UndefinedFunction diff --git a/stubs/sympy-stubs/stats/compound_rv.pyi b/stubs/sympy-stubs/stats/compound_rv.pyi index 3f82b2bb..770e19bb 100644 --- a/stubs/sympy-stubs/stats/compound_rv.pyi +++ b/stubs/sympy-stubs/stats/compound_rv.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy import Basic, Equality, Integral, Ne, Piecewise, Sum from sympy.core.function import Lambda diff --git a/stubs/sympy-stubs/stats/crv.pyi b/stubs/sympy-stubs/stats/crv.pyi index 090d548e..c696b491 100644 --- a/stubs/sympy-stubs/stats/crv.pyi +++ b/stubs/sympy-stubs/stats/crv.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy import Basic, Equality, FiniteSet, Integral, Ne from sympy.core.cache import cacheit diff --git a/stubs/sympy-stubs/stats/crv_types.pyi b/stubs/sympy-stubs/stats/crv_types.pyi index ed417a93..120fd8ca 100644 --- a/stubs/sympy-stubs/stats/crv_types.pyi +++ b/stubs/sympy-stubs/stats/crv_types.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy import Equality, FiniteSet, Integral, Interval, Ne, Piecewise, Sum from sympy.core.basic import Basic diff --git a/stubs/sympy-stubs/stats/drv.pyi b/stubs/sympy-stubs/stats/drv.pyi index 1596330c..aac95011 100644 --- a/stubs/sympy-stubs/stats/drv.pyi +++ b/stubs/sympy-stubs/stats/drv.pyi @@ -1,12 +1,11 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self -from sympy import Basic, Contains, Equality, FiniteSet, Intersection, Ne, Piecewise, Sum +from sympy import Basic, Contains, Equality, FiniteSet, Intersection, Ne, Sum from sympy.core.cache import cacheit from sympy.core.function import Lambda from sympy.core.logic import And from sympy.core.relational import Relational -from sympy.logic.boolalg import Boolean -from sympy.series.order import Order from sympy.sets.sets import Complement, Union from sympy.stats.rv import ( ConditionalDomain, diff --git a/stubs/sympy-stubs/stats/drv_types.pyi b/stubs/sympy-stubs/stats/drv_types.pyi index c2ca0106..770a7e14 100644 --- a/stubs/sympy-stubs/stats/drv_types.pyi +++ b/stubs/sympy-stubs/stats/drv_types.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy import Basic from sympy.stats.drv import SingleDiscreteDistribution diff --git a/stubs/sympy-stubs/stats/frv.pyi b/stubs/sympy-stubs/stats/frv.pyi index d96f719c..1c598f3b 100644 --- a/stubs/sympy-stubs/stats/frv.pyi +++ b/stubs/sympy-stubs/stats/frv.pyi @@ -1,4 +1,5 @@ -from typing import Any, Dict, Generator, Literal, Self +from typing import Any, Dict, Generator, Literal +from typing_extensions import Self from sympy import Basic, Equality, FiniteSet, Ne, Piecewise, Sum from sympy.core.cache import cacheit diff --git a/stubs/sympy-stubs/stats/joint_rv.pyi b/stubs/sympy-stubs/stats/joint_rv.pyi index 27203389..f8b0fa7f 100644 --- a/stubs/sympy-stubs/stats/joint_rv.pyi +++ b/stubs/sympy-stubs/stats/joint_rv.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy import Basic, Equality, FiniteSet, Indexed, Integral, Ne, ProductSet, Sum from sympy.core.expr import Expr diff --git a/stubs/sympy-stubs/stats/matrix_distributions.pyi b/stubs/sympy-stubs/stats/matrix_distributions.pyi index a79006ec..3c54af78 100644 --- a/stubs/sympy-stubs/stats/matrix_distributions.pyi +++ b/stubs/sympy-stubs/stats/matrix_distributions.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.matrices.expressions.sets import MatrixSet from sympy.stats.rv import Distribution, MatrixDomain, NamedArgsMixin, PSpace, RandomMatrixSymbol diff --git a/stubs/sympy-stubs/stats/random_matrix.pyi b/stubs/sympy-stubs/stats/random_matrix.pyi index 3843105a..75122b66 100644 --- a/stubs/sympy-stubs/stats/random_matrix.pyi +++ b/stubs/sympy-stubs/stats/random_matrix.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy import Basic from sympy.stats.rv import PSpace diff --git a/stubs/sympy-stubs/stats/random_matrix_models.pyi b/stubs/sympy-stubs/stats/random_matrix_models.pyi index 7965fd1e..255b24c2 100644 --- a/stubs/sympy-stubs/stats/random_matrix_models.pyi +++ b/stubs/sympy-stubs/stats/random_matrix_models.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy import Equality, Integral, Ne from sympy.core.basic import Basic diff --git a/stubs/sympy-stubs/stats/rv.pyi b/stubs/sympy-stubs/stats/rv.pyi index 8a8be9d4..783b2f3a 100644 --- a/stubs/sympy-stubs/stats/rv.pyi +++ b/stubs/sympy-stubs/stats/rv.pyi @@ -1,5 +1,6 @@ from functools import singledispatch -from typing import Any, Generator, Literal, Self +from typing import Any, Generator +from typing_extensions import Self from sympy import Equality, FiniteSet, Integral, Ne, Piecewise, ProductSet, Sum from sympy.core.basic import Basic diff --git a/stubs/sympy-stubs/stats/stochastic_process.pyi b/stubs/sympy-stubs/stats/stochastic_process.pyi index 0410c637..bfdf8d2e 100644 --- a/stubs/sympy-stubs/stats/stochastic_process.pyi +++ b/stubs/sympy-stubs/stats/stochastic_process.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy import Basic from sympy.stats.crv import ProductContinuousDomain diff --git a/stubs/sympy-stubs/stats/stochastic_process_types.pyi b/stubs/sympy-stubs/stats/stochastic_process_types.pyi index 11a96d1a..414f1a91 100644 --- a/stubs/sympy-stubs/stats/stochastic_process_types.pyi +++ b/stubs/sympy-stubs/stats/stochastic_process_types.pyi @@ -1,4 +1,5 @@ -from typing import Any, Generator, List as tList, Literal, Self, Tuple as tTuple, Union as tUnion +from typing import Any, Generator, List as tList, Literal, Tuple as tTuple, Union as tUnion +from typing_extensions import Self from sympy import Equality, Integral, Ne, Piecewise, Sum from sympy.core.add import Add diff --git a/stubs/sympy-stubs/stats/symbolic_multivariate_probability.pyi b/stubs/sympy-stubs/stats/symbolic_multivariate_probability.pyi index dcc3557c..bf8820d0 100644 --- a/stubs/sympy-stubs/stats/symbolic_multivariate_probability.pyi +++ b/stubs/sympy-stubs/stats/symbolic_multivariate_probability.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy import Basic from sympy.core.add import Add diff --git a/stubs/sympy-stubs/stats/symbolic_probability.pyi b/stubs/sympy-stubs/stats/symbolic_probability.pyi index 9cdd41ac..93c88f47 100644 --- a/stubs/sympy-stubs/stats/symbolic_probability.pyi +++ b/stubs/sympy-stubs/stats/symbolic_probability.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy import Basic, Equality, Integral, Ne, Piecewise, Sum from sympy.core.add import Add @@ -12,9 +13,9 @@ from sympy.stats.symbolic_multivariate_probability import CrossCovarianceMatrix, __all__ = ["Probability", "Expectation", "Variance", "Covariance"] -@is_random.register(Expr) +@is_random.register(Expr) # type: ignore[has-type] def _(x) -> bool: ... -@is_random.register(RandomSymbol) +@is_random.register(RandomSymbol) # type: ignore[has-type] def _(x) -> Literal[True]: ... class Probability(Expr): diff --git a/stubs/sympy-stubs/tensor/array/array_comprehension.pyi b/stubs/sympy-stubs/tensor/array/array_comprehension.pyi index 6015bd14..db673f02 100644 --- a/stubs/sympy-stubs/tensor/array/array_comprehension.pyi +++ b/stubs/sympy-stubs/tensor/array/array_comprehension.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy import ImmutableDenseNDimArray from sympy.core import Basic diff --git a/stubs/sympy-stubs/tensor/array/arrayop.pyi b/stubs/sympy-stubs/tensor/array/arrayop.pyi index 2600c588..fb0ac064 100644 --- a/stubs/sympy-stubs/tensor/array/arrayop.pyi +++ b/stubs/sympy-stubs/tensor/array/arrayop.pyi @@ -1,4 +1,5 @@ -from typing import Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy import Basic, Derivative, ImmutableDenseNDimArray, ImmutableSparseNDimArray, NDimArray from sympy.core._print_helpers import Printable diff --git a/stubs/sympy-stubs/tensor/array/dense_ndim_array.pyi b/stubs/sympy-stubs/tensor/array/dense_ndim_array.pyi index 26cdba8a..a1156df7 100644 --- a/stubs/sympy-stubs/tensor/array/dense_ndim_array.pyi +++ b/stubs/sympy-stubs/tensor/array/dense_ndim_array.pyi @@ -1,4 +1,5 @@ -from typing import List, Self +from typing import List +from typing_extensions import Self from sympy import Indexed from sympy.core.basic import Basic diff --git a/stubs/sympy-stubs/tensor/array/expressions/array_expressions.pyi b/stubs/sympy-stubs/tensor/array/expressions/array_expressions.pyi index 5f7ea7db..b31102c0 100644 --- a/stubs/sympy-stubs/tensor/array/expressions/array_expressions.pyi +++ b/stubs/sympy-stubs/tensor/array/expressions/array_expressions.pyi @@ -1,10 +1,10 @@ import typing from ctypes import Array -from typing import Any, Generator, List, Optional, Self, Tuple as tTuple +from typing import Any, Generator, List, Optional, Tuple as tTuple +from typing_extensions import Self from sympy import ImmutableSparseNDimArray, NDimArray from sympy.core.basic import Basic -from sympy.core.containers import Tuple from sympy.core.expr import Expr from sympy.tensor.array.dense_ndim_array import ImmutableDenseNDimArray diff --git a/stubs/sympy-stubs/tensor/array/mutable_ndim_array.pyi b/stubs/sympy-stubs/tensor/array/mutable_ndim_array.pyi index 8f731fcd..66c5ad2c 100644 --- a/stubs/sympy-stubs/tensor/array/mutable_ndim_array.pyi +++ b/stubs/sympy-stubs/tensor/array/mutable_ndim_array.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.tensor.array.ndim_array import NDimArray diff --git a/stubs/sympy-stubs/tensor/array/ndim_array.pyi b/stubs/sympy-stubs/tensor/array/ndim_array.pyi index 2b89561e..23d6de47 100644 --- a/stubs/sympy-stubs/tensor/array/ndim_array.pyi +++ b/stubs/sympy-stubs/tensor/array/ndim_array.pyi @@ -1,5 +1,6 @@ from types import NotImplementedType -from typing import Any, Generator, Self +from typing import Any, Generator +from typing_extensions import Self from sympy import ImmutableDenseNDimArray, ImmutableSparseNDimArray from sympy.core.basic import Basic diff --git a/stubs/sympy-stubs/tensor/array/sparse_ndim_array.pyi b/stubs/sympy-stubs/tensor/array/sparse_ndim_array.pyi index a7b158b1..50550536 100644 --- a/stubs/sympy-stubs/tensor/array/sparse_ndim_array.pyi +++ b/stubs/sympy-stubs/tensor/array/sparse_ndim_array.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy import Indexed from sympy.matrices import SparseMatrix diff --git a/stubs/sympy-stubs/tensor/functions.pyi b/stubs/sympy-stubs/tensor/functions.pyi index d9f7e2df..3800fcb1 100644 --- a/stubs/sympy-stubs/tensor/functions.pyi +++ b/stubs/sympy-stubs/tensor/functions.pyi @@ -1,5 +1,5 @@ from functools import singledispatch -from typing import Self +from typing_extensions import Self from sympy import Mul from sympy.core.expr import Expr diff --git a/stubs/sympy-stubs/tensor/indexed.pyi b/stubs/sympy-stubs/tensor/indexed.pyi index 4228b471..b405032d 100644 --- a/stubs/sympy-stubs/tensor/indexed.pyi +++ b/stubs/sympy-stubs/tensor/indexed.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self, Tuple +from typing import Any +from typing_extensions import Self, Tuple from sympy import Basic, MatrixBase, NDimArray from sympy.core import Expr diff --git a/stubs/sympy-stubs/tensor/tensor.pyi b/stubs/sympy-stubs/tensor/tensor.pyi index 5e35a72d..8cb21406 100644 --- a/stubs/sympy-stubs/tensor/tensor.pyi +++ b/stubs/sympy-stubs/tensor/tensor.pyi @@ -1,6 +1,7 @@ from abc import ABC, abstractmethod from types import NotImplementedType -from typing import Any, Callable, Generator, Literal, LiteralString, Self +from typing import Any, Generator, Literal +from typing_extensions import LiteralString, Self from sympy import ImmutableDenseNDimArray, ImmutableSparseNDimArray, Indexed, MutableDenseNDimArray from sympy.combinatorics.permutations import Perm diff --git a/stubs/sympy-stubs/utilities/exceptions.pyi b/stubs/sympy-stubs/utilities/exceptions.pyi index 787f7ba1..6bd4f55e 100644 --- a/stubs/sympy-stubs/utilities/exceptions.pyi +++ b/stubs/sympy-stubs/utilities/exceptions.pyi @@ -1,5 +1,6 @@ import contextlib -from typing import Any, Callable, Generator, Self +from typing import Any, Callable, Generator +from typing_extensions import Self class SymPyDeprecationWarning(DeprecationWarning): def __init__(self, message, *, deprecated_since_version, active_deprecations_target) -> None: ... diff --git a/stubs/sympy-stubs/utilities/misc.pyi b/stubs/sympy-stubs/utilities/misc.pyi index 24ce606d..6fe1e4f9 100644 --- a/stubs/sympy-stubs/utilities/misc.pyi +++ b/stubs/sympy-stubs/utilities/misc.pyi @@ -1,4 +1,5 @@ -from typing import Any, Callable, LiteralString +from typing import Any, Callable +from typing_extensions import LiteralString class Undecidable(ValueError): ... diff --git a/stubs/sympy-stubs/vector/basisdependent.pyi b/stubs/sympy-stubs/vector/basisdependent.pyi index ad0c4603..780c0ce3 100644 --- a/stubs/sympy-stubs/vector/basisdependent.pyi +++ b/stubs/sympy-stubs/vector/basisdependent.pyi @@ -1,4 +1,5 @@ -from typing import TYPE_CHECKING, Any, Literal, Self +from typing import Any, Literal +from typing_extensions import Self from sympy.core import Add, Mul from sympy.core.decorators import _sympifyit, call_highest_priority @@ -6,9 +7,6 @@ from sympy.core.expr import Expr from sympy.series.order import Order from sympy.vector.vector import BaseVector -if TYPE_CHECKING: - ... - class BasisDependent(Expr): zero: BasisDependentZero @call_highest_priority("__radd__") diff --git a/stubs/sympy-stubs/vector/deloperator.pyi b/stubs/sympy-stubs/vector/deloperator.pyi index e0c2a9e6..56f61f64 100644 --- a/stubs/sympy-stubs/vector/deloperator.pyi +++ b/stubs/sympy-stubs/vector/deloperator.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core import Basic from sympy.core.add import Add diff --git a/stubs/sympy-stubs/vector/dyadic.pyi b/stubs/sympy-stubs/vector/dyadic.pyi index f7c04444..91e67ff5 100644 --- a/stubs/sympy-stubs/vector/dyadic.pyi +++ b/stubs/sympy-stubs/vector/dyadic.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core.expr import AtomicExpr from sympy.series.order import Order diff --git a/stubs/sympy-stubs/vector/implicitregion.pyi b/stubs/sympy-stubs/vector/implicitregion.pyi index 5457c81a..f3c98ba0 100644 --- a/stubs/sympy-stubs/vector/implicitregion.pyi +++ b/stubs/sympy-stubs/vector/implicitregion.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy import Complement, ConditionSet, FiniteSet, Intersection from sympy.core import Basic diff --git a/stubs/sympy-stubs/vector/integrals.pyi b/stubs/sympy-stubs/vector/integrals.pyi index e27b6d11..f78a1210 100644 --- a/stubs/sympy-stubs/vector/integrals.pyi +++ b/stubs/sympy-stubs/vector/integrals.pyi @@ -1,4 +1,5 @@ -from typing import Literal, Self +from typing import Literal +from typing_extensions import Self from sympy import Equality, Ne from sympy.core import Basic diff --git a/stubs/sympy-stubs/vector/operators.pyi b/stubs/sympy-stubs/vector/operators.pyi index 4a3db03a..2e847701 100644 --- a/stubs/sympy-stubs/vector/operators.pyi +++ b/stubs/sympy-stubs/vector/operators.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core.add import Add from sympy.core.expr import Expr diff --git a/stubs/sympy-stubs/vector/orienters.pyi b/stubs/sympy-stubs/vector/orienters.pyi index 893d8085..3708a4e0 100644 --- a/stubs/sympy-stubs/vector/orienters.pyi +++ b/stubs/sympy-stubs/vector/orienters.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.cache import cacheit diff --git a/stubs/sympy-stubs/vector/parametricregion.pyi b/stubs/sympy-stubs/vector/parametricregion.pyi index d7b6c144..ecacb8b5 100644 --- a/stubs/sympy-stubs/vector/parametricregion.pyi +++ b/stubs/sympy-stubs/vector/parametricregion.pyi @@ -1,5 +1,6 @@ from functools import singledispatch -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core import Basic from sympy.geometry import Curve, Ellipse, Point, Polygon, Segment diff --git a/stubs/sympy-stubs/vector/point.pyi b/stubs/sympy-stubs/vector/point.pyi index 6e18e886..bf01e1c9 100644 --- a/stubs/sympy-stubs/vector/point.pyi +++ b/stubs/sympy-stubs/vector/point.pyi @@ -1,4 +1,5 @@ -from typing import Any, Self +from typing import Any +from typing_extensions import Self from sympy.core.basic import Basic from sympy.core.cache import cacheit diff --git a/stubs/sympy-stubs/vector/scalar.pyi b/stubs/sympy-stubs/vector/scalar.pyi index 21a96c82..f69f65c4 100644 --- a/stubs/sympy-stubs/vector/scalar.pyi +++ b/stubs/sympy-stubs/vector/scalar.pyi @@ -1,4 +1,4 @@ -from typing import Self +from typing_extensions import Self from sympy.core import AtomicExpr diff --git a/stubs/sympy-stubs/vector/vector.pyi b/stubs/sympy-stubs/vector/vector.pyi index b6c665e7..b061f741 100644 --- a/stubs/sympy-stubs/vector/vector.pyi +++ b/stubs/sympy-stubs/vector/vector.pyi @@ -1,4 +1,5 @@ -from typing import Any, Callable, Literal, Self +from typing import Any, Callable, Literal +from typing_extensions import Self from sympy import ImmutableDenseMatrix, Pow from sympy.core.add import Add From cd8f8654c3e46a7f771afd044dd8eb48811696c1 Mon Sep 17 00:00:00 2001 From: Heejae Chang <1333179+heejaechang@users.noreply.github.com> Date: Wed, 8 May 2024 13:34:19 -0700 Subject: [PATCH 2/2] Added new parameter (#313) * added new parameter * format --- stubs/sklearn/preprocessing/_polynomial.pyi | 1 + 1 file changed, 1 insertion(+) diff --git a/stubs/sklearn/preprocessing/_polynomial.pyi b/stubs/sklearn/preprocessing/_polynomial.pyi index e6669e14..40fee5c5 100644 --- a/stubs/sklearn/preprocessing/_polynomial.pyi +++ b/stubs/sklearn/preprocessing/_polynomial.pyi @@ -67,6 +67,7 @@ class SplineTransformer(TransformerMixin, BaseEstimator): extrapolation: Literal["error", "constant", "linear", "continue", "periodic", "constant"] = "constant", include_bias: bool = True, order: Literal["C", "F", "C"] = "C", + sparse_output: bool = False, ) -> None: ... def get_feature_names_out(self, input_features: None | ArrayLike = None) -> ndarray: ... def fit(