Closed pySilver closed 3 weeks ago
We support Optional
, as documented. The pipe syntax may or may not work, I did not attempt to support it at this time.
Also note that typing in this libray is a recent effort and we are making it better with every release, but it cannot be considered a completed effort at this time.
@miguelgrinberg yeah, pipe is not working at the moment. It's a pity because formatters like ruff use it when target python version is >=3.12
; I'd love to PR but at the moment I myself not very sophisticated with typing tooling (especially on the platform side).
So yeah, since it's a new thing it's totally fine that it does not work for every case.
Documents declaration works when
Optional
is used:however more recent syntax for Optional is different:
Errors: