diff --git a/autogpt_platform/backend/backend/blocks/__init__.py b/autogpt_platform/backend/backend/blocks/__init__.py index 03b4a9701760..11c5f3d5d6d2 100644 --- a/autogpt_platform/backend/backend/blocks/__init__.py +++ b/autogpt_platform/backend/backend/blocks/__init__.py @@ -15,10 +15,10 @@ if f.is_file() and f.name != "__init__.py" ] for module in modules: - if not re.match("^[a-z_.]+$", module): + if not re.match("^[a-z0-9_.]+$", module): raise ValueError( f"Block module {module} error: module name must be lowercase, " - "separated by underscores, and contain only alphabet characters" + "and contain only alphanumeric characters and underscores." ) importlib.import_module(f".{module}", package=__name__) diff --git a/autogpt_platform/backend/backend/blocks/slantthreed/_api.py b/autogpt_platform/backend/backend/blocks/slant3d/_api.py similarity index 100% rename from autogpt_platform/backend/backend/blocks/slantthreed/_api.py rename to autogpt_platform/backend/backend/blocks/slant3d/_api.py diff --git a/autogpt_platform/backend/backend/blocks/slantthreed/base.py b/autogpt_platform/backend/backend/blocks/slant3d/base.py similarity index 97% rename from autogpt_platform/backend/backend/blocks/slantthreed/base.py rename to autogpt_platform/backend/backend/blocks/slant3d/base.py index c6006c7ef068..bc5c82e7759d 100644 --- a/autogpt_platform/backend/backend/blocks/slantthreed/base.py +++ b/autogpt_platform/backend/backend/blocks/slant3d/base.py @@ -1,9 +1,10 @@ from typing import Any, Dict -from backend.blocks.slantthreed._api import Color, CustomerDetails, OrderItem, Profile from backend.data.block import Block from backend.util.request import requests +from ._api import Color, CustomerDetails, OrderItem, Profile + class Slant3DBlockBase(Block): """Base block class for Slant3D API interactions""" diff --git a/autogpt_platform/backend/backend/blocks/slantthreed/filament.py b/autogpt_platform/backend/backend/blocks/slant3d/filament.py similarity index 100% rename from autogpt_platform/backend/backend/blocks/slantthreed/filament.py rename to autogpt_platform/backend/backend/blocks/slant3d/filament.py diff --git a/autogpt_platform/backend/backend/blocks/slantthreed/order.py b/autogpt_platform/backend/backend/blocks/slant3d/order.py similarity index 100% rename from autogpt_platform/backend/backend/blocks/slantthreed/order.py rename to autogpt_platform/backend/backend/blocks/slant3d/order.py diff --git a/autogpt_platform/backend/backend/blocks/slantthreed/slicing.py b/autogpt_platform/backend/backend/blocks/slant3d/slicing.py similarity index 100% rename from autogpt_platform/backend/backend/blocks/slantthreed/slicing.py rename to autogpt_platform/backend/backend/blocks/slant3d/slicing.py diff --git a/autogpt_platform/backend/backend/blocks/slantthreed/webhook.py b/autogpt_platform/backend/backend/blocks/slant3d/webhook.py similarity index 100% rename from autogpt_platform/backend/backend/blocks/slantthreed/webhook.py rename to autogpt_platform/backend/backend/blocks/slant3d/webhook.py diff --git a/autogpt_platform/backend/backend/integrations/webhooks/__init__.py b/autogpt_platform/backend/backend/integrations/webhooks/__init__.py index d9c3fdcf8119..ebfeea763723 100644 --- a/autogpt_platform/backend/backend/integrations/webhooks/__init__.py +++ b/autogpt_platform/backend/backend/integrations/webhooks/__init__.py @@ -1,8 +1,7 @@ from typing import TYPE_CHECKING -from backend.integrations.webhooks.slantthreed import Slant3DWebhooksManager - from .github import GithubWebhooksManager +from .slant3d import Slant3DWebhooksManager if TYPE_CHECKING: from .base import BaseWebhooksManager diff --git a/autogpt_platform/backend/backend/integrations/webhooks/slantthreed.py b/autogpt_platform/backend/backend/integrations/webhooks/slant3d.py similarity index 100% rename from autogpt_platform/backend/backend/integrations/webhooks/slantthreed.py rename to autogpt_platform/backend/backend/integrations/webhooks/slant3d.py