Skip to content

Commit

Permalink
Merge branch 'dev' into aarushikansal/api-rate-lmiting
Browse files Browse the repository at this point in the history
  • Loading branch information
aarushik93 authored Dec 2, 2024
2 parents 8119281 + 5c49fc8 commit 92d2c44
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import pytest
from autogpt_libs.feature_flag.client import feature_flag, mock_flag_variation
from ldclient import LDClient

from autogpt_libs.feature_flag.client import feature_flag, mock_flag_variation


@pytest.fixture
def ld_client(mocker):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Settings(BaseSettings):
launch_darkly_sdk_key: str = Field(
default="",
description="The Launch Darkly SDK key",
validation_alias="LAUNCH_DARKLY_SDK_KEY"
validation_alias="LAUNCH_DARKLY_SDK_KEY",
)

model_config = SettingsConfigDict(case_sensitive=True, extra="ignore")
Expand Down
Empty file.
9 changes: 5 additions & 4 deletions autogpt_platform/backend/linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import subprocess

directory = os.path.dirname(os.path.realpath(__file__))
target_dirs = ["../backend", "../autogpt_libs"]


def run(*command: str) -> None:
Expand All @@ -11,17 +12,17 @@ def run(*command: str) -> None:

def lint():
try:
run("ruff", "check", ".", "--exit-zero")
run("ruff", "check", *target_dirs, "--exit-zero")
run("isort", "--diff", "--check", "--profile", "black", ".")
run("black", "--diff", "--check", ".")
run("pyright")
run("pyright", *target_dirs)
except subprocess.CalledProcessError as e:
print("Lint failed, try running `poetry run format` to fix the issues: ", e)
raise e


def format():
run("ruff", "check", "--fix", ".")
run("ruff", "check", "--fix", *target_dirs)
run("isort", "--profile", "black", ".")
run("black", ".")
run("pyright", ".")
run("pyright", *target_dirs)

0 comments on commit 92d2c44

Please sign in to comment.