Bug fix: jeb_utils.utils.is_number could return True even if the base is 0 which is mathematically incorrect.

This commit is contained in:
2026-04-02 12:48:18 +02:00
parent 32ed782fef
commit 867e9a9c0c
3 changed files with 8 additions and 3 deletions
+2
View File
@@ -38,6 +38,8 @@ def is_number(string: str, base: int = 10) -> bool:
:return: ``True`` if the string is a number, otherwise ``False``
:rtype: bool
'''
if base == 0:
return False
if not string:
return False
try: