Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

docs: Add an additional truthiness antipattern to mypy best practices.

Anders Kaseorgfb3bfce5130c
diff --git a/docs/testing/mypy.md b/docs/testing/mypy.md
index 4e28ebf119c..cf52f8c5741 100644
--- a/docs/testing/mypy.md
+++ b/docs/testing/mypy.md
@@ -376,9 +376,9 @@ collection. For example:
* An exclude list where the default is to exclude nothing should be
non-`Optional` with default `[]`.
-Don't test an `Optional` value using truthiness (`if value:` or `if
-not value:`), especially when the type might have falsy values other
-than `None`.
+Don't test an `Optional` value using truthiness (`if value:`, `not
+value`, `value or default_value`), especially when the type might have
+falsy values other than `None`.
```python
s: Optional[str]