From 31facc16546faef6a75216e4b7fdfeb06f86e2c8 Mon Sep 17 00:00:00 2001 From: Aled Watkins Date: Sat, 6 Apr 2024 13:54:52 +0100 Subject: [PATCH] Ignore abstract type issue for `StorageBackend` Mypy can't understand that, even though this returns an instance of an abstract base class, the instances will always be subclasses of the base class and therefore they will have their methods defined. https://github.com/python/mypy/issues/4717 --- squash_bot/storage/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/squash_bot/storage/base.py b/squash_bot/storage/base.py index 1b00d69..b3fc0e0 100644 --- a/squash_bot/storage/base.py +++ b/squash_bot/storage/base.py @@ -80,6 +80,6 @@ def read_file(file_path: str, file_name: str, create_if_missing: bool = False) - def get_storage_backend() -> StorageBackend: - return settings_base.get_class_from_string( + return settings_base.get_class_from_string( # type: ignore[abstract] settings_base.settings.STORAGE_BACKEND, StorageBackend )()