From 59203c63bb777a3bacec32fb8830fba33540e809 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:35:29 +0200 Subject: Adding upstream version 127.0. Signed-off-by: Daniel Baumann --- tools/lint/perfdocs/gatherer.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/lint/perfdocs/gatherer.py') diff --git a/tools/lint/perfdocs/gatherer.py b/tools/lint/perfdocs/gatherer.py index 828c2f7f2b..89f03cfdbb 100644 --- a/tools/lint/perfdocs/gatherer.py +++ b/tools/lint/perfdocs/gatherer.py @@ -87,6 +87,9 @@ class Gatherer(object): if any(d in str(path.resolve()) for d in exclude_dir): continue files = [f for f in os.listdir(path)] + + # Metrics are optional so it's only added to the matched if we + # find the `metrics.rst` file in the perfdocs folder matched = {"path": str(path), "yml": "", "rst": "", "static": []} for file in files: @@ -95,6 +98,8 @@ class Gatherer(object): matched["yml"] = file elif file == "index.rst": matched["rst"] = file + elif file == "metrics.rst": + matched["metrics"] = file elif file.split(".")[-1] in ALLOWED_STATIC_FILETYPES: matched["static"].append(file) -- cgit v1.2.3