Reputation: 119
variable=[]
Error:
error: Need type annotation for 'variable' (hint: "variable: List[<type>] = ...")
In config file: mypy.ini
disallow_any_expr=False
Is there any way to override this error by a flag in config file?
Upvotes: 7
Views: 4750
Reputation: 13518
First, run mypy --show-error-code your_module.py
to get the the error codes inside square brackets.
Then, in mypy.ini
, add disable_error_code = code1,code2
.
Upvotes: 9