Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix undefined name "Future" --> asyncio.Future #4230

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Oct 25, 2024

% 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  # Only needed for Python 3.8 which is now EOL.

Description

Fixes #(issue)

Test Code

# Test code for the review of this PR

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • I signed the CLA.
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing tests pass locally with my changes
  • I have made corresponding changes to the documentation (if applicable)

Screenshots (if applicable):

Additional details

% `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`
```
@CLAassistant
Copy link

CLAassistant commented Oct 25, 2024

CLA assistant check
All committers have signed the CLA.

@FeodorFitsner FeodorFitsner merged commit b8daab4 into flet-dev:main Oct 29, 2024
2 checks passed
@cclauss cclauss deleted the patch-1 branch October 29, 2024 17:20
pengwon added a commit to pengwon/flet that referenced this pull request Oct 30, 2024
* main: (31 commits)
  Migrate `colors` and `icons` variables to Enums (flet-dev#4180)
  feat: expose more properties in Controls (flet-dev#4105)
  feat!: Refactor `Badge` Control to a Dataclass; create new `Control.badge` property (flet-dev#4077)
  fix: clicking on `CupertinoContextMenuAction` doesn't close context menu (flet-dev#3948)
  fix dropdown `max_menu_height` (flet-dev#3974)
  Fix undefined name "Future" --> asyncio.Future (flet-dev#4230)
  wrap ListTile in material widget (flet-dev#4206)
  Update CONTRIBUTING.md (flet-dev#4208)
  TextField: suffix_icon, prefix_icon and icon can be Control or str (flet-dev#4173)
  feat!: enhance `Map` control (flet-dev#3994)
  skip running flutter doctor on windows if no_rich_output is True (flet-dev#4108)
  add --pyinstaller-build-args to pack cli command (flet-dev#4187)
  fix/feat: make `SearchBar`'s view height adjustable; add new properties (flet-dev#4039)
  fix: prevent button `style` from being modified in `before_update()` (flet-dev#4181)
  fix: disabling filled buttons is not visually respected (flet-dev#4090)
  when `label` is set, use `MainAxisSize.min` for the `Row` (flet-dev#3998)
  fix: `NavigationBarDestination.disabled` has no visual effect (flet-dev#4073)
  fix autofill in CupertinoTextField (flet-dev#4103)
  Linechart: jsonDecode tooltip before displaying (flet-dev#4069)
  fixed bgcolor, color and elevation (flet-dev#4126)
  ...
@bl1nch
Copy link
Contributor

bl1nch commented Oct 31, 2024

@FeodorFitsner @cclauss does it really should be asyncio.Future type? Maybe it shoud be concurrent.futures.Future instead because asyncio.run_coroutine_threadsafe return concurrent.futures.Future?
https://docs.python.org/3/library/asyncio-task.html#scheduling-from-other-threads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants