From 0abfa3a68f7619546a4c8e29408bf0d366cf822a Mon Sep 17 00:00:00 2001 From: merwanehamadi Date: Sun, 18 Jun 2023 20:00:23 -0700 Subject: [PATCH] Remove config from command decorator (#4736) --- autogpt/command_decorator.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/autogpt/command_decorator.py b/autogpt/command_decorator.py index 7ac4b7cdfe56..1edd766ec4dd 100644 --- a/autogpt/command_decorator.py +++ b/autogpt/command_decorator.py @@ -2,7 +2,6 @@ from typing import Any, Callable, Dict, Optional from autogpt.config import Config -from autogpt.logs import logger from autogpt.models.command import Command # Unique identifier for auto-gpt commands @@ -18,16 +17,6 @@ def command( ) -> Callable[..., Any]: """The command decorator is used to create Command objects from ordinary functions.""" - # TODO: Remove this in favor of better command management - config = Config() - - if callable(enabled): - enabled = enabled(config) - if not enabled: - if disabled_reason is not None: - logger.debug(f"Command '{name}' is disabled: {disabled_reason}") - return lambda func: func - def decorator(func: Callable[..., Any]) -> Command: cmd = Command( name=name,