Skip to content

Commit 5d0e1b5

Browse files
committed
Small fixes to re-enable a few PYI rules
1 parent 1fb1225 commit 5d0e1b5

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

pyproject.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,8 @@ ignore = [
5656

5757
# TODO: Investigate and fix or configure
5858
"PYI001",
59-
"PYI002",
60-
"PYI017",
6159
"PYI024",
62-
"PYI048",
6360
"PYI051", # Request for autofix: https://github.com/astral-sh/ruff/issues/14185
64-
"PYI052",
6561
]
6662
[tool.ruff.lint.per-file-ignores]
6763
"*.pyi" = [

stubs/sympy-stubs/codegen/ast.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ class FloatBaseType(Type):
147147
class FloatType(FloatBaseType):
148148
__slots__ = ...
149149
_fields = ...
150-
_construct_nexp = _construct_nmant = _construct_nbits = Integer
150+
_construct_nexp = Integer
151+
_construct_nmant = Integer
152+
_construct_nbits = Integer
151153
@property
152154
def max_exponent(self) -> Expr: ...
153155
@property

stubs/sympy-stubs/matrices/dense.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ class DenseMatrix(RepMatrix):
2121
class MutableDenseMatrix(DenseMatrix, MutableRepMatrix):
2222
def simplify(self, **kwargs) -> None: ...
2323

24-
Matrix = MutableMatrix = MutableDenseMatrix
24+
Matrix = MutableDenseMatrix
25+
MutableMatrix = MutableDenseMatrix
2526

2627
def list2numpy(l, dtype=...) -> NDArray[Any, Any]: ...
2728
def matrix2numpy(m, dtype=...) -> NDArray[Any, Any]: ...

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ from typing_extensions import Self
33
from sympy.polys.domains.domain import Domain
44

55
class SimpleDomain(Domain):
6-
is_Simple = True
6+
is_Simple: bool = True
77
def inject(self, *gens) -> Self: ...

stubs/sympy-stubs/polys/polymatrix.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ class MutablePolyDenseMatrix:
3939
def nullspace(self) -> list[Self]: ...
4040
def rank(self): ...
4141

42-
PolyMatrix = MutablePolyMatrix = MutablePolyDenseMatrix
42+
PolyMatrix = MutablePolyDenseMatrix
43+
MutablePolyMatrix = MutablePolyDenseMatrix

tests/run_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ def install_requirements(test_folder: Path):
1414
def run_pyright():
1515
print("\nRunning Pyright...")
1616
# https://github.com/RobertCraigie/pyright-python#keeping-pyright-and-pylance-in-sync
17-
del os.environ["PYRIGHT_PYTHON_FORCE_VERSION"]
17+
os.environ.pop("PYRIGHT_PYTHON_FORCE_VERSION", None)
1818
os.environ["PYRIGHT_PYTHON_PYLANCE_VERSION"] = "latest-prerelease"
1919
return subprocess.run((sys.executable, "-m", "pyright"))
2020

2121

2222
def run_mypy():
2323
print("\nRunning mypy...")
24-
return subprocess.run((sys.executable, "-m", "mypy"))
24+
return subprocess.run((sys.executable, "-m", "mypy", "."))
2525

2626

2727
def main():

0 commit comments

Comments
 (0)