Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Bobrikov committed Nov 15, 2023
1 parent eb921d7 commit 5a8fc02
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dipdup/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ async def _performance(request: web.Request) -> web.Response:
dumps=lambda x: json_dumps(x, option=orjson.OPT_SORT_KEYS).decode(),
)


def _get_add_index(ctx: DipDupContext) -> Callable[[web.Request], Awaitable[web.Response]]:
async def _add_index(request: web.Request) -> web.Response:
try:
Expand All @@ -29,6 +30,7 @@ async def _add_index(request: web.Request) -> web.Response:

return _add_index


def _get_add_contract(ctx: DipDupContext) -> Callable[[web.Request], Awaitable[web.Response]]:
async def _add_contract(request: web.Request) -> web.Response:
try:
Expand All @@ -38,9 +40,10 @@ async def _add_contract(request: web.Request) -> web.Response:
except TypeError as e:
return web.Response(body=f'Bad arguments: {e!r}', status=400)
return web.Response()

return _add_contract


async def create_api(ctx: DipDupContext) -> web.Application:
routes = web.RouteTableDef()
routes.get('/performance')(_performance)
Expand Down

0 comments on commit 5a8fc02

Please sign in to comment.