Skip to content

Change the type alias from a class to a real rename #5258

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

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

HenningCode
Copy link
Contributor

@HenningCode HenningCode commented Apr 29, 2025

Description

Type hints would fail if the DropdownOptions were set from a function. With this the linter can work as expected with the type.

Test Code

# Test code for the review of this PR

Type of change

  • [x ] 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)

Summary by Sourcery

Simplify the DropdownOption type alias by directly renaming it to Option to improve type hinting and linter compatibility

Bug Fixes:

  • Fixed type hinting issues with DropdownOptions when set from a function

Enhancements:

  • Simplified type alias definition for DropdownOption

@CLAassistant
Copy link

CLAassistant commented Apr 29, 2025

CLA assistant check
All committers have signed the CLA.

@FeodorFitsner FeodorFitsner merged commit 2a1facb into flet-dev:main Jun 12, 2025
2 checks passed
FeodorFitsner added a commit that referenced this pull request Jun 19, 2025
commit 2a1facb
Author: Henning Wilmer <[email protected]>
Date:   Thu Jun 12 18:37:58 2025 +0200

    Change the type alias from a class to a real rename (#5258)

commit 8f83b45
Author: PythonPan <[email protected]>
Date:   Fri Jun 13 00:29:49 2025 +0800

    Fix  page.run_thread does not receive kwargs (#5318) (#5320)

commit bf09a2c
Author: Antón Fernández Pérez <[email protected]>
Date:   Wed Jun 11 21:16:41 2025 +0200

    Update remove_control_payload.dart (#5353)

    Android apk app randomly generates this error in logcat:

    E  [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: type 'Null' is not a subtype of type 'String'
                                                                                                        #0      new List.from (dart:core-patch/array_patch.dart:30)
                                                                                                        #1      new RemoveControlPayload.fromJson (package:flet/src/protocol/remove_control_payload.dart:7)
                                                                                                        #2      appReducer (package:flet/src/reducers.dart:376)
                                                                                                        #3      Store._createReduceAndNotify.<anonymous closure> (package:redux/src/store.dart:235)
                                                                                                        #4      Store.dispatch (package:redux/src/store.dart:267)
                                                                                                        #5      FletServer._onMessage (package:flet/src/flet_server.dart:265)
                                                                                                        #6      FletTcpSocketServerProtocol._onMessage (package:flet/src/flet_server_protocol_tcp_socket.dart:125)
                                                                                                        #7      FletTcpSocketServerProtocol.connect.<anonymous closure> (package:flet/src/flet_server_protocol_tcp_socket.dart:94)
                                                                                                        #8      _RootZone.runUnaryGuarded (dart:async/zone.dart:1778)
                                                                                                        #9      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381)
                                                                                                        #10     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:312)
                                                                                                        #11     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:798)
                                                                                                        #12     _StreamController._add (dart:async/stream_controller.dart:663)
                                                                                                        #13     _StreamController.add (dart:async/stream_controller.dart:618)
                                                                                                        #14     _Socket._onData (dart:io-patch/socket_patch.dart:2904)
                                                                                                        #15     _RootZone.runUnaryGuarded (dart:async/zone.dart:1778)
                                                                                                        #16     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381)
                                                                                                        #17     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:312)
                                                                                                        #18     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:798)
                                                                                                        #19     _StreamController._add (dart:async/stream_controller.dart:663)
                                                                                                        #20     _StreamController.add (dart:async/stream_controller.dart:618)
                                                                                                        #21     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:2323)
                                                                                                        #22     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1646)
                                                                                                        #23     _microtaskLoop (dart:async/schedule_microtask.dart:40)
                                                                                                        #24     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)

commit 1c040ef
Author: Feodor Fitsner <[email protected]>
Date:   Sun May 18 20:13:06 2025 -0400

    Preparing Flet v0.28.3 release (#5306)

    * Fix images displaying in web mode with non-empty page name

    Fix #5198

    * Fix page.on_view_pop event handling

    Fix #5302

    * Fix FilePicker.save_file() for Android and iOS

    Fix #5301

    * PubSub: allow multiple subscribers per session, per topic

    Close #5303

    * Bump version to 0.28.3, updated changelog

commit 69e4e10
Author: Feodor Fitsner <[email protected]>
Date:   Sat May 10 13:49:30 2025 -0700

    Prepare Flet 0.28.2 (#5295)

    * Added missing imports into `__init__.py`

    * Changelog, bumped version to 0.28.2

    * fix WindowDragArea

    * update code in readme

    * Upated changelog

    ---------

    Co-authored-by: ndonkoHenri <[email protected]>

commit 7ce8e48
Author: Feodor Fitsner <[email protected]>
Date:   Thu May 8 12:38:37 2025 -0700

    Update .appveyor.yml

commit deb38c7
Author: Feodor Fitsner <[email protected]>
Date:   Thu May 8 09:11:14 2025 -0700

    v0.28.0 release notes (#5286)

    * v0.28.0 release notes

    * Fix "Fixed:"

commit fcc712f
Author: Feodor Fitsner <[email protected]>
Date:   Wed May 7 10:29:03 2025 -0700

    `View.can_pop` and `View.on_confirm_pop` (#5284)

    * View.can_pop and View.on_confirm_pop

    * Dismissible and View: added 5 minutes timeout for confirm callbacks

commit c3d550a
Author: Owen McDonnell <[email protected]>
Date:   Sat May 3 16:41:10 2025 -0700

    Update CONTRIBUTING.md (#5268)

    note about activating .zprofile variables.

commit f4b83ae
Author: bl1nch <[email protected]>
Date:   Tue Apr 29 07:31:08 2025 +0600

    UTF-8 encoding for pyproject.toml (#5203)

commit e3f4d16
Author: Feodor Fitsner <[email protected]>
Date:   Fri Apr 4 17:17:48 2025 -0700

    Update reorderable_list_view.dart

commit add9c61
Author: TheEthicalBoy <[email protected]>
Date:   Sat Apr 5 02:10:23 2025 +0200

    feat: custom `ReorderableListView` drag handle listeners (#5051)

    * initial commit

    * `ReorderableListView`: mouse_cursor, show_default_drag_handles

    * generated files

    * flutter 3.29.0

commit 440009d
Author: TheEthicalBoy <[email protected]>
Date:   Sat Apr 5 02:04:32 2025 +0200

    feat: expose events (`on_double_tap`, `on_pan_start`) in `WindowDragArea` (#5043)

    * improve events typing in gesture_detector.py

    * window.start_dragging

    * delete window_drag_area.dart

    * rework WindowDragArea inheriting from GestureDetector

    * export more utils
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.

3 participants