Skip to content

Commit 7e72ed8

Browse files
authored
CI: use compiled nightly mypy (#787)
* clean * CI: use compiled nightly mypy * pre-commit
1 parent 2c92aa9 commit 7e72ed8

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ ci:
33
autofix_prs: false
44
repos:
55
- repo: https://github.com/python/black
6-
rev: 23.7.0
6+
rev: 23.9.1
77
hooks:
88
- id: black
99
- repo: https://github.com/PyCQA/isort
1010
rev: 5.12.0
1111
hooks:
1212
- id: isort
1313
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: v0.0.286
14+
rev: v0.0.291
1515
hooks:
1616
- id: ruff
1717
args: [

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ mypy = "1.5.1"
3939
pandas = "2.1.1"
4040
pyarrow = ">=10.0.1"
4141
pytest = ">=7.1.2"
42-
# pyright 1.1.327 has bug fixed in 1.1.328
43-
pyright = "1.1.326"
42+
# pyright 1.1.329 has bug fixed in 1.1.330
43+
pyright = "1.1.328"
4444
poethepoet = ">=0.16.5"
4545
loguru = ">=0.6.0"
4646
typing-extensions = ">=4.4.0"
@@ -62,7 +62,6 @@ jinja2 = ">=3.1"
6262
scipy = { version = ">=1.9.1", python = "<3.13" }
6363
SQLAlchemy = ">=2.0.12"
6464
types-python-dateutil = ">=2.8.19"
65-
numexpr = "<2.8.5" # https://github.com/pandas-dev/pandas/issues/54449
6665

6766
[build-system]
6867
requires = ["poetry-core>=1.0.0"]

scripts/test/run.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ def nightly_mypy():
119119
"pip",
120120
"install",
121121
"--upgrade",
122-
"git+https://github.com/python/mypy.git",
122+
"--find-links",
123+
"https://github.com/mypyc/mypy_mypyc-wheels/releases/",
124+
"mypy",
123125
]
124126
subprocess.run(cmd, check=True)
125127

tests/test_io.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ def test_xml():
118118

119119
def test_xml_str():
120120
with ensure_clean() as path:
121-
check(assert_type(DF.to_xml(), str), str)
122-
out: str = DF.to_xml()
121+
out = check(assert_type(DF.to_xml(), str), str)
123122
check(assert_type(read_xml(io.StringIO(out)), DataFrame), DataFrame)
124123

125124

@@ -136,9 +135,8 @@ def test_pickle():
136135
def test_pickle_file_handle():
137136
with ensure_clean() as path:
138137
check(assert_type(DF.to_pickle(path), None), type(None))
139-
file = open(path, "rb")
140-
check(assert_type(read_pickle(file), Any), DataFrame)
141-
file.close()
138+
with open(path, "rb") as file:
139+
check(assert_type(read_pickle(file), Any), DataFrame)
142140

143141

144142
def test_pickle_path():

0 commit comments

Comments
 (0)