pytest-incorrect-pytest-import (PT013)
源自 flake8-pytest-style linter。
作用
检查 pytest 的错误导入。
为什么这不好?
为了保持一致性,pytest
应该被导入为 import pytest
,并且其成员应该以 pytest.xxx.yyy
的形式访问,以保证一致性
示例
建议改为
源自 flake8-pytest-style linter。
检查 pytest 的错误导入。
为了保持一致性,pytest
应该被导入为 import pytest
,并且其成员应该以 pytest.xxx.yyy
的形式访问,以保证一致性
建议改为