Completed
Pull Request — master (#1858)
by Sudheesh
01:35
created

coalib.main()   A

Complexity

Conditions 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 1
dl 0
loc 11
rs 9.4285
1
# This program is free software: you can redistribute it and/or modify it
2
# under the terms of the GNU Affero General Public License as published by the
3
# Free Software Foundation, either version 3 of the License, or (at your
4
# option) any later version.
5
#
6
# This program is distributed in the hope that it will be useful, but WITHOUT
7
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License
9
# 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 <http://www.gnu.org/licenses/>.
13
14
import functools
15
16
from pyprint.ConsolePrinter import ConsolePrinter
17
18
from coalib.coala_main import run_coala
19
from coalib.output.ConsoleInteraction import (
20
    print_results_no_input, print_section_beginning)
21
22
23
def main():
24
    console_printer = ConsolePrinter()
25
    partial_print_sec_beg = functools.partial(
26
        print_section_beginning,
27
        console_printer)
28
    results, exitcode, _ = run_coala(
29
        autoapply=False,
30
        print_results=print_results_no_input,
31
        print_section_beginning=partial_print_sec_beg)
32
33
    return exitcode
34