@@ -545,29 +545,27 @@ class PriorityOverlapWidget(Static, can_focus=True):
545545 """A focusable widget with a priority binding."""
546546
547547 BINDINGS = [
548- Binding ("0" , "record('widget_0')" , "0" , priority = False ),
549- Binding ("a" , "record('widget_a')" , "a" , priority = False ),
550- Binding ("b" , "record('widget_b')" , "b" , priority = False ),
551- Binding ("c" , "record('widget_c')" , "c" , priority = True ),
552- Binding ("d" , "record('widget_d')" , "d" , priority = False ),
553- Binding ("e" , "record('widget_e')" , "e" , priority = True ),
554- Binding ("f" , "record('widget_f')" , "f" , priority = True ),
548+ Binding ("0" , "app. record('widget_0')" , "0" , priority = False ),
549+ Binding ("a" , "app. record('widget_a')" , "a" , priority = False ),
550+ Binding ("b" , "app. record('widget_b')" , "b" , priority = False ),
551+ Binding ("c" , "app. record('widget_c')" , "c" , priority = True ),
552+ Binding ("d" , "app. record('widget_d')" , "d" , priority = False ),
553+ Binding ("e" , "app. record('widget_e')" , "e" , priority = True ),
554+ Binding ("f" , "app. record('widget_f')" , "f" , priority = True ),
555555 ]
556556
557- async def action_record ( self , key : str ) -> None :
558- await self .app .action_record ( key )
559557
560558class PriorityOverlapScreen (Screen ):
561559 """A screen with a priority binding."""
562560
563561 BINDINGS = [
564- Binding ("0" , "record('screen_0')" , "0" , priority = False ),
565- Binding ("a" , "record('screen_a')" , "a" , priority = False ),
566- Binding ("b" , "record('screen_b')" , "b" , priority = True ),
567- Binding ("c" , "record('screen_c')" , "c" , priority = False ),
568- Binding ("d" , "record('screen_d')" , "c" , priority = True ),
569- Binding ("e" , "record('screen_e')" , "e" , priority = False ),
570- Binding ("f" , "record('screen_f')" , "f" , priority = True ),
562+ Binding ("0" , "app. record('screen_0')" , "0" , priority = False ),
563+ Binding ("a" , "app. record('screen_a')" , "a" , priority = False ),
564+ Binding ("b" , "app. record('screen_b')" , "b" , priority = True ),
565+ Binding ("c" , "app. record('screen_c')" , "c" , priority = False ),
566+ Binding ("d" , "app. record('screen_d')" , "c" , priority = True ),
567+ Binding ("e" , "app. record('screen_e')" , "e" , priority = False ),
568+ Binding ("f" , "app. record('screen_f')" , "f" , priority = True ),
571569 ]
572570
573571 def compose (self ) -> ComposeResult :
@@ -576,9 +574,6 @@ def compose(self) -> ComposeResult:
576574 def on_mount (self ) -> None :
577575 self .query_one (PriorityOverlapWidget ).focus ()
578576
579- async def action_record ( self , key : str ) -> None :
580- await self .app .action_record ( key )
581-
582577class PriorityOverlapApp (AppKeyRecorder ):
583578 """An application with a priority binding."""
584579
@@ -597,9 +592,6 @@ class PriorityOverlapApp(AppKeyRecorder):
597592 def on_mount (self ) -> None :
598593 self .push_screen ("main" )
599594
600- async def action_record ( self , key : str ) -> None :
601- await super ().action_record ( key )
602-
603595
604596async def test_overlapping_priority_bindings () -> None :
605597 """Test an app stack with overlapping bindings."""
0 commit comments