Queer European MD passionate about IT
Эх сурвалжийг харах

Remove whitespace at the end of the expression after del button is pressed

Davte 4 жил өмнө
parent
commit
1018876227

+ 1 - 1
davtelepot/__init__.py

@@ -11,7 +11,7 @@ __author__ = "Davide Testa"
 __email__ = "davide@davte.it"
 __credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
 __license__ = "GNU General Public License v3.0"
-__version__ = "2.5.16"
+__version__ = "2.5.17"
 __maintainer__ = "Davide Testa"
 __contact__ = "t.me/davte"
 

+ 1 - 1
davtelepot/useful_tools.py

@@ -360,7 +360,7 @@ async def calculate_session(bot: Bot,
             return
         input_value = data[1]
         if input_value == 'del':
-            expression = expression[:-1]
+            expression = expression[:-1].strip()
         elif input_value == 'back':
             pass
         elif input_value in calc_buttons: