在PyCharm中是否有可能禁用整个文件的检查?
之所以需要这样做,是因为在处理py.test时,它使用的固定装置似乎会掩盖函数参数,并同时导致未解决的引用。例如:
from myfixtures import user # Unused import statement warning
def test_is_awesome(user): # Shadows name 'user' from outer scope warning
assert user.is_awesome()
另外,从py.test中还有其他警告,例如使用pytest.raises()
会在pytest.py中引发“找不到引用'raises'”的错误。
也许有另一种方法可以解决这些问题?也许我在错误地使用py.test?