Skip to content

Commit

Permalink
Remove declaration of generic T from server.py (#655)
Browse files Browse the repository at this point in the history
Remove declaration of generic T from server.py


Not being used, let's get rid of it dawg!

I also ran the linter based on Jonathan's command from this comment:
#613 (comment)

```
fd --glob '*.py'  python/src/aiconfig/editor/server | xargs python -m 'scripts.lint' --mode=fix --files
```

^ (btw you can install fd on Mac using `brew install fd`, looks pretty
cool). It actually seems pretty cool
https://github.com/sharkdp/fd?tab=readme-ov-file
  • Loading branch information
rossdanlm authored Dec 28, 2023
2 parents 016c74e + be6aeea commit 741ce9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions python/src/aiconfig/editor/server/server.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from typing import Any, Type, TypeVar
from typing import Any, Type

import lastmile_utils.lib.core.api as core_utils
import result
Expand All @@ -24,11 +24,11 @@
safe_run_aiconfig_static_method,
)
from aiconfig.model_parser import InferenceOptions
from aiconfig.registry import ModelParserRegistry
from flask import Flask, request
from flask_cors import CORS
from result import Err, Ok, Result

from aiconfig.registry import ModelParserRegistry
from aiconfig.schema import Prompt

logging.getLogger("werkzeug").disabled = True
Expand All @@ -42,8 +42,6 @@

LOGGER.addHandler(log_handler)

T = TypeVar("T")


app = Flask(__name__, static_url_path="")
CORS(app, resources={r"/api/*": {"origins": "*"}})
Expand Down
2 changes: 1 addition & 1 deletion python/src/aiconfig/editor/server/server_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import logging
import os
import sys
import typing
from dataclasses import dataclass
from enum import Enum
from types import ModuleType
from typing import Any, Callable, NewType, Optional, Type, TypeVar, cast
import typing

import lastmile_utils.lib.core.api as core_utils
import result
Expand Down

0 comments on commit 741ce9c

Please sign in to comment.