Skip to content

Instantly share code, notes, and snippets.

@sils
Created June 8, 2016 18:53
Show Gist options
  • Save sils/a5932132ae5b7d21269e88561f161719 to your computer and use it in GitHub Desktop.
Save sils/a5932132ae5b7d21269e88561f161719 to your computer and use it in GitHub Desktop.
coala supported languages
from itertools import chain
from coalib.collecting.Collectors import collect_bears, \
collect_all_bears_from_sections
from coalib.output.printers.LogPrinter import LogPrinter
from coalib.settings.Section import Section
from pyprint.ConsolePrinter import ConsolePrinter
if __name__ == '__main__':
log_printer = LogPrinter(ConsolePrinter())
local_bears, global_bears = collect_all_bears_from_sections(
{'default': Section('default')}, log_printer)
languages = set()
for bear in chain(*list(local_bears.values()),
*list(global_bears.values())):
languages |= set(bear.supported_languages)
print(', '.join(sorted(languages ^ {'All'})))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment