From b23c1bce7b2ef2ec1da9825b7234b77058e5e923 Mon Sep 17 00:00:00 2001 From: StableLlama Date: Wed, 7 May 2025 18:47:10 +0200 Subject: [PATCH] Fix fatal bug Update README Bump to version 0.0.4 --- README.md | 26 ++++++++++++++++++++++++-- pyproject.toml | 2 +- src/basic_data_handling/int_nodes.py | 4 ++-- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6cf3f54..0b06ccf 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,30 @@ These nodes are very lightweight and require no additional dependencies. # Features -- STRING: all Python string functions +- **STRING**: String manipulation nodes + - Basic functions: capitalize, casefold, center, concat, count, encode/decode, find/rfind, join, lower/upper, replace, split, strip, etc. + - String checking: contains, endswith, startswith + - Case conversion: lower, upper, swapcase, title, capitalize + - Validation: isalnum, isalpha, isdigit, isnumeric, etc. + +- **LIST**: List manipulation nodes + - Creation: create, create_empty + - Modification: append, extend, insert, remove, pop, clear, set_item + - Access: get_item, slice, index, contains + - Information: length, count + - Operations: sort, reverse, copy, join, zip, flatten + - Unpacking: unpack + +- **INT**: Integer operation nodes + - Basic operations: add, subtract, multiply, divide, modulus, power + - Bit operations: bit_length, to_bytes, from_bytes, bit_count + +- **FLOAT**: Floating-point operation nodes + - Basic operations: add, subtract, multiply, divide, power, round + - Specialized: is_integer, as_integer_ratio, to_hex, from_hex + +- **BOOLEAN**: Boolean logic nodes + - Logic operations: and, or, not, xor, nand, nor ## Tests @@ -24,4 +47,3 @@ This repo contains unit tests written in Pytest in the `tests/` directory. It is - [build-pipeline.yml](.github/workflows/build-pipeline.yml) will run pytest and linter on any open PRs - [validate.yml](.github/workflows/validate.yml) will run [node-diff](https://github.com/Comfy-Org/node-diff) to check for breaking changes - diff --git a/pyproject.toml b/pyproject.toml index f8235ee..b43d3c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "basic_data_handling" -version = "0.0.3" +version = "0.0.4" description = """Basic Python functions for manipulating data that every programmer is used to. Currently supported: BOOLEAN, FLOAT, INT, STRING and data lists.""" authors = [ diff --git a/src/basic_data_handling/int_nodes.py b/src/basic_data_handling/int_nodes.py index 3287d91..38a02ab 100644 --- a/src/basic_data_handling/int_nodes.py +++ b/src/basic_data_handling/int_nodes.py @@ -201,7 +201,7 @@ class IntToBytes: DESCRIPTION = cleandoc(__doc__ or "") FUNCTION = "to_bytes" - def to_bytes(self, int_value: int, length: int, byteorder: Literal["big"|"little"], signed: Literal["True"|"False"]) -> tuple[int]: + def to_bytes(self, int_value: int, length: int, byteorder: Literal["big", "little"], signed: Literal["True", "False"]) -> tuple[int]: signed_bool = (signed == "True") return (int_value.to_bytes(length, byteorder=byteorder, signed=signed_bool),) @@ -228,7 +228,7 @@ class IntFromBytes: DESCRIPTION = cleandoc(__doc__ or "") FUNCTION = "from_bytes" - def from_bytes(self, bytes_value, byteorder: Literal["big"|"little"], signed: Literal["True"|"False"]) -> tuple[int]: + def from_bytes(self, bytes_value, byteorder: Literal["big", "little"], signed: Literal["True", "False"]) -> tuple[int]: signed_bool = (signed == "True") return (int.from_bytes(bytes_value, byteorder=byteorder, signed=signed_bool),)