Skip to content

Conversation

@ndonkoHenri
Copy link
Contributor

@ndonkoHenri ndonkoHenri commented Aug 10, 2025

Summary by Sourcery

Unify the object replication API by renaming copy_with methods to copy across the SDK’s control and value classes, update __all__ exports to reflect the renaming, and adjust docstrings for improved formatting and link consistency.

Enhancements:

  • Rename copy_with to copy methods across various control, geometry, painting, border, button, transform, duration, border_radius, animation, text_style, and alignment classes
  • Update __all__ lists and import orders to include renamed methods and maintain export consistency
  • Refactor docstrings and line breaks for better formatting and consistent hyperlink usage

@ndonkoHenri ndonkoHenri requested a review from Copilot August 10, 2025 14:06
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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR unifies the object replication API across the Flet SDK by renaming copy_with methods to copy throughout various control, geometry, painting, border, button, transform, duration, border_radius, animation, text_style, and alignment classes. This change creates a more consistent method naming pattern for creating modified copies of objects.

  • Renamed copy_with methods to copy across multiple classes for API consistency
  • Updated __all__ exports to reflect alphabetical ordering and maintain proper module exports
  • Improved docstring formatting and hyperlink consistency

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
alignment.py Renamed copy_with to copy in Alignment class
animation.py Renamed copy_with to copy in Animation and AnimationStyle classes
border.py Renamed copy_with to copy in Border and BorderSide classes, updated docstrings
border_radius.py Renamed copy_with to copy in BorderRadius class, updated docstring
box.py Renamed copy_with to copy in multiple classes (ColorFilter, BoxShadow, DecorationImage, BoxDecoration, BoxConstraints), reordered __all__ exports
buttons.py Renamed copy_with to copy in all border classes and ButtonStyle, reordered __all__ exports
duration.py Renamed copy_with to copy in Duration class, reordered __all__ exports
geometry.py Renamed copy_with to copy in Size and Rect classes, removed duplicate copy method, reordered __all__ exports
elevated_button.py Updated method call from copy_with to copy
painting.py Renamed copy_with to copy in gradient and Paint classes, improved docstring formatting
text_style.py Renamed copy_with to copy in TextStyle and StrutStyle classes
transform.py Renamed copy_with to copy in Scale, Rotate, and Offset classes, reordered __all__ exports

@cloudflare-workers-and-pages
Copy link

Deploying flet-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: af71be3
Status: ✅  Deploy successful!
Preview URL: https://b61684d8.flet-docs.pages.dev
Branch Preview URL: https://v1-rename-copy-with.flet-docs.pages.dev

View logs

@FeodorFitsner FeodorFitsner merged commit c608fd9 into main Aug 10, 2025
4 checks passed
@ndonkoHenri ndonkoHenri deleted the v1-rename-copy-with branch August 15, 2025 14:08
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