Passed
Push — main ( 2bcd5c...05fcff )
by Eran
01:27
created

starlette.views   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 9
dl 0
loc 14
rs 10
c 0
b 0
f 0

2 Functions

Rating   Name   Duplication   Size   Complexity  
A favicon_route() 0 2 1
A favicon() 0 3 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