mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-26 09:47:58 +00:00
key storage: type hints / cleanup
This commit is contained in:
parent
360cd8488f
commit
2705ccb59b
1 changed files with 3 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
|||
import textwrap
|
||||
from binascii import a2b_base64, b2a_base64, hexlify
|
||||
from hashlib import sha256, pbkdf2_hmac
|
||||
from typing import Literal, Callable
|
||||
from typing import Literal, Callable, ClassVar
|
||||
|
||||
from ..logger import create_logger
|
||||
|
||||
|
@ -170,7 +170,7 @@ class KeyBase:
|
|||
ARG_NAME = "UNDEFINED"
|
||||
|
||||
# Storage type (no key blob storage / keyfile / repo)
|
||||
STORAGE = KeyBlobStorage.NO_STORAGE
|
||||
STORAGE: ClassVar[str] = KeyBlobStorage.NO_STORAGE
|
||||
|
||||
# Seed for the buzhash chunker (borg.algorithms.chunker.Chunker)
|
||||
# type is int
|
||||
|
@ -279,7 +279,6 @@ class PlaintextKey(KeyBase):
|
|||
TYPES_ACCEPTABLE = {TYPE}
|
||||
NAME = "plaintext"
|
||||
ARG_NAME = "none"
|
||||
STORAGE = KeyBlobStorage.NO_STORAGE
|
||||
|
||||
chunk_seed = 0
|
||||
logically_encrypted = False
|
||||
|
@ -417,7 +416,7 @@ def init_ciphers(self, manifest_data=None):
|
|||
|
||||
class FlexiKey:
|
||||
FILE_ID = "BORG_KEY"
|
||||
STORAGE = KeyBlobStorage.NO_STORAGE # override in subclass
|
||||
STORAGE: ClassVar[str] = KeyBlobStorage.NO_STORAGE # override in subclass
|
||||
|
||||
@classmethod
|
||||
def detect(cls, repository, manifest_data):
|
||||
|
|
Loading…
Reference in a new issue