Fixed for type hints

This commit is contained in:
Dimitris Zlatanidis 2024-04-26 16:52:17 +03:00
parent 1883c60b88
commit 371671b3eb

View file

@ -2,12 +2,17 @@
# -*- coding: utf-8 -*-
from pathlib import Path
class TomlErrors:
""" Raise ean error message for toml files.
"""
def __init__(self):
self.tool_name: str = 'slpkg'
def raise_toml_error_message(self, error, toml_file) -> None:
def raise_toml_error_message(self, error: str, toml_file: Path) -> None:
""" A general error message for .toml configs files. """
raise SystemExit(f"\n{self.tool_name}: Error: {error}: in the configuration\n"
f"file '{toml_file}', edit the file and check for errors,\n"