Skip to content

Commit

Permalink
Fix undefined name "Future" --> asyncio.Future (#4230)
Browse files Browse the repository at this point in the history
* Fix undefined name "Future" --> asyncio.Future

% `ruff check --output-format=github --select=E9,F63,F7,F82 --target-version=py39`
```
Error: sdk/python/packages/flet-core/src/flet_core/page.py:926:11: F821 Undefined name `Future`
```

* from __future__ import annotations
  • Loading branch information
cclauss authored Oct 29, 2024
1 parent cc3b29e commit b8daab4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdk/python/packages/flet-core/src/flet_core/page.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import asyncio
import json
import logging
Expand Down Expand Up @@ -926,7 +928,7 @@ def run_task(
handler: Callable[InputT, Awaitable[RetT]],
*args: InputT.args,
**kwargs: InputT.kwargs,
) -> "Future[RetT]":
) -> asyncio.Future[RetT]:
_session_page.set(self)
assert asyncio.iscoroutinefunction(handler)

Expand Down

0 comments on commit b8daab4

Please sign in to comment.