From 8bf1695e06655152022e9faaf451fd4ce9bac963 Mon Sep 17 00:00:00 2001 From: Zhipeng Xue <543984341@qq.com> Date: Wed, 10 Jul 2024 16:10:54 +0800 Subject: [PATCH 1/3] Type hints Fix --- errbot/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/errbot/cli.py b/errbot/cli.py index 8561f68ad..a5a3f59e9 100755 --- a/errbot/cli.py +++ b/errbot/cli.py @@ -22,6 +22,7 @@ from os import W_OK, access, getcwd, path, sep from pathlib import Path from platform import system +from collections.abc import Mapping from errbot.bootstrap import CORE_BACKENDS from errbot.logs import root_logger @@ -81,8 +82,7 @@ def get_config(config_path: str): exit(-1) -def _read_dict() -> dict: - from collections.abc import Mapping +def _read_dict() -> Mapping: new_dict = ast.literal_eval(sys.stdin.read()) if not isinstance(new_dict, Mapping): From 2d7ba206dc62a448acc1c4d4b7a39ffd36b1e183 Mon Sep 17 00:00:00 2001 From: Sijis Aviles Date: Wed, 21 May 2025 15:29:00 -0500 Subject: [PATCH 2/3] style: sort/ruff files --- errbot/cli.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/errbot/cli.py b/errbot/cli.py index a5a3f59e9..0491f04f9 100755 --- a/errbot/cli.py +++ b/errbot/cli.py @@ -19,10 +19,10 @@ import logging import os import sys +from collections.abc import Mapping from os import W_OK, access, getcwd, path, sep from pathlib import Path from platform import system -from collections.abc import Mapping from errbot.bootstrap import CORE_BACKENDS from errbot.logs import root_logger @@ -65,7 +65,7 @@ def get_config(config_path: str): log.error(f"I cannot find the config file {config_path}.") log.error("You can change this path with the -c parameter see --help") log.info( - f'You can use the template {os.path.realpath(os.path.join(__file__, os.pardir, "config-template.py"))}' + f"You can use the template {os.path.realpath(os.path.join(__file__, os.pardir, 'config-template.py'))}" f" as a base and copy it to {config_path}." ) log.info("You can then customize it.") @@ -83,7 +83,6 @@ def get_config(config_path: str): def _read_dict() -> Mapping: - new_dict = ast.literal_eval(sys.stdin.read()) if not isinstance(new_dict, Mapping): raise ValueError( From 0111148b5919d2b6b68a0fdd0b853d335cdec1dd Mon Sep 17 00:00:00 2001 From: Sijis Aviles Date: Wed, 21 May 2025 18:34:57 -0500 Subject: [PATCH 3/3] docs: add info to CHANGES --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index de976c9ef..0c7da366d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -22,6 +22,7 @@ fixes: - chore: bump jinja2 to 3.1.6 (#1723) - chore: update errbot-backend-slackv3 version to 0.3.1 (#1725) - fix: Close and join thread pools between tests (#1724) +- fix: type hints (#1698) v6.2.0 (2024-01-01)