Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sp_repo_review: false positive and false negative mypy checks #386

Closed
Saransh-cpp opened this issue Feb 29, 2024 · 7 comments · Fixed by scientific-python/repo-review#243

Comments

@Saransh-cpp
Copy link
Contributor

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!

@henryiii
Copy link
Collaborator

Just started a new release. Could you see if it still persists?

@Saransh-cpp
Copy link
Contributor Author

Thank you! But, I still see the same results for some reason.

@henryiii
Copy link
Collaborator

henryiii commented May 4, 2024

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.

@DimitriPapadopoulos
Copy link
Contributor

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

@henryiii
Copy link
Collaborator

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.

@henryiii
Copy link
Collaborator

henryiii commented Aug 24, 2024

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.

@henryiii
Copy link
Collaborator

abravalheri/validate-pyproject#197 proposes fixing the warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants