Skip to content

Commit 04a420e

Browse files
committed
fix: bug regarding incorrect readwrite property implementation from mypy type errors #63
1 parent 2f273fb commit 04a420e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

snakemake_interface_storage_plugins/storage_provider.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,14 @@ def safe_print(self, query: str) -> str:
212212
@property
213213
def is_read_write(self) -> bool:
214214
from snakemake_interface_storage_plugins.storage_object import (
215-
StorageObjectReadWrite,
215+
StorageObjectRead,
216+
StorageObjectWrite,
216217
)
217218

218-
return isinstance(self.storage_object_cls, StorageObjectReadWrite)
219+
cls = self.get_storage_object_cls()
220+
return issubclass(cls, StorageObjectRead) and issubclass(
221+
cls, StorageObjectWrite
222+
)
219223

220224
@classmethod
221225
def get_storage_object_cls(cls):

0 commit comments

Comments
 (0)