Skip to content

Conversation

@InesaFitsner
Copy link
Contributor

@InesaFitsner InesaFitsner commented Dec 2, 2025

Description

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

Additional details

Summary by Sourcery

Refresh the Python ToDo tutorial and example app to use the latest Flet control patterns and shared code snippets.

Bug Fixes:

  • Align tutorial code with the actual runnable examples, including the correct entry point (flet.run) and final todo.py location.

Enhancements:

  • Refactor ToDo example components to use the @ft.control pattern, init lifecycle, and typed callback properties for better composability and reuse.

Documentation:

  • Update the ToDo tutorial text, links, and code snippets to reference shared example files and current Flet requirements.

InesaFitsner and others added 9 commits December 1, 2025 09:06
Replaces deprecated flet.app with flet.run in step_1.py and updates step_3.py to use the @ft.control decorator and init method for the TodoApp class. These changes align the examples with the latest Flet API.
Updated Task and TodoApp classes to use the @ft.control decorator and dataclass-style field definitions. Replaced __init__ methods with init methods and adjusted event handler wiring to match the new structure. Commented out unused code related to task deletion for future implementation.
Replaces the 'task_delete' event handler with 'on_task_delete' using a Callable type for improved clarity and type safety. Updates references and wiring to use the new handler in the Task and TodoApp classes.
Refactored Task and TodoApp classes to use the @ft.control decorator and dataclass-style field definitions. Updated event handler wiring to use named parameters and default lambdas. This improves code clarity and leverages Flet's control system for better maintainability.
Combined sentences and removed unnecessary line breaks in the To-Do app tutorial for improved readability. Updated the referenced code line count from 172 to 163 to reflect the current example.
Updated the ToDo tutorial to reference example code files using --8<-- includes instead of embedding code directly. Improved formatting, clarified instructions, and streamlined explanations for better readability and maintainability.
Refactored the filtering section in the To-Do app tutorial to clarify the use of Tabs and TabBar controls, update code examples for task creation and status change, and improve explanations for filtering tasks by status. Also fixed minor formatting and wording for better readability.
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've reviewed this pull request using the Sourcery rules engine

@cloudflare-workers-and-pages
Copy link

Deploying flet-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 62322d3
Status: ✅  Deploy successful!
Preview URL: https://21f2155b.flet-docs.pages.dev
Branch Preview URL: https://inesa-update-todo-tutorial.flet-docs.pages.dev

View logs

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