From 6e9c664b1b1ba4f86d450a29b9aba2d1b1cad5cd Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sat, 19 Oct 2024 18:45:15 +0200 Subject: [PATCH] Docs: Add `EXCLUDE_PROJECTS` option to `update-plugin-list.py` (#12901) This allows to exclude specified packages from being listed on the Pytest Plugin List [1] page. [1] https://docs.pytest.org/en/latest/reference/plugin_list.html --- changelog/12901.doc.rst | 1 + scripts/update-plugin-list.py | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 changelog/12901.doc.rst diff --git a/changelog/12901.doc.rst b/changelog/12901.doc.rst new file mode 100644 index 00000000000..7b6e9e7c027 --- /dev/null +++ b/changelog/12901.doc.rst @@ -0,0 +1 @@ +Improved ``update-plugin-list.py`` program by adding ``EXCLUDE_PROJECTS`` mechanism diff --git a/scripts/update-plugin-list.py b/scripts/update-plugin-list.py index 556004d9e98..6b01965d057 100644 --- a/scripts/update-plugin-list.py +++ b/scripts/update-plugin-list.py @@ -68,6 +68,7 @@ "flask_fixture", "databricks-labs-pytester", } +EXCLUDE_PROJECTS = set() def escape_rst(text: str) -> str: @@ -116,6 +117,7 @@ def pytest_plugin_projects_from_pypi(session: CachedSession) -> dict[str, int]: if ( (name := p["name"]).startswith(("pytest-", "pytest_")) or name in ADDITIONAL_PROJECTS + and name not in EXCLUDE_PROJECTS ) }