Skip to content

Commit

Permalink
CI: use compiled nightly mypy (#787)
Browse files Browse the repository at this point in the history
* clean

* CI: use compiled nightly mypy

* pre-commit
  • Loading branch information
twoertwein authored Oct 2, 2023
1 parent 2c92aa9 commit 7e72ed8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ ci:
autofix_prs: false
repos:
- repo: https://github.com/python/black
rev: 23.7.0
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.286
rev: v0.0.291
hooks:
- id: ruff
args: [
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ mypy = "1.5.1"
pandas = "2.1.1"
pyarrow = ">=10.0.1"
pytest = ">=7.1.2"
# pyright 1.1.327 has bug fixed in 1.1.328
pyright = "1.1.326"
# pyright 1.1.329 has bug fixed in 1.1.330
pyright = "1.1.328"
poethepoet = ">=0.16.5"
loguru = ">=0.6.0"
typing-extensions = ">=4.4.0"
Expand All @@ -62,7 +62,6 @@ jinja2 = ">=3.1"
scipy = { version = ">=1.9.1", python = "<3.13" }
SQLAlchemy = ">=2.0.12"
types-python-dateutil = ">=2.8.19"
numexpr = "<2.8.5" # https://github.com/pandas-dev/pandas/issues/54449

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
4 changes: 3 additions & 1 deletion scripts/test/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ def nightly_mypy():
"pip",
"install",
"--upgrade",
"git+https://github.com/python/mypy.git",
"--find-links",
"https://github.com/mypyc/mypy_mypyc-wheels/releases/",
"mypy",
]
subprocess.run(cmd, check=True)

Expand Down
8 changes: 3 additions & 5 deletions tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ def test_xml():

def test_xml_str():
with ensure_clean() as path:
check(assert_type(DF.to_xml(), str), str)
out: str = DF.to_xml()
out = check(assert_type(DF.to_xml(), str), str)
check(assert_type(read_xml(io.StringIO(out)), DataFrame), DataFrame)


Expand All @@ -136,9 +135,8 @@ def test_pickle():
def test_pickle_file_handle():
with ensure_clean() as path:
check(assert_type(DF.to_pickle(path), None), type(None))
file = open(path, "rb")
check(assert_type(read_pickle(file), Any), DataFrame)
file.close()
with open(path, "rb") as file:
check(assert_type(read_pickle(file), Any), DataFrame)


def test_pickle_path():
Expand Down

0 comments on commit 7e72ed8

Please sign in to comment.