Passed
Push — main ( 05fcff...04a574 )
by Eran
01:28
created

graphinate.server.starlette.views.favicon()   A

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nop 1
1
from starlette.responses import FileResponse
2
from starlette.routing import Route
3
4
from ..web import get_static_path
5
6
7
async def favicon(request):
8
    path = get_static_path('images/logo-128.png').absolute().as_posix()
9
    return FileResponse(path)
10
11
12
def favicon_route() -> Route:
13
    return Route('/favicon.ico', endpoint=favicon, include_in_schema=False)
14