Skip to content

Commit bc9b4c8

Browse files
committed
set mypy and pytest in .toml
1 parent c145710 commit bc9b4c8

File tree

4 files changed

+30
-26
lines changed

4 files changed

+30
-26
lines changed

examples/tutorials/plot_tuto_mcar.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,11 @@
376376

377377
# %%
378378
pklm_test = PKLMTest(random_state=rng, compute_partial_p_values=True)
379-
p_value, partial_p_values = pklm_test.test(df_nan)
379+
result = pklm_test.test(df_nan)
380+
if isinstance(result, tuple):
381+
p_value, partial_p_values = result
382+
else:
383+
p_value = result
380384
print(f"The p-value of the PKLM test is: {p_value:.2%}")
381385

382386
# %%

mypy.ini

Lines changed: 0 additions & 20 deletions
This file was deleted.

pyproject.toml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,32 @@ targets = ["qolmat"]
102102
[tool.mypy]
103103
pretty = true
104104
strict = false
105-
python_version = ">=3.8.1,<3.12"
105+
python_version = "3.10"
106106
ignore_missing_imports = true
107+
disable_error_code = ["union-attr"]
108+
exclude = "docs"
109+
110+
[[tool.mypy.overrides]]
111+
module = "sklearn.*"
112+
ignore_errors = true
113+
114+
[[tool.mypy.overrides]]
115+
module = "matplotlib.*"
116+
ignore_missing_imports = true
117+
118+
[[tool.mypy.overrides]]
119+
module = "numpy.*"
120+
ignore_missing_imports = true
121+
ignore_errors = true
122+
123+
[[tool.mypy.overrides]]
124+
module = "yaml"
125+
ignore_missing_imports = true
126+
127+
[tool.pytest.ini_options]
128+
addopts = "--cov=qolmat --doctest-glob=*.rst --doctest-modules"
129+
testpaths = ["tests"]
130+
norecursedirs = ["_build"]
107131

108132
[tool.ruff]
109133
line-length = 79

pytest.ini

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)