add ruff config

run files through formatter

add dosctrings to satisfy the linter
This commit is contained in:
2025-06-12 20:34:14 +01:00
parent fecd13d345
commit 582587bed5
21 changed files with 356 additions and 211 deletions

View File

@@ -1,3 +1,5 @@
"""module for custom exceptions in Slobs CLI."""
import asyncclick as click
@@ -5,9 +7,10 @@ class SlobsCliError(click.ClickException):
"""Base class for all Slobs CLI errors."""
def __init__(self, message: str):
"""Initialize the SlobsCliError with a message."""
super().__init__(message)
self.exit_code = 1
def show(self):
"""Display the error message in red."""
click.secho(f"Error: {self.message}", fg="red", err=True)
click.secho(f'Error: {self.message}', fg='red', err=True)