python:flake8找不到不存在的方法

Geo*_* B. 2 python flake8

如果我做类似的事情:

new_list = []
new_list.foo()
Run Code Online (Sandbox Code Playgroud)

flake8 不会为 foo() 方法返回错误,因为它不是“列表”方法。

这是正常现象还是我需要配置一些东西?

ale*_*cxe 6

flake8不处理问题,但PyLint发出警告no-member

$ 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)
Run Code Online (Sandbox Code Playgroud)

而且,PyCharm 内置的代码分析器也会对未解析的属性发出警告:

在此输入图像描述