Browse Source

Give types for every argument

Andrey Bienkowski 3 years ago
parent
commit
6cf5ae4ca1
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/borg/crypto/key.py

+ 4 - 4
src/borg/crypto/key.py

@@ -458,12 +458,12 @@ class FlexiKey:
 
 
     @staticmethod
     @staticmethod
     def argon2(
     def argon2(
-        passphrase,
+        passphrase: str,
         output_len_in_bytes: int,
         output_len_in_bytes: int,
         salt: bytes,
         salt: bytes,
-        time_cost,
-        memory_cost,
-        parallelism,
+        time_cost: int,
+        memory_cost: int,
+        parallelism: int,
         type: Literal['i', 'd', 'id']
         type: Literal['i', 'd', 'id']
     ) -> bytes:
     ) -> bytes:
         if os.environ.get("BORG_TESTONLY_WEAKEN_KDF") == "1":
         if os.environ.get("BORG_TESTONLY_WEAKEN_KDF") == "1":