Zac-HD / shed

`shed` canonicalises Python code. Shed your legacy, stop bikeshedding, and move on. Black++
https://pypi.org/project/shed/
GNU Affero General Public License v3.0
342 stars 23 forks source link

Recording the new Union operator for annotation to make None Last #39

Closed Cheukting closed 2 years ago

Cheukting commented 2 years ago

Recording the new Union operator for annotation to make None Last

see task in #22

Zac-HD commented 2 years ago

🎉🎉🎉

I think we'll only want to do this inside annotations, since the | operator might be used in other ways too.

Cheukting commented 2 years ago

🎉🎉🎉

I think we'll only want to do this inside annotations, since the | operator might be used in other ways too.

sure, next step

Zac-HD commented 2 years ago

Looks great! Add a test for arg: int | None | str | float? Once that's handled, I'll merge and make a new release 🚀

Cheukting commented 2 years ago

Looks great! Add a test for arg: int | None | str | float? Once that's handled, I'll merge and make a new release 🚀

I just added the 3 or more version and it works on something like var: bool | None | int | str (see the test file)