facebook / pyre-check

Performant type-checking for python.
https://pyre-check.org/
MIT License
6.8k stars 434 forks source link

Run GitHub Actions tests on current versions of Python #832

Closed cclauss closed 4 months ago

cclauss commented 4 months ago

Pre-submission checklist

Summary

Related to:

PEP 604 – Allow writing union types as X | Y -- https://peps.python.org/pep-0604

   File "/home/runner/work/pyre-check/pyre-check/client/language_server/protocol.py", line 365, in Diagnostic
    code: Optional[int | str] = None
TypeError: unsupported operand type(s) for |: 'type' and 'type'

On Python < 3.10 the tests are failing on PEP 604 type annotations which will be enforced by ruff rule UP007.

On Python < 3.10 the source file must start with from __future__ import annotations to be able to use PEP 604 syntax.

Test Plan

facebook-github-bot commented 4 months ago

@migeed-z has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

cclauss commented 4 months ago

Perhaps PyPy should be moved to a separate pull request because that GitHub Action test has been running for 3+ hours.

facebook-github-bot commented 4 months ago

@migeed-z has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 4 months ago

@migeed-z merged this pull request in facebook/pyre-check@714c268e940efe827c790a0eb81ef983643b3887.

cclauss commented 4 months ago

Generated: