Coverage for otaku_info/routes/__init__.py: 100%

Shortcuts on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

11 statements  

1"""LICENSE 

2Copyright 2020 Hermann Krumrey <hermann@krumreyh.com> 

3 

4This file is part of otaku-info. 

5 

6otaku-info is free software: you can redistribute it and/or modify 

7it under the terms of the GNU General Public License as published by 

8the Free Software Foundation, either version 3 of the License, or 

9(at your option) any later version. 

10 

11otaku-info is distributed in the hope that it will be useful, 

12but WITHOUT ANY WARRANTY; without even the implied warranty of 

13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 

14GNU General Public License for more details. 

15 

16You should have received a copy of the GNU General Public License 

17along with otaku-info. If not, see <http://www.gnu.org/licenses/>. 

18LICENSE""" 

19 

20from flask.blueprints import Blueprint 

21from typing import List, Tuple, Callable 

22from otaku_info.routes.external_service import define_blueprint \ 

23 as __external_service 

24from otaku_info.routes.api.media_api import define_blueprint as __media_api 

25from otaku_info.routes.notifications import define_blueprint as \ 

26 __notifications 

27from otaku_info.routes.media import define_blueprint as __media 

28from otaku_info.routes.ln import define_blueprint as __ln 

29from otaku_info.routes.schedule import define_blueprint as __schedule 

30from otaku_info.routes.updates import define_blueprint as __updates 

31 

32blueprint_generators: List[Tuple[Callable[[str], Blueprint], str]] = [ 

33 (__external_service, "external_service"), 

34 (__media_api, "media_api"), 

35 (__notifications, "notifications"), 

36 (__media, "media"), 

37 (__ln, "ln"), 

38 (__updates, "updates"), 

39 (__schedule, "schedule") 

40] 

41""" 

42Defines the functions used to create the various blueprints 

43as well as their names 

44"""