What's blocking this check

https://github.com/pandas-dev/pandas/blob/45bd6372f24edccf68c2a5d05224295e805bde80/.pre-commit-config.yaml#L84-L98

from being enabled on test files is that it gets thrown off by fixtures

The solution is to use name=:

https://github.com/PyCQA/pylint/issues/1535#issuecomment-708172651

I'll write a script to auto-fix this, just opening the issue as a placeholder. Names shadowing other names can hide bugs so I'm pretty keen to put in the effort to automate checking this

Note that this is what the pytest docs recommend doing https://docs.pytest.org/en/stable/reference/reference.html#pytest-fixture :

If a fixture is used in the same module in which it is defined, the function name of the fixture will be shadowed by the function arg that requests the fixture; one way to resolve this is to name the decorated function fixture_ and then use @pytest.fixture(name='').

Comment From: MarcoGorelli

closing as not worth it