mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
Fixed for type hints
This commit is contained in:
parent
1883c60b88
commit
371671b3eb
1 changed files with 6 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue