Skip to content

Commit 7f28b35

Browse files
committed
lint
1 parent 2305dcb commit 7f28b35

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/any_llm/exceptions.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33

44
class MissingApiKeyError(Exception):
55
"""Exception raised when an API key is missing or not provided."""
6-
6+
77
def __init__(self, provider_name: str, env_var_name: str) -> None:
88
"""Initialize the exception.
9-
9+
1010
Args:
1111
provider_name: Name of the provider (e.g., "OpenAI", "Google", "Mistral")
1212
env_var_name: Name of the environment variable that should contain the API key
1313
message: Optional custom message. If not provided, a default message will be used.
1414
"""
1515
self.provider_name = provider_name
1616
self.env_var_name = env_var_name
17-
17+
1818
message = (
1919
f"No {provider_name} API key provided. "
2020
f"Please provide it in the config or set the {env_var_name} environment variable."
2121
)
22-
23-
super().__init__(message)
22+
23+
super().__init__(message)

test_exception.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
except MissingApiKeyError as e:
1818
print(f"✅ Custom message works: {e}")
1919

20-
print("All tests passed! 🎉")
20+
print("All tests passed! 🎉")

0 commit comments

Comments
 (0)