@@ -1421,6 +1421,8 @@ class Checkbutton(Widget):
1421
1421
def select (self ): ...
1422
1422
def toggle (self ): ...
1423
1423
1424
+ _EntryIndex = Union [str , int ] # "INDICES" in manual page
1425
+
1424
1426
class Entry (Widget , XView ):
1425
1427
def __init__ (
1426
1428
self ,
@@ -1512,25 +1514,25 @@ class Entry(Widget, XView):
1512
1514
@overload
1513
1515
def configure (self , cnf : str ) -> Tuple [str , str , str , Any , Any ]: ...
1514
1516
config = configure
1515
- def delete (self , first , last : Optional [ Any ] = ...): ...
1516
- def get (self ): ...
1517
- def icursor (self , index ) : ...
1518
- def index (self , index ) : ...
1519
- def insert (self , index , string ) : ...
1517
+ def delete (self , first : _EntryIndex , last : _EntryIndex | None = ...) -> None : ...
1518
+ def get (self ) -> str : ...
1519
+ def icursor (self , index : _EntryIndex ) -> None : ...
1520
+ def index (self , index : _EntryIndex ) -> int : ...
1521
+ def insert (self , index : _EntryIndex , string : str ) -> None : ...
1520
1522
def scan_mark (self , x ): ...
1521
1523
def scan_dragto (self , x ): ...
1522
- def selection_adjust (self , index ) : ...
1523
- select_adjust : Any
1524
- def selection_clear (self ) : ...
1525
- select_clear : Any
1526
- def selection_from (self , index ) : ...
1527
- select_from : Any
1528
- def selection_present ( self ): ...
1529
- select_present : Any
1530
- def selection_range ( self , start , end ): ...
1531
- select_range : Any
1532
- def selection_to ( self , index ): ...
1533
- select_to : Any
1524
+ def selection_adjust (self , index : _EntryIndex ) -> None : ...
1525
+ def selection_clear ( self ) -> None : ... # type: ignore
1526
+ def selection_from (self , index : _EntryIndex ) -> None : ...
1527
+ def selection_present ( self ) -> bool : ...
1528
+ def selection_range (self , start : _EntryIndex , end : _EntryIndex ) -> None : ...
1529
+ def selection_to ( self , index : _EntryIndex ) -> None : ...
1530
+ select_adjust = selection_adjust
1531
+ select_clear = selection_clear
1532
+ select_from = selection_from
1533
+ select_present = selection_present
1534
+ select_range = selection_range
1535
+ select_to = selection_to
1534
1536
1535
1537
class Frame (Widget ):
1536
1538
def __init__ (
0 commit comments