From 853e3f8af705c0091a26a7fe025bc221c623c686 Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Fri, 20 Mar 2026 17:17:24 +0100 Subject: [PATCH] Do not skip anchor validation warnings in verbose mode I don't know how I was thinking the piece of code `if log.getEffectiveLevel() > logging.DEBUG` was supposed to work. It doesn't achieve anything like the comment is saying "`Populated only if `validation: {anchors: info}` (or greater) is set.`" - but it does disable anchor validation under `--verbose`. --- properdocs/structure/pages.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/properdocs/structure/pages.py b/properdocs/structure/pages.py index 8e141a0c..a5625a77 100644 --- a/properdocs/structure/pages.py +++ b/properdocs/structure/pages.py @@ -288,8 +288,7 @@ def render(self, config: ProperDocsConfig, files: Files) -> None: self.present_anchor_ids = ( extract_anchors_ext.present_anchor_ids | raw_html_ext.present_anchor_ids ) - if log.getEffectiveLevel() > logging.DEBUG: - self.links_to_anchors = relative_path_ext.links_to_anchors + self.links_to_anchors = relative_path_ext.links_to_anchors present_anchor_ids: set[str] | None = None """Anchor IDs that this page contains (can be linked to in this page).""" @@ -298,7 +297,7 @@ def render(self, config: ProperDocsConfig, files: Files) -> None: """Links to anchors in other files that this page contains. The structure is: `{file_that_is_linked_to: {'anchor': 'original_link/to/some_file.md#anchor'}}`. - Populated after `.render()`. Populated only if `validation: {anchors: info}` (or greater) is set. + Populated after `.render()`. """ def validate_anchor_links(self, *, files: Files, log_level: int) -> None: