chore: type annotations - convert uses of Optional and some Union usage to union operator |#2971
chore: type annotations - convert uses of Optional and some Union usage to union operator |#2971edmondchuc merged 3 commits intomainfrom
Conversation
some w3c sparql10 tests now passing, but not sure how
|
@edmondchuc Something else to note, on the topic of |
|
I didn't run into any mypy errors. No runtime changes and no semantic changes to the codebase.
Yeah, that's fair. I definitely was tossing up between the two, but the python docs helped me over the line given that their official stance is to prefer the union operator now. For others reading this. From the python typing docs:
Keep in mind that
|
This PR is a follow-up to #2963. Largely, it updates usages of
typing.Optionalandtyping.Uniontype annotations to the more modern and preferred union operator|.Some other notes:
Summary of changes
Checklist
the same change.
./examples.so maintainers can fix minor issues and keep your PR up to date.