Modernised the type annotations used in the targ
codebase (e.g. using list[str]
instead of List[str]
). This is possible because we no longer support Python 3.8. Thanks to @sinisaos for this.
Added support for the new union syntax (e.g. str | None
). So targ now works with both of these:
def say_hello(name: Optional[str] = None):
print(f'Hello {name}' if name else 'Hello')
def say_hello(name: str | None = None):
print(f'Hello {name}' if name else 'Hello')