From be9209e80d8b4b076b9f16639d9453935ce2b161 Mon Sep 17 00:00:00 2001 From: Marc Koch Date: Mon, 16 Sep 2024 00:44:01 +0200 Subject: [PATCH] remove import for typing.override --- src/cgnappointments/__about__.py | 2 +- src/cgnappointments/__main__.py | 3 ++- src/cgnappointments/logger.py | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/cgnappointments/__about__.py b/src/cgnappointments/__about__.py index f854876..7ffd1b8 100644 --- a/src/cgnappointments/__about__.py +++ b/src/cgnappointments/__about__.py @@ -1,4 +1,4 @@ # SPDX-FileCopyrightText: 2024-present Marc Koch # # SPDX-License-Identifier: MIT -__version__ = "1.0.0rc0" \ No newline at end of file +__version__ = "1.0.0rc5" \ No newline at end of file diff --git a/src/cgnappointments/__main__.py b/src/cgnappointments/__main__.py index 4ac9f2d..eacf797 100644 --- a/src/cgnappointments/__main__.py +++ b/src/cgnappointments/__main__.py @@ -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: diff --git a/src/cgnappointments/logger.py b/src/cgnappointments/logger.py index a842773..1871f60 100644 --- a/src/cgnappointments/logger.py +++ b/src/cgnappointments/logger.py @@ -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)