Merged
Conversation
Contributor
There was a problem hiding this comment.
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_withmethods tocopyacross 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 |
Deploying flet-docs with
|
| 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 |
FeodorFitsner
approved these changes
Aug 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Unify the object replication API by renaming
copy_withmethods tocopyacross the SDK’s control and value classes, update__all__exports to reflect the renaming, and adjust docstrings for improved formatting and link consistency.Enhancements:
copy_withtocopymethods across various control, geometry, painting, border, button, transform, duration, border_radius, animation, text_style, and alignment classes__all__lists and import orders to include renamed methods and maintain export consistency