Skip to content

Commit fcc9695

Browse files
authored
Merge branch 'main' into mypy--fix-all-name-defined-and-import-not-found
2 parents 7aaf15b + faa98b5 commit fcc9695

File tree

6 files changed

+16
-15
lines changed

6 files changed

+16
-15
lines changed

stubs/sympy-stubs/polys/domains/algebraicfield.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AlgebraicField(Field, CharacteristicZero, SimpleDomain):
1515
has_assoc_Ring = ...
1616
has_assoc_Field = ...
1717
def __init__(self, dom, *ext, alias=...) -> None: ...
18-
def new(self, element) -> dtype: ...
18+
def new(self, element) -> ANP: ...
1919
def __hash__(self) -> int: ...
2020
def __eq__(self, other) -> bool: ...
2121
def algebraic_field(self, *extension, alias=...) -> Any: ...
@@ -40,7 +40,7 @@ class AlgebraicField(Field, CharacteristicZero, SimpleDomain):
4040
def from_GaussianIntegerRing(K1, a, K0): ...
4141
def from_GaussianRationalField(K1, a, K0): ...
4242
def maximal_order(self) -> Any | None: ...
43-
def integral_basis(self, fmt=...) -> list[Any | Order] | list[Any] | list[dtype]: ...
43+
def integral_basis(self, fmt=...) -> list[Any | Order] | list[Any] | list[ANP]: ...
4444
def discriminant(self) -> Any | None: ...
4545
def primes_above(self, p) -> Any: ...
4646
def galois_group(self, by_name=..., max_tries=..., randomize=...) -> Any: ...

stubs/sympy-stubs/polys/domains/expressiondomain.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class ExpressionDomain(Field, CharacteristicZero, SimpleDomain):
4747
has_assoc_Field = ...
4848
def __init__(self) -> None: ...
4949
def to_sympy(self, a): ...
50-
def from_sympy(self, a) -> dtype: ...
50+
def from_sympy(self, a) -> Expression: ...
5151
def from_ZZ(K1, a, K0): ...
5252
def from_ZZ_python(K1, a, K0): ...
5353
def from_QQ(K1, a, K0): ...

stubs/sympy-stubs/polys/domains/integerring.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ class IntegerRing(Ring, CharacteristicZero, SimpleDomain): # type: ignore
1111
rep = ...
1212
alias = ...
1313
dtype = MPZ
14-
zero = dtype(0)
15-
one = dtype(1)
16-
tp: type[dtype]
14+
zero = MPZ(0)
15+
one = MPZ(1)
16+
tp: type
1717
is_ZZ = ...
1818
is_Numerical = ...
1919
is_PID = ...
@@ -25,7 +25,7 @@ class IntegerRing(Ring, CharacteristicZero, SimpleDomain): # type: ignore
2525
def get_field(self) -> Any: ...
2626
def algebraic_field(self, *extension, alias=...) -> Any: ...
2727
def from_AlgebraicField(K1, a, K0) -> None: ...
28-
def log(self, a, b) -> dtype: ...
28+
def log(self, a, b): ...
2929
def from_FF(K1, a, K0) -> int: ...
3030
def from_FF_python(K1, a, K0) -> int: ...
3131
def from_ZZ(K1, a, K0) -> int: ...

stubs/sympy-stubs/polys/domains/old_fractionfield.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class FractionField(Field, CharacteristicZero, CompositeDomain):
1111
has_assoc_Ring = ...
1212
has_assoc_Field = ...
1313
def __init__(self, dom, *gens) -> None: ...
14-
def new(self, element) -> dtype: ...
14+
def new(self, element) -> DMF: ...
1515
def __hash__(self) -> int: ...
1616
def __eq__(self, other) -> bool: ...
1717
def to_sympy(self, a): ...
@@ -33,4 +33,4 @@ class FractionField(Field, CharacteristicZero, CompositeDomain):
3333
def is_nonnegative(self, a): ...
3434
def numer(self, a): ...
3535
def denom(self, a): ...
36-
def factorial(self, a) -> dtype: ...
36+
def factorial(self, a) -> DMF: ...

stubs/sympy-stubs/polys/domains/old_polynomialring.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class GlobalPolynomialRing(PolynomialRingBase):
5050

5151
class GeneralizedPolynomialRing(PolynomialRingBase):
5252
dtype = DMF
53-
def new(self, a) -> dtype: ...
53+
def new(self, a) -> DMF: ...
5454
def __contains__(self, a) -> Literal[False]: ...
5555
def from_FractionField(K1, a, K0): ...
5656
def to_sympy(self, a): ...

stubs/sympy-stubs/polys/domains/rationalfield.pyi

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from _typeshed import Incomplete
12
from types import NotImplementedType
23
from typing import Any
34
from typing_extensions import Self
@@ -17,9 +18,9 @@ class RationalField(Field, CharacteristicZero, SimpleDomain):
1718
has_assoc_Ring = ...
1819
has_assoc_Field = ...
1920
dtype = MPQ
20-
zero = dtype(0)
21-
one = dtype(1)
22-
tp: type[dtype]
21+
zero = MPQ(0)
22+
one = MPQ(1)
23+
tp: type
2324
def __init__(self) -> None: ...
2425
def get_ring(self) -> Any: ...
2526
def to_sympy(self, a) -> Rational | Integer: ...
@@ -36,8 +37,8 @@ class RationalField(Field, CharacteristicZero, SimpleDomain):
3637
def from_RealField(K1, a, K0) -> PythonMPQ: ...
3738
def exquo(self, a, b) -> NotImplementedType | Self: ...
3839
def quo(self, a, b) -> NotImplementedType | Self: ...
39-
def rem(self, a, b) -> dtype: ...
40-
def div(self, a, b) -> tuple[NotImplementedType | Self, dtype]: ...
40+
def rem(self, a, b): ...
41+
def div(self, a, b) -> tuple[NotImplementedType | Self, Incomplete]: ...
4142
def numer(self, a): ...
4243
def denom(self, a): ...
4344

0 commit comments

Comments
 (0)