Skip to content

Commit

Permalink
lint: integrations service ruff format
Browse files Browse the repository at this point in the history
Signed-off-by: Diwank Singh Tomer <[email protected]>
  • Loading branch information
creatorrr committed Nov 29, 2024
1 parent 73b9321 commit c095f09
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion agents-api/gunicorn_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
debug = os.getenv("AGENTS_API_DEBUG", "false").lower() == "true"

# Gunicorn config variables
workers = multiprocessing.cpu_count() - 1 if not debug else 1
workers = (multiprocessing.cpu_count() - 1) if not debug else 1
worker_class = "uvicorn.workers.UvicornWorker"
bind = "0.0.0.0:8080"
keepalive = 120
Expand Down
7 changes: 6 additions & 1 deletion integrations-service/gunicorn_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@

TESTING = os.getenv("TESTING", "false").lower() == "true"
DEBUG = os.getenv("DEBUG", "false").lower() == "true"
AGENTS_API_DEBUG = os.getenv("AGENTS_API_DEBUG", "false").lower() == "true"

# Gunicorn config variables
workers = multiprocessing.cpu_count() // 2 if not (TESTING or DEBUG) else 1
workers = (
(multiprocessing.cpu_count() // 2)
if not (TESTING or AGENTS_API_DEBUG or DEBUG)
else 1
)
worker_class = "uvicorn.workers.UvicornWorker"
bind = "0.0.0.0:8000"
keepalive = 120
Expand Down
1 change: 0 additions & 1 deletion integrations-service/integrations/autogen/Tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, StrictBool

from .Chat import ChatSettings
from .Common import JinjaTemplate
from .Tools import (
ChosenBash20241022,
ChosenComputer20241022,
Expand Down
1 change: 0 additions & 1 deletion integrations-service/integrations/autogen/Tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
BaseModel,
ConfigDict,
Field,
RootModel,
StrictBool,
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import base64
import os
import tempfile

import arxiv
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
BrowserbaseListSessionsArguments,
BrowserbaseSetup,
)
from ...env import ( # Import env to access environment variables # Import env to access environment variables
from ...env import (
browserbase_api_key,
browserbase_project_id,
)
) # Import env to access environment variables
from ...models import (
BrowserbaseCompleteSessionOutput,
BrowserbaseCreateSessionOutput,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
from tenacity import retry, stop_after_attempt, wait_exponential

from ...autogen.Tools import LlamaParseFetchArguments, LlamaParseSetup
from ...env import (
llama_api_key, # Import env to access environment variables # Import env to access environment variables
)
from ...env import llama_api_key # Import env to access environment variables
from ...models import LlamaParseFetchOutput


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import base64
import json
from functools import partial, wraps
from functools import partial
from io import BytesIO
from pathlib import Path
from typing import Any
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import asyncio
from functools import lru_cache
from typing import Any, Dict

from beartype import beartype
from langchain_community.document_loaders import SpiderLoader
from tenacity import retry, stop_after_attempt, wait_exponential

from ...autogen.Tools import SpiderFetchArguments, SpiderSetup
from ...env import (
spider_api_key, # Import env to access environment variables # Import env to access environment variables
)
from ...env import spider_api_key # Import env to access environment variables
from ...models import SpiderFetchOutput


Expand Down

0 comments on commit c095f09

Please sign in to comment.