From a998862b1cc394cdadb2722e74e315cc5f1d8807 Mon Sep 17 00:00:00 2001 From: lanz <56061103+lanz@users.noreply.github.com> Date: Tue, 10 Nov 2026 12:32:23 -0600 Subject: [PATCH] Allowed hosted images, such as the Exchange badge, in the README check The check that each README image is a file in the repo failed on the CyberAgents Exchange badge, which is hosted on shields.io. Hosted images still need alt text, but aren't looked for in the repo. --- tests/test_docs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_docs.py b/tests/test_docs.py index 4db83f7..4311e25 100644 --- a/tests/test_docs.py +++ b/tests/test_docs.py @@ -74,6 +74,8 @@ def test_images_exist_and_have_alt_text(doc): assert images, f'{doc} has no screenshots' for alt, target in images: assert alt.strip(), f'{doc}: {target} has no alt text' + if target.startswith(('https://', 'http://')): + continue # a hosted image, such as a badge assert (path.parent / target).resolve().is_file(), f'{doc}: {target}'