From 90395349d88bd0f0dd2d5fa57bf0e280ebd9abf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Mon, 1 Jan 2024 15:45:24 +0545 Subject: [PATCH] hashfiledb: remove unused HashFileDB.config --- src/dvc_data/hashfile/db/__init__.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/dvc_data/hashfile/db/__init__.py b/src/dvc_data/hashfile/db/__init__.py index 6f7aebe3..af20ac86 100644 --- a/src/dvc_data/hashfile/db/__init__.py +++ b/src/dvc_data/hashfile/db/__init__.py @@ -52,29 +52,17 @@ class HashFileDB(ObjectDB): DEFAULT_CACHE_TYPES: ClassVar[List[str]] = ["copy"] CACHE_MODE: Optional[int] = None - def __init__(self, fs: "FileSystem", path: str, **config): + def __init__(self, fs: "FileSystem", path: str, read_only: bool = False, **config): from dvc_data.hashfile.state import StateNoop - super().__init__(fs, path) + super().__init__(fs, path, read_only=read_only) self.state = config.get("state", StateNoop()) self.verify = config.get("verify", self.DEFAULT_VERIFY) self.cache_types = config.get("type") or copy(self.DEFAULT_CACHE_TYPES) self.slow_link_warning = config.get("slow_link_warning", True) self.tmp_dir = config.get("tmp_dir") - self.read_only = config.get("read_only", False) self.hash_name = config.get("hash_name", self.fs.PARAM_CHECKSUM) - @property - def config(self): - return { - "state": self.state, - "verify": self.verify, - "type": self.cache_types, - "slow_link_warning": self.slow_link_warning, - "tmp_dir": self.tmp_dir, - "read_only": self.read_only, - } - def get(self, oid: str) -> HashFile: return HashFile( self.oid_to_path(oid),