From d88b7228fcfdcd21f00a646bf1b8d83e5ae7b610 Mon Sep 17 00:00:00 2001 From: Jakob Scheid Date: Thu, 2 Apr 2026 14:24:23 +0200 Subject: [PATCH] Update type hint Sequence in jeb_utils.utils.find_nearest_lower_number to Sequence[int | float] --- README.md | 3 +++ pyproject.toml | 2 +- src/jeb_utils/utils.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 45ede52..90a4563 100644 --- a/README.md +++ b/README.md @@ -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. ## 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 - Add support for `signed=True` in `jeb_utils.utils.int_to_bytes` diff --git a/pyproject.toml b/pyproject.toml index c9e73ee..52eb6d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "jeb-utils" -version = "0.2.4" +version = "0.2.5" description = "Common utils for JEB client and server." dependencies = ["cryptography"] license = "Apache-2.0" \ No newline at end of file diff --git a/src/jeb_utils/utils.py b/src/jeb_utils/utils.py index f35d3a2..29c7b40 100644 --- a/src/jeb_utils/utils.py +++ b/src/jeb_utils/utils.py @@ -129,7 +129,7 @@ def get_next_lower_integer_multiple(value: int, multiple: int) -> int: ''' 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.