From b0aa629cdd89d20b8ab9654c33e1d78a0dfeb591 Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Sun, 17 Mar 2024 17:26:10 +0800 Subject: [PATCH] Remove redundant 'module_help' field from src.backend.discord.commands.Commands class Previously this field was used only in Discord specific version of 'help' command. Porting of this functionality to common 'help' command implementation is planned as a part of #603 --- src/backend/discord/commands.py | 1 - src/patch/updater.py | 3 +++ src/version.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/backend/discord/commands.py b/src/backend/discord/commands.py index b28a6825..501dd4b2 100644 --- a/src/backend/discord/commands.py +++ b/src/backend/discord/commands.py @@ -34,7 +34,6 @@ def __init__(self) -> None: self.data = dict() if not hasattr(self, "aliases"): self.aliases = dict() - self.module_help = dict() def update(self, reload: bool = False) -> None: bc.discord.commands = self diff --git a/src/patch/updater.py b/src/patch/updater.py index 3e6912a2..83d7a1cf 100644 --- a/src/patch/updater.py +++ b/src/patch/updater.py @@ -336,6 +336,9 @@ def config_yaml(self, config): config.telegram.users[key].__dict__["data"]["tz"] = None self._bump_version(config, "0.0.59") if config.version == "0.0.59": + del config.commands.__dict__["module_help"] + self._bump_version(config, "0.0.60") + if config.version == "0.0.60": log.info(f"Version of {self.config_name} is up to date!") else: log.error(f"Unknown version {config.version} for {self.config_name}!") diff --git a/src/version.py b/src/version.py index 94813392..09bf451b 100644 --- a/src/version.py +++ b/src/version.py @@ -1,3 +1,3 @@ -CONFIG_VERSION = '0.0.59' +CONFIG_VERSION = '0.0.60' MARKOV_CONFIG_VERSION = '0.0.7' SECRET_CONFIG_VERSION = '0.0.4'