Skip to content

Commit

Permalink
Fix misfires of "unused edit paths" warning
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypin committed May 15, 2021
1 parent 0b15156 commit dbda653
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mkdocs_gen_files/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def on_page_content(self, html, page: Page, config: Config, files: Files):
def on_post_build(self, config: Config):
self._dir.cleanup()

if self._edit_paths:
unused_edit_paths = {k: v for k, v in self._edit_paths.items() if v is not None}
if unused_edit_paths:
msg = "mkdocs_gen_files: These set_edit_path invocations went unused (the files don't exist): %r"
log.warning(msg, self._edit_paths)
log.warning(msg, unused_edit_paths)

0 comments on commit dbda653

Please sign in to comment.