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

type hinting causes warning #26

Open
arrrrrmin opened this issue Oct 12, 2020 · 0 comments
Open

type hinting causes warning #26

arrrrrmin opened this issue Oct 12, 2020 · 0 comments

Comments

@arrrrrmin
Copy link

def get(self, key: str) -> str:
    """get the contents of the given key"""
    selected_key = self.key(key)
    return selected_key.get()

bucket = bucketstore.get(Config().bucket)
content = bucket.get('folder/fileName.txt')
# b"Hello I'm your file 'folder/fileName.txt' content."
content.decode('utf-8') # is possible
content.encode('utf-8') # is not possible

This might be a bit confusing when trying to encode/decode a string/bytes.
Sorry for beeing nit picky or if i missed something.

PS: Awesome repo 👍 😃

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