From 1f150cd58996e80d1a47a7f31289120af4f3e82a Mon Sep 17 00:00:00 2001 From: Jhoseph Date: Thu, 27 Nov 2025 01:53:11 -0400 Subject: [PATCH 1/2] =?UTF-8?q?hotfix(gui):=20eliminar=20l=C3=B3gica=20red?= =?UTF-8?q?undante=20en=20el=20manejo=20de=20operadores?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/gui.py b/gui.py index ab73334..96690f9 100644 --- a/gui.py +++ b/gui.py @@ -216,18 +216,6 @@ def operation_click(self, operation): self.operator = operation self.current_value = "" - elif self.first_number is not None and self.operator is not None and self.current_value: - # validar current_value antes de llamar equals_click - try: - float(self.current_value) - except ValueError: - self.show_error("Número inválido") - return - self.equals_click() - self.first_number = float(self.current_value) - self.operator = operation - self.current_value = "" - def equals_click(self): """Calcula el resultado de la operación actual. From 02fa3fa18d700438b0b5bf52fb5063e45ac3d03a Mon Sep 17 00:00:00 2001 From: Jhoseph Date: Thu, 27 Nov 2025 02:24:14 -0400 Subject: [PATCH 2/2] =?UTF-8?q?refactor(gui):=20eliminar=20l=C3=B3gica=20r?= =?UTF-8?q?edundante=20restante?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/gui.py b/gui.py index 96690f9..13e2fc1 100644 --- a/gui.py +++ b/gui.py @@ -211,11 +211,6 @@ def operation_click(self, operation): self.operator = operation self.current_value = "" - elif self.current_value and self.first_number is None and self.operator is None: - self.first_number = float(self.current_value) - self.operator = operation - self.current_value = "" - def equals_click(self): """Calcula el resultado de la operación actual.