-
-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Labels
bugSomething isn't workingSomething isn't working
Description
For example, the readme states that the accepted values for the multi_docs import statement paremeter are True and False
However, this is not accurate, because these query string values are not interpreted as Python expressions, but are read as strings, and then converted into booleans:
mkdocs-multirepo-plugin/mkdocs_multirepo_plugin/structure.py
Lines 59 to 69 in 78132fa
for part in query_parts: k, v = part.split("=") if v[0] == "[" and v[len(v) - 1] == "]": try: import_parts[k] = [lst_v.strip() for lst_v in ast.literal_eval(v)] except ValueError: raise ImportSyntaxError( f"{v} is not a properly formatted python list\nException raised for import statement: {repo_url}" ) else: import_parts[k] = v multi_docs=bool(import_stmt.get("multi_docs", False)),
So the query string value "False" (or any other non-empty string value) is converted to True
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working