@@ -89,10 +89,10 @@ def _createButtons(self):
8989 "=" : (3 , 4 ),
9090 }
9191 # Create the buttons and add them to the grid layout
92- for btn_text , pos in buttons .items ():
93- self .buttons [btn_text ] = QPushButton (btn_text )
94- self .buttons [btn_text ].setFixedSize (40 , 40 )
95- buttonsLayout .addWidget (self .buttons [btn_text ], pos [0 ], pos [1 ])
92+ for btnText , pos in buttons .items ():
93+ self .buttons [btnText ] = QPushButton (btnText )
94+ self .buttons [btnText ].setFixedSize (40 , 40 )
95+ buttonsLayout .addWidget (self .buttons [btnText ], pos [0 ], pos [1 ])
9696 # Add buttonsLayout to the general layout
9797 self .generalLayout .addLayout (buttonsLayout )
9898
@@ -147,9 +147,9 @@ def _buildExpression(self, sub_exp):
147147
148148 def _connectSignals (self ):
149149 """Connect signals and slots."""
150- for btn_text , btn in self ._view .buttons .items ():
151- if btn_text not in {"=" , "C" }:
152- btn .clicked .connect (partial (self ._buildExpression , btn_text ))
150+ for btnText , btn in self ._view .buttons .items ():
151+ if btnText not in {"=" , "C" }:
152+ btn .clicked .connect (partial (self ._buildExpression , btnText ))
153153
154154 self ._view .buttons ["=" ].clicked .connect (self ._calculateResult )
155155 self ._view .display .returnPressed .connect (self ._calculateResult )
0 commit comments