Skip to content

Commit b0359ff

Browse files
committed
Remove duplicate and redundant code in Flet package
Eliminated a duplicate line in the ShareFile documentation, removed a repeated entry for 'BrowserConfiguration' in __all__, and simplified the ServiceRegistry default_factory in Page control. These changes improve code clarity and maintainability.
1 parent 6af6b59 commit b0359ff

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
{{ class_all_options("flet.ShareFile", separate_signature=False) }}
2-
{{ class_all_options("flet.ShareFile", separate_signature=False) }}

sdk/python/packages/flet/src/flet/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,6 @@
643643
"BoxShape",
644644
"Brightness",
645645
"BrowserConfiguration",
646-
"BrowserConfiguration",
647646
"BrowserContextMenu",
648647
"Button",
649648
"ButtonStyle",

sdk/python/packages/flet/src/flet/controls/page.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ class Page(BasePage):
385385
"""
386386
TBD
387387
"""
388-
_services: ServiceRegistry = field(default_factory=lambda: ServiceRegistry())
388+
_services: ServiceRegistry = field(default_factory=ServiceRegistry)
389389

390390
def __post_init__(
391391
self,
@@ -395,8 +395,6 @@ def __post_init__(
395395
BasePage.__post_init__(self, ref)
396396
self._i = 1
397397
self.__session = weakref.ref(sess)
398-
399-
# page services
400398
self.__last_route = None
401399
self.__query: QueryString = QueryString(self)
402400
self.__authorization: Optional[Authorization] = None

0 commit comments

Comments
 (0)