From 361d5763358c57af36532e27ab7344f17b5976b0 Mon Sep 17 00:00:00 2001 From: Fallen_Breath Date: Sun, 12 Mar 2023 18:12:52 +0800 Subject: [PATCH] typo --- quick_backup_multi/__init__.py | 6 +++--- quick_backup_multi/config.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/quick_backup_multi/__init__.py b/quick_backup_multi/__init__.py index 16c4c34..4ea10fb 100644 --- a/quick_backup_multi/__init__.py +++ b/quick_backup_multi/__init__.py @@ -9,11 +9,11 @@ from mcdreforged.api.all import * -from quick_backup_multi.config import Configure +from quick_backup_multi.config import Configuration from quick_backup_multi.constant import BACKUP_DONE_EVENT, Prefix, RESTORE_DONE_EVENT, TRIGGER_BACKUP_EVENT, \ CONFIG_FILE, TRIGGER_RESTORE_EVENT -config: Configure +config: Configuration server_inst: PluginServerInterface HelpMessage: RTextBase slot_selected = None # type: Optional[int] @@ -531,7 +531,7 @@ def get_slot_node(): def load_config(server: ServerInterface, source: CommandSource or None = None): global config - config = server_inst.load_config_simple(CONFIG_FILE, target_class=Configure, in_data_folder=False, source_to_reply=source) + config = server_inst.load_config_simple(CONFIG_FILE, target_class=Configuration, in_data_folder=False, source_to_reply=source) last = 0 for i in range(get_slot_count()): this = config.slots[i].delete_protection diff --git a/quick_backup_multi/config.py b/quick_backup_multi/config.py index 87c872b..21f1d36 100644 --- a/quick_backup_multi/config.py +++ b/quick_backup_multi/config.py @@ -7,7 +7,7 @@ class SlotInfo(Serializable): delete_protection: int = 0 -class Configure(Serializable): +class Configuration(Serializable): size_display: bool = True turn_off_auto_save: bool = True ignored_files: List[str] = [ @@ -55,7 +55,7 @@ def is_file_ignored(self, file_name: str) -> bool: if __name__ == '__main__': - config = Configure().get_default() + config = Configuration().get_default() config.ignored_files = ['*.abc', 'test', 'no*'] assert config.is_file_ignored('.abc') assert config.is_file_ignored('1.abc')