import argparse
import subprocess
import sys
ARG_MAP = {
"check.py": [
"--reports=no",
"--disable=I",
"--msg-template='{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}'",
],
"create_release.py": [
"--reports=no",
"--disable=I",
"--msg-template='{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}'",
],
"set_lower_bounds": [
"--reports=no",
"--disable=I",
"--msg-template='{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}'",
],
"_utils.py": [
"--reports=no",
"--disable=I",
"--msg-template='{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}'",
],
}
def get_parser():
parser = argparse.ArgumentParser()
parser.add_argument(
"package", choices=ARG_MAP.keys(), help="designates the package to test"
)
return parser
def get_command(namespace):
return ["pylint", namespace.package] + ARG_MAP[namespace.package]
def main():
args = get_parser().parse_args()
return subprocess.call(get_command(args), stdout=sys.stdout)
if __name__ == "__main__":
sys.exit(main())