If I do something like:
new_list = []
new_list.foo()
flake8 does not return an error for foo() method since it is not a 'list' method.
Is this normal or do I need to configure something?
flake8 does not handle the problem, but PyLint does - issues the no-member warning:
$ pylint test.py
No config file found, using default configuration
************* Module test
C: 1, 0: Missing module docstring (missing-docstring)
C: 1, 0: Invalid constant name "new_list" (invalid-name)
E: 2, 0: Instance of 'list' has no 'foo' member (no-member)
And, the built-in to PyCharm code analyzer would also warn about the unresolved attribute:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With