Type annotation is annoying to write but super useful, and the bar character is a great way to represent union types. However, it was introduced in 3.10, and we probably need to retain backwards compatibility with at least 3.9 for another couple years (see https://devguide.python.org/versions/). Thus, we should unfortunately go back and revert these annotations to their optional/union equivalents.
Type annotation is annoying to write but super useful, and the bar character is a great way to represent union types. However, it was introduced in 3.10, and we probably need to retain backwards compatibility with at least 3.9 for another couple years (see https://devguide.python.org/versions/). Thus, we should unfortunately go back and revert these annotations to their optional/union equivalents.