From 98e579ca9c0bdb169597eccafe4cc1c817ce8953 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Tue, 10 Oct 2023 19:34:40 +0000 Subject: [PATCH] include docs/bin/*.py in noxfile linting This enforce the Python linters in the noxfile on the Python files in docs/bin. (cherry picked from commit 320d1bed6fae89f0a4cb3ca83b5de4ffd2d4f829) --- .mypy.ini | 5 +++++ noxfile.py | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .mypy.ini diff --git a/.mypy.ini b/.mypy.ini new file mode 100644 index 0000000000..e176756d25 --- /dev/null +++ b/.mypy.ini @@ -0,0 +1,5 @@ +[mypy] +check_untyped_defs = True + +[mypy-ansible.*] +ignore_missing_imports = True diff --git a/noxfile.py b/noxfile.py index 6c8015da9a..cc7e39bc50 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,9 +1,16 @@ +from __future__ import annotations + import os +from glob import iglob from pathlib import Path import nox -LINT_FILES = ("hacking/pr_labeler/label.py", "noxfile.py") +LINT_FILES: tuple[str, ...] = ( + "hacking/pr_labeler/label.py", + "noxfile.py", + *iglob("docs/bin/*.py"), +) PINNED = os.environ.get("PINNED", "true").lower() in {"1", "true"} nox.options.sessions = ("clone-core", "lint")