Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
djcopley committed Feb 7, 2024
1 parent 57c05a7 commit c9a1d36
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/shelloracle/providers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def __set_name__(self, owner: type[Provider], name: str) -> None:

def __get__(self, instance: Provider, owner: type[Provider]) -> T:
if instance is None:
raise AttributeError("Can't get value when Setting is unbound")
# Accessing settings as a class attribute is not supported because it prevents
# inspect.get_members from determining the object type
raise AttributeError("Settings must be accessed through a provider instance.")
config = get_config()
return config["provider"][owner.name][self.name]

Expand Down

0 comments on commit c9a1d36

Please sign in to comment.