Closed BenjaminBossan closed 1 month ago
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
TIL! How does this affect?
When you have code like:
def foo(x: list[str]):
pass
This normally requires Python 3.9+ or you need to use from typing import List
and use List[str]
. However, with the __future__
import, you can use the type annotation syntax from Python 3.9+ inside of Python 3.8.
Thanks for clarifying!
The file was missing the
from __future__ import annotations
part. As this code is only running nightly with GPU, the normal CI missed this omission. With this PR, nightly CI should be green again.When I tested it locally with GPU, I didn't check with Python 3.8, so this error did not occur. Once we stop supporting Python 3.8 very soon, this will also no longer be necessary, but we still need to fix it until then.