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:
@@ -77,11 +77,14 @@ pip install jeb-utils --index-url https://repo.jcloud-services.ddns.net/simple/
|
|||||||
- `create_file_if_not_exists`: Creates a file if it does not exist.
|
- `create_file_if_not_exists`: Creates a file if it does not exist.
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
### Version 0.2.2
|
||||||
|
- Bug fix: jeb_utils.utils.is_number could return `True` even if the base is `0` which is mathematically incorrect.
|
||||||
|
|
||||||
### Version 0.2.1
|
### Version 0.2.1
|
||||||
- Added feature for validating addresses.
|
- Add feature for validating addresses.
|
||||||
|
|
||||||
### Version 0.2.0
|
### Version 0.2.0
|
||||||
- Removed all the functions and classes that are now in jeb-server-utils.
|
- Remove all the functions and classes that are now in jeb-server-utils.
|
||||||
|
|
||||||
### Version 0.1.4
|
### Version 0.1.4
|
||||||
- Bug fix: Due to a refactoring, `jeb_utils.jebp_utils.unpack_fields` did not work.
|
- Bug fix: Due to a refactoring, `jeb_utils.jebp_utils.unpack_fields` did not work.
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "jeb-utils"
|
name = "jeb-utils"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
description = "Common utils for JEB client and server."
|
description = "Common utils for JEB client and server."
|
||||||
dependencies = ["cryptography"]
|
dependencies = ["cryptography"]
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
@@ -38,6 +38,8 @@ def is_number(string: str, base: int = 10) -> bool:
|
|||||||
:return: ``True`` if the string is a number, otherwise ``False``
|
:return: ``True`` if the string is a number, otherwise ``False``
|
||||||
:rtype: bool
|
:rtype: bool
|
||||||
'''
|
'''
|
||||||
|
if base == 0:
|
||||||
|
return False
|
||||||
if not string:
|
if not string:
|
||||||
return False
|
return False
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user