Have you seen or written something like the following in a test:
def test_something(some_fixture): # pylint: disable=unused-argument
...
Usually this is because a test depends on a fixture but doesn’t use the value provided by the fixture in the test. An example can be that the fixture makes a file available and the test just depends on the file being available without needing to know where the file is located or its content.
Whenever a linting message is disabled it is important to think about whether the disable is really necessary since disabling messages is essentially like ignoring a part of the feedback the linter is providing.
In this case, pytest provides the pytest.mark.usefixtures decorator to avoid needing to provide unnecessary arguments to tests. This is how to use the decorator in this case:
@pytest.mark.usefixtures("some_fixture")
def test_something():
...
Using the decorator removes the need to disable a linting message! Unfortunately, in fixtures, this decorator doesn’t work so pylint: disable=unused-argument might show up in a fixture near you soon…