I have one simple pytest problem,:
import pytest
@pytest.fixture
def config():
return "abc"
def mytest(config):
print(config)
The message mentioned that "Shadows name 'config' from out scope" in the line of def mytest(config):
.
Any suggestion to handle this PEP8 message?
Depending on who is raising the warning, it can be suppressed like:
# pylint: disable=R0801
def mytest(x_config):
print(x_config)
# noinspection 801,PyShadowingNames
def mytest(x_config):
print(x_config)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.