Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract method StorageObjectBase.local_suffix missing return type #32

Open
Hugovdberg opened this issue Feb 1, 2024 · 0 comments
Open

Comments

@Hugovdberg
Copy link
Contributor

The code for StorageObjectBase.local_suffix is missing a return type, while the concrete implementation
in the readme returns str. This raises an incompatible method override error on type checking. Is this always supposed to return a string? Or are there other valid return types for the abstract method?

Abstract method:

@abstractmethod
def local_suffix(self):
"""Return a unique suffix for the local path of the object."""
# This can be a hexdigest of the query, or ideally a meaningful name.
# For example, if the query is a URL, it can be the URL without the protocol
# part and any optional parameters if that does not hamper the uniqueness.
...

Example implementation:

def local_suffix(self) -> str:
"""Return a unique suffix for the local path, determined from self.query."""
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant