From 769019dedfe10d097eb4df0b6ef223ab6dd4e6f6 Mon Sep 17 00:00:00 2001 From: Sijis Aviles Date: Sat, 26 Oct 2024 01:52:52 -0500 Subject: [PATCH] style: general formatting --- errbot/backend_plugin_manager.py | 2 +- errbot/backends/irc.py | 10 +++++----- errbot/core.py | 8 ++------ errbot/plugin_manager.py | 2 +- errbot/rendering/xhtmlim.py | 2 +- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/errbot/backend_plugin_manager.py b/errbot/backend_plugin_manager.py index 5a3a0bba1..ee40bebe1 100644 --- a/errbot/backend_plugin_manager.py +++ b/errbot/backend_plugin_manager.py @@ -15,7 +15,7 @@ class PluginNotFoundException(Exception): def enumerate_backend_plugins( - all_plugins_paths: List[Union[str, Path]] + all_plugins_paths: List[Union[str, Path]], ) -> Iterator[PluginInfo]: plugin_places = [Path(root) for root in all_plugins_paths] for path in plugin_places: diff --git a/errbot/backends/irc.py b/errbot/backends/irc.py index a1755af0f..abc82a4e6 100644 --- a/errbot/backends/irc.py +++ b/errbot/backends/irc.py @@ -49,11 +49,11 @@ bg_default=NSC("\x03,"), fx_reset=NSC("\x03"), fx_bold=NSC("\x02"), - fx_italic=NSC("\x1D"), - fx_underline=NSC("\x1F"), - fx_not_italic=NSC("\x0F"), - fx_not_underline=NSC("\x0F"), - fx_normal=NSC("\x0F"), + fx_italic=NSC("\x1d"), + fx_underline=NSC("\x1f"), + fx_not_italic=NSC("\x0f"), + fx_not_underline=NSC("\x0f"), + fx_normal=NSC("\x0f"), fixed_width="", end_fixed_width="", inline_code="", diff --git a/errbot/core.py b/errbot/core.py index 78a0432bc..aee5a160e 100644 --- a/errbot/core.py +++ b/errbot/core.py @@ -55,12 +55,8 @@ def __init__(self, bot_config): log.debug( "created a thread pool of size %d.", bot_config.BOT_ASYNC_POOLSIZE ) - self.commands = ( - {} - ) # the dynamically populated list of commands available on the bot - self.re_commands = ( - {} - ) # the dynamically populated list of regex-based commands available on the bot + self.commands = {} # the dynamically populated list of commands available on the bot + self.re_commands = {} # the dynamically populated list of regex-based commands available on the bot self.command_filters = [] # the dynamically populated list of filters self.MSG_UNKNOWN_COMMAND = ( 'Unknown command: "%(command)s". ' diff --git a/errbot/plugin_manager.py b/errbot/plugin_manager.py index e49ede6d4..fda47bc02 100644 --- a/errbot/plugin_manager.py +++ b/errbot/plugin_manager.py @@ -1,4 +1,4 @@ -""" Logic related to plugin loading and lifecycle """ +"""Logic related to plugin loading and lifecycle""" import logging import os diff --git a/errbot/rendering/xhtmlim.py b/errbot/rendering/xhtmlim.py index 3a07b8d77..fc760a2fe 100644 --- a/errbot/rendering/xhtmlim.py +++ b/errbot/rendering/xhtmlim.py @@ -190,7 +190,7 @@ def _replace_charref(s): if num in _invalid_charrefs: return _invalid_charrefs[num] if 0xD800 <= num <= 0xDFFF or num > 0x10FFFF: - return "\uFFFD" + return "\ufffd" if num in _invalid_codepoints: return "" return chr(num)