sp_repo_review: false positive and false negative mypy checks
The MY101 and MY102 have been passing and failing (respectively) on the develop branch of PyBaMM, but it should be the other way.
Running sp_repo_review: https://learn.scientific-python.org/development/guides/repo-review/?repo=pybamm-team%2FPyBaMM&branch=develop
Actual mypy config: https://github.com/pybamm-team/PyBaMM/blob/94aa498176d0b6bb1186aa63bebd9c85f7b74bff/pyproject.toml#L272-L282
I noticed that running the develop version of sp_repo_review and repo_review does not give these false results. Please feel free to close this if this has been fixed but has not been released. Thanks!
Just started a new release. Could you see if it still persists?
Thank you! But, I still see the same results for some reason.
I'm not sure what's wrong with these checks in WebAssembly, but they aren't working correctly (only in WebAssembly).
Running them manually in the pyodide terminal seems fine.
Likewise, the MY102 failure on abravalheri/validate-pyproject looks like a false positive:
https://learn.scientific-python.org/development/guides/repo-review/?repo=abravalheri%2Fvalidate-pyproject&branch=main
validate-pyproject/pyproject.toml
Lines 10 to 19 in e1aa946
[tool.mypy]
show_traceback = true
strict = true
# Scaling back on some of the strictness for now
disallow_any_generics = false
disallow_subclassing_any = false
[[tool.mypy.overrides]]
module = ["fastjsonschema"]
ignore_missing_imports = true
I think I've finally made a little progress: I've seen this on a local repo. This shows no failures on boost-histogram (local branch with changes to make it pass):
uvx --with sp-repo-review[cli] repo-review .
But this shows MY102 failing:
uvx --with sp-repo-review[cli] --with validate-pyproject-schema-store[all] repo-review .
So there's some sort of interaction between checks going on here.
0.11.2 is out and this now produces a warning and then self-corrects! This fix is live on the WebAssembly version due to the fact it's a patch release.
https://github.com/abravalheri/validate-pyproject/issues/197 proposes fixing the warning.