remove import for typing.override

fix config.yaml creation
This commit is contained in:
Marc 2024-09-16 00:44:01 +02:00
parent 52449d367e
commit d9fa7af5de
3 changed files with 3 additions and 4 deletions

View file

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2024-present Marc Koch <marc-koch@posteo.de>
#
# SPDX-License-Identifier: MIT
__version__ = "1.0.0rc0"
__version__ = "1.0.0rc5"

View file

@ -35,7 +35,8 @@ def get_config() -> dict:
Creating a new one under '{config_yaml}'.
Please fill in the required information.""")
config_yaml.parent.mkdir(parents=True, exist_ok=True)
Path("./config_template.yaml").write_text(config_yaml.read_text())
config_yaml.touch()
config_yaml.write_text(Path(Path(__file__).parent, "config_template.yaml").read_text())
exit(0)
try:

View file

@ -4,7 +4,6 @@ import json
import logging
import logging.config
from pathlib import Path
from typing import override
from platformdirs import user_log_dir
@ -85,7 +84,6 @@ class JSONFormatter(logging.Formatter):
super().__init__()
self.fmt_keys = fmt_keys if fmt_keys is not None else {}
@override
def format(self, record: logging.LogRecord) -> str:
message = self._prepare_log_dict(record)
return json.dumps(message, default=str)