Coverage for an_website / swapped_words / __init__.py: 100.000%

5 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-04-01 02:56 +0000

1# This program is free software: you can redistribute it and/or modify 

2# it under the terms of the GNU Affero General Public License as 

3# published by the Free Software Foundation, either version 3 of the 

4# License, or (at your option) any later version. 

5# 

6# This program is distributed in the hope that it will be useful, 

7# but WITHOUT ANY WARRANTY; without even the implied warranty of 

8# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 

9# GNU Affero General Public License for more details. 

10# 

11# You should have received a copy of the GNU Affero General Public License 

12# along with this program. If not, see <https://www.gnu.org/licenses/>. 

13 

14"""A page that swaps words.""" 

15 

16 

17from .. import GH_ORG_URL 

18from ..utils.utils import ModuleInfo, PageInfo 

19from .swap import SwappedWords, SwappedWordsAPI 

20 

21 

22def get_module_info() -> ModuleInfo: 

23 """Create and return the ModuleInfo for this module.""" 

24 return ModuleInfo( 

25 handlers=( 

26 (r"/vertauschte-woerter", SwappedWords), 

27 (r"/api/vertauschte-woerter", SwappedWordsAPI), 

28 ), 

29 name="Vertauschte Wörter", 

30 description="Eine Seite, die Wörter vertauscht", 

31 path="/vertauschte-woerter", 

32 keywords=("vertauschte", "Wörter", "witzig", "Känguru"), 

33 sub_pages=( 

34 PageInfo( 

35 name="Plugin", 

36 description="Ein Browser-Plugin, welches Wörter vertauscht", 

37 path=f"{GH_ORG_URL}/VertauschteWoerterPlugin", 

38 ), 

39 ), 

40 aliases=( 

41 "/swapped-words", 

42 "/vertauschte-wörter", 

43 "/vertauschte-w%C3%B6rter", 

44 ), 

45 )