diff --git a/src/docstub/_docstrings.py b/src/docstub/_docstrings.py index ebcf0ee..9b32e54 100644 --- a/src/docstub/_docstrings.py +++ b/src/docstub/_docstrings.py @@ -381,7 +381,7 @@ def natlang_literal(self, tree): out = ", ".join(tree.children) out = f"Literal[{out}]" - if len(tree.children): + if len(tree.children) == 1: logger.warning( "natural language literal with one item `%s`, " "consider using `%s` to improve readability",