From 6e3baa7551e67c333573eacef383914d7999720a Mon Sep 17 00:00:00 2001 From: Juan Ignacio Vaccarezza Date: Mon, 26 Feb 2024 15:03:07 -0300 Subject: [PATCH] Fix check document and check item signature in example --- docs/api/scripting.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/api/scripting.md b/docs/api/scripting.md index 1baebf16d..704f5972f 100644 --- a/docs/api/scripting.md +++ b/docs/api/scripting.md @@ -45,7 +45,6 @@ For this use case, create a script to call in place of the default command-line ```python #!/usr/bin/env python - import sys from doorstop import build, DoorstopInfo, DoorstopWarning, DoorstopError @@ -56,12 +55,12 @@ def main(): sys.exit(0 if success else 1) -def check_document(document): +def check_document(document, tree): if sum(1 for i in document if i.normative) < 10: yield DoorstopInfo("fewer than 10 normative items") -def check_item(item): +def check_item(item, document, tree): if not item.get('type'): yield DoorstopWarning("no type specified") if item.derived and not item.get('rationale'):