Update type hint Sequence in jeb_utils.utils.find_nearest_lower_number to Sequence[int | float]

This commit is contained in:
2026-04-02 14:24:23 +02:00
parent c5ba3855b5
commit d88b7228fc
3 changed files with 5 additions and 2 deletions
+3
View File
@@ -77,6 +77,9 @@ 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.5
- Update type hint `Sequence` in `jeb_utils.utils.find_nearest_lower_number` to `Sequence[int | float]`
### Version 0.2.4 ### Version 0.2.4
- Add support for `signed=True` in `jeb_utils.utils.int_to_bytes` - Add support for `signed=True` in `jeb_utils.utils.int_to_bytes`
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "jeb-utils" name = "jeb-utils"
version = "0.2.4" version = "0.2.5"
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"
+1 -1
View File
@@ -129,7 +129,7 @@ def get_next_lower_integer_multiple(value: int, multiple: int) -> int:
''' '''
return value - (value % multiple) return value - (value % multiple)
def find_nearest_lower_number(number_list: Sequence, target: int | float) -> int | float: def find_nearest_lower_number(number_list: Sequence[int | float], target: int | float) -> int | float:
''' '''
Finds the nearest lower number to the target from the list. Finds the nearest lower number to the target from the list.