You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/error_code_list2.rst
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -234,25 +234,26 @@ since unless implemented by a sub-type, the expression will always evaluate to t
234
234
...
235
235
236
236
237
-
This check might falsely imply an error. For example, ``typing.Iterable`` does not implement
237
+
This check might falsely imply an error. For example, ``Iterable`` does not implement
238
238
``__len__`` and so this code will be flagged:
239
239
240
240
.. code-block:: python
241
241
242
242
# mypy: enable-error-code truthy-bool
243
+
from typing import Iterable
243
244
244
-
deftransform(items: Iterable[int]) -> List[int]:
245
-
# Error: "items" has type "typing.Iterable[int]" which does not implement __bool__ or __len__ so it could always be true in boolean context [truthy-bool]
0 commit comments