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

Enable more mypy optional error codes and bump mypy to 0.960 #376

Merged
merged 6 commits into from
May 26, 2022

Conversation

mkniewallner
Copy link
Member

@mkniewallner mkniewallner commented May 26, 2022

  • Added tests for changed code. Not applicable
  • Updated documentation for changed code. Not applicable

Similarly to python-poetry/poetry#5665, enable truthy-bool and redudant-expr.
Also update mypy to 0.960.

Note: I also needed to update the tests CI workflow to use PyPy 3.8 instead of PyPy 3.7, which is what we used to have in the past. See comments for the details.

@mkniewallner
Copy link
Member Author

It looks like PyPy 3.7 has troubles installing typed-ast.

It seems to only fail on this pull request because we are updating dependencies here, which invalidates the cache.
Potentially, any PR updating dependencies may end up with failing PyPy tests.

Will try to bump typed-ast to see if it fixes the problem.

@sonarcloud
Copy link

sonarcloud bot commented May 26, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mkniewallner
Copy link
Member Author

I was wondering why tests on PyPy were not failing in the past, and it looks like I wrongly assumed that we used to use PyPy 3.7 when updating the CI workflow in #364.

Looking at an old CI workflow from a PR that also invalidated the cache, we can clearly see that PyPy 3.8 was used when using pypy3, and not PyPy 3.7: https://github.com/python-poetry/poetry-core/runs/6537883827?check_suite_focus=true

Using python3.8 (3.8.10)

Since typed-ast is only required through mypy for Python < 3.8, going back to using PyPy 3.8 make it not try to install the package, which makes the dependencies installation go through.
Sorry for not seeing that in the other PR that updated the CI workflows.

"Required" checks will need to be updated to require pypy-3.8 instead of pypy-3.7.

@mkniewallner mkniewallner marked this pull request as ready for review May 26, 2022 14:17
@abn abn merged commit 6b45d6c into python-poetry:main May 26, 2022
@mkniewallner mkniewallner deleted the more-mypy-optional-error-codes branch May 26, 2022 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants