You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
**Pre-submission checklist**
- [ ] I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running `pip install -r requirements-dev.txt && pre-commit install`
- [ ] `pre-commit run`
Related to:
* #827
* #821
* #816
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`.
* https://docs.astral.sh/ruff/rules/non-pep604-annotation/#pyupgrade-up
On Python < 3.10 the source file ***must*** start with `from __future__ import annotations` to be able to use PEP 604 syntax.
Pull Request resolved: #832
Reviewed By: stroxler
Differential Revision: D56535593
Pulled By: migeed-z
fbshipit-source-id: 27b470c5cd16752615a16f1665a8366891e4bcc3
Have a look at the GitHub actions that run for any PR and most of them seem broken.
The text was updated successfully, but these errors were encountered: