remove import for typing.override
This commit is contained in:
parent
52449d367e
commit
be9209e80d
|
@ -1,4 +1,4 @@
|
||||||
# SPDX-FileCopyrightText: 2024-present Marc Koch <marc-koch@posteo.de>
|
# SPDX-FileCopyrightText: 2024-present Marc Koch <marc-koch@posteo.de>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
__version__ = "1.0.0rc0"
|
__version__ = "1.0.0rc5"
|
|
@ -35,7 +35,8 @@ def get_config() -> dict:
|
||||||
Creating a new one under '{config_yaml}'.
|
Creating a new one under '{config_yaml}'.
|
||||||
Please fill in the required information.""")
|
Please fill in the required information.""")
|
||||||
config_yaml.parent.mkdir(parents=True, exist_ok=True)
|
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)
|
exit(0)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -4,7 +4,6 @@ import json
|
||||||
import logging
|
import logging
|
||||||
import logging.config
|
import logging.config
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import override
|
|
||||||
|
|
||||||
from platformdirs import user_log_dir
|
from platformdirs import user_log_dir
|
||||||
|
|
||||||
|
@ -85,7 +84,6 @@ class JSONFormatter(logging.Formatter):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.fmt_keys = fmt_keys if fmt_keys is not None else {}
|
self.fmt_keys = fmt_keys if fmt_keys is not None else {}
|
||||||
|
|
||||||
@override
|
|
||||||
def format(self, record: logging.LogRecord) -> str:
|
def format(self, record: logging.LogRecord) -> str:
|
||||||
message = self._prepare_log_dict(record)
|
message = self._prepare_log_dict(record)
|
||||||
return json.dumps(message, default=str)
|
return json.dumps(message, default=str)
|
||||||
|
|
Loading…
Reference in a new issue