Skip to content

Commit

Permalink
Remove Unused os Import + Run Black Format + Add Missing Dep & Rebuild (
Browse files Browse the repository at this point in the history
#1474)

# Remove Unused os Import + Run Black Format + Add Missing Dep & Rebuild

Following up with minor changes from
#1465 (comment)

Mainly, removed unused `os` import and save `server.py` so that black
formatter runs to pass the lint. While testing, noticed lint in
`LocalEditor` for missing dep so added that as well. Just for good
measure, rebuilt the client.

Test Plan:
- Clear output works
- Lint passes on PR
  • Loading branch information
rholinshead authored Mar 19, 2024
2 parents 714a178 + 479d43d commit fc9e3ae
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions python/src/aiconfig/editor/client/src/LocalEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ export default function LocalEditor() {
cancel,
clearOutputs,
deleteModelSettings,
deleteOutput,
deletePrompt,
getModels,
getServerStatus,
Expand Down
3 changes: 2 additions & 1 deletion python/src/aiconfig/editor/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import ctypes
import json
import logging
import os
import threading
import time
import uuid
Expand Down Expand Up @@ -815,6 +814,7 @@ def _op(
aiconfig, request_json, method_name, _op, signature
)


@app.route("/api/delete_output", methods=["POST"])
def delete_output() -> FlaskResponse:
"""
Expand All @@ -839,6 +839,7 @@ def delete_output() -> FlaskResponse:
aiconfig, request_json, method_name, operation, signature
)


@app.route("/api/get_aiconfigrc", methods=["GET"])
def get_aiconfigrc() -> FlaskResponse:
state = get_server_state(app)
Expand Down
6 changes: 3 additions & 3 deletions python/src/aiconfig/editor/server/static/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"files": {
"main.js": "/static/js/main.dde99e89.js",
"main.js": "/static/js/main.da81662e.js",
"index.html": "/index.html",
"main.dde99e89.js.map": "/static/js/main.dde99e89.js.map"
"main.da81662e.js.map": "/static/js/main.da81662e.js.map"
},
"entrypoints": [
"static/js/main.dde99e89.js"
"static/js/main.da81662e.js"
]
}
2 changes: 1 addition & 1 deletion python/src/aiconfig/editor/server/static/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>AIConfig Editor</title><script defer="defer" src="/static/js/main.dde99e89.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>AIConfig Editor</title><script defer="defer" src="/static/js/main.da81662e.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

0 comments on commit fc9e3ae

Please sign in to comment.