diff --git a/pyproject.toml b/pyproject.toml index c31cf3eb..c7df4fce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,4 +24,4 @@ exclude = ''' ''' [tool.ruff.lint] -select = ["F401"] +select = ["F401", "F541"] diff --git a/src/tpm2_pytss/types.py b/src/tpm2_pytss/types.py index b155e6de..cf1405a5 100644 --- a/src/tpm2_pytss/types.py +++ b/src/tpm2_pytss/types.py @@ -1840,7 +1840,7 @@ def to_tools(self, session_type: TPM2_SE = None, auth_hash: TPM2_ALG = None): session_type is None or auth_hash is None ): raise TypeError( - f"session_type and auth_hash most be defined for session contexts" + "session_type and auth_hash most be defined for session contexts" ) version = 1 diff --git a/test/test_fapi.py b/test/test_fapi.py index d8733a47..b1a10fbf 100644 --- a/test/test_fapi.py +++ b/test/test_fapi.py @@ -920,7 +920,7 @@ def test_policy_action(self): }} ] }} - """ + """ # noqa: F541 ruff is wrong here policy_path = f"/policy/policy_{random_uid()}" self.fapi.import_object(path=policy_path, import_data=policy) diff --git a/test/test_types.py b/test/test_types.py index 35d7a35e..279b2d9e 100644 --- a/test/test_types.py +++ b/test/test_types.py @@ -812,7 +812,7 @@ def test_TPMT_PUBLIC_parse_ecc_ecdaa4_sha256(self): # scheme is set, so we need to be smarter about the attributes we use templ = TPMT_PUBLIC.parse( - f"ecc:ecdaa4-sha256", + "ecc:ecdaa4-sha256", objectAttributes=TPMA_OBJECT.DEFAULT_TPM2_TOOLS_CREATEPRIMARY_ATTRS, ) self.assertEqual(templ.nameAlg, TPM2_ALG.SHA256) @@ -840,7 +840,7 @@ def test_TPMT_PUBLIC_parse_ecc_ecdaa4(self): # scheme is set, so we need to be smarter about the attributes we use templ = TPMT_PUBLIC.parse( - f"ecc:ecdaa4", + "ecc:ecdaa4", objectAttributes=TPMA_OBJECT.DEFAULT_TPM2_TOOLS_CREATEPRIMARY_ATTRS, ) self.assertEqual(templ.nameAlg, TPM2_ALG.SHA256)