Index: pytest-pylint-0.21.0/pytest_pylint/plugin.py =================================================================== --- pytest-pylint-0.21.0.orig/pytest_pylint/plugin.py +++ pytest-pylint-0.21.0/pytest_pylint/plugin.py @@ -220,16 +220,16 @@ class PylintPlugin: if hasattr(session.config, "cache"): session.config.cache.set(HISTKEY, self.mtimes) - def pytest_collect_file(self, path, parent): + def pytest_collect_file(self, file_path, parent): """Collect files on which pylint should run""" - if path.ext != ".py": + if file_path.suffix != ".py": return None - rel_path = get_rel_path(path.strpath, str(parent.session.path)) + rel_path = get_rel_path(str(file_path), str(parent.session.path)) if should_include_file( rel_path, self.pylint_ignore, self.pylint_ignore_patterns ): - item = PylintFile.from_parent(parent, path=Path(path), plugin=self) + item = PylintFile.from_parent(parent, path=file_path, plugin=self) else: return None Index: pytest-pylint-0.21.0/pytest_pylint/tests/test_pytest_pylint.py =================================================================== --- pytest-pylint-0.21.0.orig/pytest_pylint/tests/test_pytest_pylint.py +++ pytest-pylint-0.21.0/pytest_pylint/tests/test_pytest_pylint.py @@ -38,7 +38,7 @@ def test_nodeid_no_dupepath(testdir): testdir.makepyfile(app="import sys") result = testdir.runpytest("--pylint", "--verbose") assert re.search( - r"^FAILED\s+app\.py::PYLINT$", result.stdout.str(), flags=re.MULTILINE + r"^app\.py::PYLINT FAILED", result.stdout.str(), flags=re.MULTILINE )