Bug Report
A function whose signature says it doesn't return anything (and it actually doesn't) gets a Mypy error: "print" does not return a value.
To Reproduce
A simplistic example:
# script1.py
def print_items_of_a_list(a: list) -> None:
[print(item) for item in a]
Expected Behavior
Since the signature says it returns None and it actually returns None, this code is not supposed to cause an error.
Actual Behavior
script1.py:4: error: "print" does not return a value
Your Environment
- Mypy version used: 0.812
- Mypy command-line flags: none
- Mypy configuration options from
mypy.ini (and other config files): default
- Python version used: 3.6.0
- Operating system and version: macOS 11.3.1
Bug Report
A function whose signature says it doesn't return anything (and it actually doesn't) gets a Mypy
error: "print" does not return a value.To Reproduce
A simplistic example:
Expected Behavior
Since the signature says it returns None and it actually returns None, this code is not supposed to cause an error.
Actual Behavior
script1.py:4: error: "print" does not return a valueYour Environment
mypy.ini(and other config files): default