From 050c52a0082e33702bbba428e1a2d83ffb3cb294 Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Sun, 9 Jul 2023 20:29:33 +0200 Subject: [PATCH] Fix `CommandRegistry` state initialization --- autogpt/models/command_registry.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/autogpt/models/command_registry.py b/autogpt/models/command_registry.py index 59d3ae77..f54f4adb 100644 --- a/autogpt/models/command_registry.py +++ b/autogpt/models/command_registry.py @@ -15,8 +15,12 @@ class CommandRegistry: directory. """ - commands: dict[str, Command] = {} - commands_aliases: dict[str, Command] = {} + commands: dict[str, Command] + commands_aliases: dict[str, Command] + + def __init__(self): + self.commands = {} + self.commands_aliases = {} def __contains__(self, command_name: str): return command_name in self.commands or command_name in self.commands_aliases