Skip to content

Commit

Permalink
Apply noqa to specific statement rather than entire file (#223)
Browse files Browse the repository at this point in the history
Apply noqa to specific statement rather than entire file
  • Loading branch information
eyurtsev authored Nov 13, 2023
1 parent d591be4 commit 38b9356
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions langserve/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,15 +275,14 @@ def _scrub_exceptions_in_event(event: CallbackEventDict) -> CallbackEventDict:
def _setup_global_app_handlers(app: Union[FastAPI, APIRouter]) -> None:
@app.on_event("startup")
async def startup_event():
# ruff: noqa: E501
LANGSERVE = """
__ ___ .__ __. _______ _______. _______ .______ ____ ____ _______
| | / \ | \ | | / _____| / || ____|| _ \ \ \ / / | ____|
| | / ^ \ | \| | | | __ | (----`| |__ | |_) | \ \/ / | |__
| | / /_\ \ | . ` | | | |_ | \ \ | __| | / \ / | __|
| `----./ _____ \ | |\ | | |__| | .----) | | |____ | |\ \----. \ / | |____
|_______/__/ \__\ |__| \__| \______| |_______/ |_______|| _| `._____| \__/ |_______|
"""
""" # noqa: E501

def green(text):
return "\x1b[1;32;40m" + text + "\x1b[0m"
Expand All @@ -292,7 +291,8 @@ def green(text):
print(LANGSERVE)
for path in paths:
print(
f'{green("LANGSERVE:")} Playground for chain "{path or ""}/" is live at:'
f'{green("LANGSERVE:")} Playground for chain "{path or ""}/" is '
f'live at:'
)
print(f'{green("LANGSERVE:")} │')
print(f'{green("LANGSERVE:")} └──> {path}/playground/')
Expand Down Expand Up @@ -622,8 +622,8 @@ async def invoke(
return _json_encode_response(
InvokeResponse(
output=well_known_lc_serializer.dumpd(output),
# Callbacks are scrubbed and exceptions are converted to serializable format
# before returned in the response.
# Callbacks are scrubbed and exceptions are converted to
# serializable format before returned in the response.
callback_events=callback_events,
metadata=SingletonResponseMetadata(
run_id=_get_base_run_id_as_str(event_aggregator)
Expand Down

0 comments on commit 38b9356

Please sign in to comment.