Commit a9d727b1 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Merge branch 'master' of gitlab.tiker.net:inducer/ci-support

parents 9df23dce 280079bd
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
#!/usr/bin/env python
#!/usr/bin/env python3
"""This script allows using Pylint with YAML-based config files.

The usage of this script is identical to Pylint, except that this script accepts
@@ -26,10 +26,14 @@ This example is equivalent to invoking pylint with the options
"""

import sys
import logging
import shlex

import pylint.lint
import yaml

logger = logging.getLogger(__name__)


def generate_args_from_yaml(input_yaml):
    """Generate a list of strings suitable for use as Pylint args, from YAML.
@@ -69,8 +73,10 @@ def main():
        else:
            args.append(arg)

    logger.info(" ".join(shlex.quote(arg) for arg in ["pylint"] + args))
    pylint.lint.Run(args)


if __name__ == "__main__":
    logging.basicConfig(level=logging.INFO)
    main()