forked from coala/bear-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbear_docs_utils.py
More file actions
20 lines (18 loc) · 769 Bytes
/
bear_docs_utils.py
File metadata and controls
20 lines (18 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from coalib.settings.ConfigurationGathering import load_configuration
from coalib.misc.DictUtilities import inverse_dicts
from coalib.collecting.Collectors import (
collect_all_bears_from_sections, filter_section_bears_by_languages)
from pyprint.NullPrinter import NullPrinter
from coalib.output.printers.LogPrinter import LogPrinter
def get_bears():
"""
Get a dict of bears with the bear class as key.
:return:
A dict with bear classes as key and the list of sections
as value.
"""
log_printer = LogPrinter(NullPrinter())
sections, _ = load_configuration(None, log_printer)
local_bears, global_bears = collect_all_bears_from_sections(
sections, log_printer)
return inverse_dicts(local_bears, global_bears)