diff --git a/puzzle_generator/_ea_configurators/eac_simple/eacs_simple.py b/puzzle_generator/_ea_configurators/eac_simple/eacs_simple.py index b6e556f..1da7b73 100644 --- a/puzzle_generator/_ea_configurators/eac_simple/eacs_simple.py +++ b/puzzle_generator/_ea_configurators/eac_simple/eacs_simple.py @@ -35,7 +35,7 @@ def get_constants_str( ) _signature_params = "_SIGNATURE_PARAMS = " + repr(self._signature_params) decrypt: str = "_DECRYPT = get_decrypt(_SCRYPT_PARAMS, _SIGNATURE_PARAMS)" - return "\n".join([_scrypt_params, _signature_params, decrypt]) + return f"{_scrypt_params}\n{_signature_params}\n{decrypt}" @property def bu_configurator(self): diff --git a/puzzle_generator/_ea_configurators/eac_simple/eacs_spiced.py b/puzzle_generator/_ea_configurators/eac_simple/eacs_spiced.py index 1de9e01..90c3e7d 100644 --- a/puzzle_generator/_ea_configurators/eac_simple/eacs_spiced.py +++ b/puzzle_generator/_ea_configurators/eac_simple/eacs_spiced.py @@ -74,8 +74,12 @@ def get_constants_str( "_SIGNATURE_SPICES, " "_SCRYPT_PARAMS, _SIGNATURE_PARAMS)" ) - return "\n".join( - [proc_spices, signature_spices, _scrypt_params, _signature_params, decrypt] + return ( + f"{proc_spices}\n" + f"{signature_spices}\n" + f"{_scrypt_params}\n" + f"{_signature_params}\n" + f"{decrypt}" ) @property diff --git a/puzzle_generator/_puzzle_data_encryption.py b/puzzle_generator/_puzzle_data_encryption.py index c77c0bc..d88d82a 100644 --- a/puzzle_generator/_puzzle_data_encryption.py +++ b/puzzle_generator/_puzzle_data_encryption.py @@ -7,7 +7,7 @@ def encrypt_data( in_data, in_encrypt: typing.Callable[[bytes, bytes], bytes] ) -> tuple[str, bytes]: if list(in_data.keys()) == ["str"]: - return in_data["str"], bytes() + return in_data["str"], b"" tmp = encrypt_data(in_data["rest"], in_encrypt) rest = join(tmp[0], tmp[1]) encrypted = in_encrypt(rest, in_data["pass"].encode()) @@ -29,7 +29,7 @@ def encrypt_data_with_hints( in_data, in_encrypt: typing.Callable[[bytes, bytes], bytes] ) -> tuple[str, int, bytes]: if list(in_data.keys()) == ["str"]: - return in_data["str"], 0, bytes() + return in_data["str"], 0, b"" tmp = encrypt_data_with_hints(in_data["rest"], in_encrypt) rest = join_with_hints(tmp[0], tmp[1], tmp[2]) encrypted = in_encrypt(rest, in_data["pass"].encode()) diff --git a/pyproject.toml b/pyproject.toml index be34250..edf7c6b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ mypy = "2.3.0" pylint = "4.0.6" pyright = {extras = ["nodejs"], version = "1.1.411"} pytest = "9.1.1" -ruff = "0.15.22" +ruff = "0.16.0" xenon = "0.9.3" [build-system]