Skip to content

Commit

Permalink
Ignore abstract type issue for StorageBackend
Browse files Browse the repository at this point in the history
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.

python/mypy#4717
  • Loading branch information
AledWatkins committed Apr 6, 2024
1 parent c24fb22 commit f4fe62d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion squash_bot/storage/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)()

0 comments on commit f4fe62d

Please sign in to comment.