Coverage for /home/delusionalinsanity/bbrepos/matyan/src/matyan/labels.py: 89%

# Coverage for /home/delusionalinsanity/bbrepos/matyan/src/matyan/labels.py : 89%

## 28 statements 25 run 3 missing 0 excluded

Hot-keys 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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | from typing import Union, Dict, AnyStr, Type, List from .config import CONFIG __author__ = 'Artur Barseghyan' __copyright__ = '2019 Artur Barseghyan' __license__ = 'GPL-2.0-only OR LGPL-2.0-or-later' __all__ = ( 'get_all_branch_types', 'get_branch_types', 'get_ignore_commits_exact_words', 'get_ignore_commits_prefixes', 'get_other_branch_type', 'get_other_branch_type_key', 'get_unreleased', 'get_unreleased_key', 'get_unreleased_key_label', ) def get_branch_types() -> Dict[str, str]: """Get branch types. :return: """ return dict(CONFIG['BranchTypes']) def get_other_branch_type() -> Dict[str, str]: """Get other branch type. :return: """ return dict(CONFIG['OtherBranchType']) def get_other_branch_type_key() -> str: return [k for k in get_other_branch_type().keys()][0] def get_all_branch_types() -> Dict[str, str]: branch_types = get_branch_types() branch_types.update(get_other_branch_type()) return branch_types def get_unreleased(): """Get unreleased. :return: """ return dict(CONFIG['Unreleased']) def get_unreleased_key() -> str: return [k for k in get_unreleased().keys()][0] def get_unreleased_label() -> str: return [k for k in get_unreleased().keys()][1] def get_unreleased_key_label(): """Get unreleased. :return: """ return [ (key, value) for key, value in dict(CONFIG['Unreleased']).items() ][0] def get_ignore_commits_exact_words() -> List[str]: """Get ignore commits exact words. :return: """ return CONFIG['IgnoreCommits']['exact'].split('\n') def get_ignore_commits_prefixes() -> List[str]: """Get ignore commits prefixes. :return: """ return CONFIG['IgnoreCommits']['prefix'].split('\n')