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
Since ruff simplifies the expression to have a single parameter when the others are None, pre-commit checks with both Pyre and Ruff conflict, requiring an ugly workaround or disabling UP043.
The text was updated successfully, but these errors were encountered:
Thank you for the detailed report! Unfortunately, PEP 696(type parameter defaults) isn't currently supported by Pyre right now. This will likely have to wait until we complete some major architectural changes to our system.
Pyre Bug
Bug description
According to:
so that you should be able to do:
However, depending on whether
Generator
is imported fromcollections.abc
ortyping
, one of two different errors is given bypyre --strict check
:Generator[Variable[_YieldT_co], Variable[_SendT_contra], Variable[_ReturnT_co]]
but gotGenerator[None, typing.Any, typing.Any]
.Generator
expects 3 type parameters, received 1.Reproduction steps
See the failing and passing actions for the PRs in my minimal reproducible example repo: https://github.com/Iain-S/pyre_mre/pulls.
Expected behavior
I would not expect Pyre-check to complain as the definition for Generator in
typing.py
seems to be:which is explicit about the defaults.
Logs
pyre_rage.log
Additional context
Tested on CPython
3.13.1
.Since ruff simplifies the expression to have a single parameter when the others are
None
, pre-commit checks with both Pyre and Ruff conflict, requiring an ugly workaround or disabling UP043.The text was updated successfully, but these errors were encountered: