Skip to content

RepositoryEmpty isn't actually empty #175

Description

@kanzure

This isn't an "issue" so much as a note I'd like to leave for others. Maybe a code change is warranted or a README update?

RepositoryEmpty.__contains__ is correctly implemented but __getitem__ returns None, which does not seem like an appropriate default value for app environment variables. Collections like a dictionary's __getitem__ will raise a KeyError instead.

Another alternative for an actually empty repository is to pass an empty dictionary instead of using RepositoryEmpty.

I don't know why RepositoryEmpty exists.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions