New GitHub issue #111085 from Gobot1234:<br>

<hr>

<pre>
# Bug report

### Bug description:

```py
    async def __aenter__(self) -> "Timeout":
        self._state = _State.ENTERED
        self._task = tasks.current_task()
        self._cancelling = self._task.cancelling()  # AttributeError
        if self._task is None:
            raise RuntimeError("Timeout should be used inside a task")
 self.reschedule(self._when)
        return self
```
Honestly I don't know how to get this to error but it's possible according to the types

### CPython versions tested on:

3.13, CPython main branch

### Operating systems tested on:

_No response_
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/111085">View on GitHub</a>
<p>Labels: type-bug</p>
<p>Assignee: </p>