Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gerred committed Nov 15, 2023
1 parent 6a36352 commit 6f7b294
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/leapfrogai/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import sys
import asyncio

from leapfrogai.errors import AppImportError
from leapfrogai.utils import import_app
from leapfrogai.serve import serve

Expand Down
3 changes: 2 additions & 1 deletion src/leapfrogai/errors.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Adapted from Gunicorn's errors module
# Adapted from Gunicorn's errors module.

class AppImportError(Exception):
""" Exception raised when loading an application """
2 changes: 0 additions & 2 deletions src/leapfrogai/llm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import asyncio
from typing import Any, Generator, List

from pydantic import BaseModel
Expand All @@ -14,7 +13,6 @@
CompletionRequest,
CompletionResponse,
GrpcContext,
serve,
)


Expand Down
3 changes: 2 additions & 1 deletion src/leapfrogai/utils.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Adapted from Gunicorn's utils module.

import sys
import ast
import importlib
import logging
import traceback
from leapfrogai.errors import AppImportError

# Adapted from Gunicorn's util module
def import_app(module):
parts = module.split(":", 1)
if len(parts) == 1:
Expand Down

0 comments on commit 6f7b294

Please sign in to comment.