Skip to content

Commit

Permalink
Add super call to __getattr__ in __init__.py; fix unnecessar f-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
MHHukiewitz committed Feb 1, 2024
1 parent 35febfb commit 3acf056
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/aleph/sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@

def __getattr__(name):
if name == "AlephClient":
raise ImportError(f"AlephClient has been turned into an abstract class. Please use `AlephHttpClient` instead.")
raise ImportError("AlephClient has been turned into an abstract class. Please use `AlephHttpClient` instead.")
elif name == "AuthenticatedAlephClient":
raise ImportError(f"AuthenticatedAlephClient has been turned into an abstract class. Please use `AuthenticatedAlephHttpClient` instead.")
raise ImportError("AuthenticatedAlephClient has been turned into an abstract class. Please use `AuthenticatedAlephHttpClient` instead.")
elif name == "synchronous":
raise ImportError(f"The 'aleph.sdk.synchronous' type is deprecated and has been removed from the aleph SDK. Please use `aleph.sdk.client.AlephHttpClient` instead.")
raise ImportError("The 'aleph.sdk.synchronous' type is deprecated and has been removed from the aleph SDK. Please use `aleph.sdk.client.AlephHttpClient` instead.")
elif name == "asynchronous":
raise ImportError(f"The 'aleph.sdk.asynchronous' type is deprecated and has been removed from the aleph SDK. Please use `aleph.sdk.client.AlephHttpClient` instead.")
raise ImportError("The 'aleph.sdk.asynchronous' type is deprecated and has been removed from the aleph SDK. Please use `aleph.sdk.client.AlephHttpClient` instead.")
else:
super().__getattribute__(name)

0 comments on commit 3acf056

Please sign in to comment.