diff --git a/hooks/poetry_check.py b/hooks/poetry_check.py index 942c99e565be0233bd1ec6f7af62f05fede811b9..3071398aec1d1fb8453e8a4526d189ea769c84fe 100644 --- a/hooks/poetry_check.py +++ b/hooks/poetry_check.py @@ -1,4 +1,4 @@ -"""Validate Docker Compose files.""" +"""Validate pyproject.toml files.""" import argparse import pathlib @@ -13,7 +13,9 @@ def main(): args = parser.parse_args() hooks.utils.check_executable("poetry") return hooks.utils.bulk_check( - lambda x: hooks.utils.check_dir(["poetry", "check"], dir=x), + lambda x: hooks.utils.check_directory( + ["poetry", "check"], directory=x + ), hooks.utils.unique_directories(args.file), ) diff --git a/test_files/pyproject.toml b/test_files/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..25816eddcc8c22c7dc4c8e86a0eeca2cc122b2c0 --- /dev/null +++ b/test_files/pyproject.toml @@ -0,0 +1,18 @@ +[tool.poetry] +name = "mnpw" +version = "0.1.5" +description = "My Nagios plugin wrapper" +authors = ["Adar Nimrod <nimrod@shore.co.il>"] +license = "MIT" +homepage = "https://git.shore.co.il/shore/mnpw" +repository = "https://git.shore.co.il/shore/mnpw" +classifiers = [ + "Development Status :: 4 - Beta", + "Environment :: Console", + "Intended Audience :: Information Technology", + "Intended Audience :: System Administrators", + "License :: OSI Approved :: MIT License", + "Topic :: System :: Monitoring", + "Topic :: System :: Systems Administration", + "Topic :: Utilities", +]