Skip to content

Commit 7416fdd

Browse files
Make ruff happy :)
1 parent 6e109c6 commit 7416fdd

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

phone_verify/backends/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,18 @@ def get_sms_backend(phone_number):
2323
except ImportError as e:
2424
if not any(provider in backend_import_path.lower() for provider in ['twilio', 'nexmo']):
2525
# Error for custom backends
26-
raise RuntimeError(f"Failed to import the specified backend: {backend_import_path}. Ensure the module is installed and properly configured.") from e
26+
raise RuntimeError(
27+
f"Failed to import the specified backend: {backend_import_path}. "
28+
f"Ensure the module is installed and properly configured."
29+
) from e
2730

2831
# Extract the module name (e.g., 'twilio' or 'nexmo') for a more meaningful error message
2932
dependency_name = backend_import_path.split(".")[-2]
3033

3134
# Raise an error with the correct dependency name
32-
raise RuntimeError(f"{dependency_name.capitalize()} backend is not installed. Please install '{dependency_name}' to use this provider.") from e
35+
raise RuntimeError(
36+
f"{dependency_name.capitalize()} backend is not installed. "
37+
f"Please install '{dependency_name}' to use this provider."
38+
) from e
3339

3440
return backend_cls(**settings.PHONE_VERIFICATION["OPTIONS"])

0 commit comments

Comments
 (0)