Skip to content

Fix pyright 1.1.400 reportInvalidTypeForm issues #367

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stubs/sympy-stubs/polys/domains/algebraicfield.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AlgebraicField(Field, CharacteristicZero, SimpleDomain):
has_assoc_Ring = ...
has_assoc_Field = ...
def __init__(self, dom, *ext, alias=...) -> None: ...
def new(self, element) -> dtype: ...
def new(self, element) -> ANP: ...
def __hash__(self) -> int: ...
def __eq__(self, other) -> bool: ...
def algebraic_field(self, *extension, alias=...) -> Any: ...
Expand All @@ -40,7 +40,7 @@ class AlgebraicField(Field, CharacteristicZero, SimpleDomain):
def from_GaussianIntegerRing(K1, a, K0): ...
def from_GaussianRationalField(K1, a, K0): ...
def maximal_order(self) -> Any | None: ...
def integral_basis(self, fmt=...) -> list[Any | Order] | list[Any] | list[dtype]: ...
def integral_basis(self, fmt=...) -> list[Any | Order] | list[Any] | list[ANP]: ...
def discriminant(self) -> Any | None: ...
def primes_above(self, p) -> Any: ...
def galois_group(self, by_name=..., max_tries=..., randomize=...) -> Any: ...
2 changes: 1 addition & 1 deletion stubs/sympy-stubs/polys/domains/expressiondomain.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ExpressionDomain(Field, CharacteristicZero, SimpleDomain):
has_assoc_Field = ...
def __init__(self) -> None: ...
def to_sympy(self, a): ...
def from_sympy(self, a) -> dtype: ...
def from_sympy(self, a) -> Expression: ...
def from_ZZ(K1, a, K0): ...
def from_ZZ_python(K1, a, K0): ...
def from_QQ(K1, a, K0): ...
Expand Down
8 changes: 4 additions & 4 deletions stubs/sympy-stubs/polys/domains/integerring.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ class IntegerRing(Ring, CharacteristicZero, SimpleDomain): # type: ignore
rep = ...
alias = ...
dtype = MPZ
zero = dtype(0)
one = dtype(1)
tp: type[dtype]
zero = MPZ(0)
one = MPZ(1)
tp: type
is_ZZ = ...
is_Numerical = ...
is_PID = ...
Expand All @@ -25,7 +25,7 @@ class IntegerRing(Ring, CharacteristicZero, SimpleDomain): # type: ignore
def get_field(self) -> Any: ...
def algebraic_field(self, *extension, alias=...) -> Any: ...
def from_AlgebraicField(K1, a, K0) -> None: ...
def log(self, a, b) -> dtype: ...
def log(self, a, b): ...
def from_FF(K1, a, K0) -> int: ...
def from_FF_python(K1, a, K0) -> int: ...
def from_ZZ(K1, a, K0) -> int: ...
Expand Down
4 changes: 2 additions & 2 deletions stubs/sympy-stubs/polys/domains/old_fractionfield.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FractionField(Field, CharacteristicZero, CompositeDomain):
has_assoc_Ring = ...
has_assoc_Field = ...
def __init__(self, dom, *gens) -> None: ...
def new(self, element) -> dtype: ...
def new(self, element) -> DMF: ...
def __hash__(self) -> int: ...
def __eq__(self, other) -> bool: ...
def to_sympy(self, a): ...
Expand All @@ -33,4 +33,4 @@ class FractionField(Field, CharacteristicZero, CompositeDomain):
def is_nonnegative(self, a): ...
def numer(self, a): ...
def denom(self, a): ...
def factorial(self, a) -> dtype: ...
def factorial(self, a) -> DMF: ...
2 changes: 1 addition & 1 deletion stubs/sympy-stubs/polys/domains/old_polynomialring.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class GlobalPolynomialRing(PolynomialRingBase):

class GeneralizedPolynomialRing(PolynomialRingBase):
dtype = DMF
def new(self, a) -> dtype: ...
def new(self, a) -> DMF: ...
def __contains__(self, a) -> Literal[False]: ...
def from_FractionField(K1, a, K0): ...
def to_sympy(self, a): ...
Expand Down
11 changes: 6 additions & 5 deletions stubs/sympy-stubs/polys/domains/rationalfield.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from _typeshed import Incomplete
from types import NotImplementedType
from typing import Any
from typing_extensions import Self
Expand All @@ -17,9 +18,9 @@ class RationalField(Field, CharacteristicZero, SimpleDomain):
has_assoc_Ring = ...
has_assoc_Field = ...
dtype = MPQ
zero = dtype(0)
one = dtype(1)
tp: type[dtype]
zero = MPQ(0)
one = MPQ(1)
tp: type
def __init__(self) -> None: ...
def get_ring(self) -> Any: ...
def to_sympy(self, a) -> Rational | Integer: ...
Expand All @@ -36,8 +37,8 @@ class RationalField(Field, CharacteristicZero, SimpleDomain):
def from_RealField(K1, a, K0) -> PythonMPQ: ...
def exquo(self, a, b) -> NotImplementedType | Self: ...
def quo(self, a, b) -> NotImplementedType | Self: ...
def rem(self, a, b) -> dtype: ...
def div(self, a, b) -> tuple[NotImplementedType | Self, dtype]: ...
def rem(self, a, b): ...
def div(self, a, b) -> tuple[NotImplementedType | Self, Incomplete]: ...
def numer(self, a): ...
def denom(self, a): ...

Expand Down