We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33d64a5 commit d561b67Copy full SHA for d561b67
sphinx_needs/filter_common.py
@@ -344,9 +344,8 @@ def filter_single_need(
344
else:
345
result = eval(filter_string, filter_context)
346
if not isinstance(result, bool):
347
- # Raises NeedsInvalidFilter if the result is a string type
348
raise NeedsInvalidFilter(
349
- f"Error when evaluating filter: expected output to have True/False but got a string <{result}>"
+ f"Filter did not evaluate to a boolean, instead {type(result)}: {result}"
350
)
351
except Exception as e:
352
raise NeedsInvalidFilter(f"Filter {filter_string} not valid. Error: {e}.")
0 commit comments