diff --git a/mypy/test/test_find_sources.py b/mypy/test/test_find_sources.py index 21ba0903a824..321f3405e999 100644 --- a/mypy/test/test_find_sources.py +++ b/mypy/test/test_find_sources.py @@ -17,20 +17,20 @@ class FakeFSCache(FileSystemCache): def __init__(self, files: set[str]) -> None: self.files = {os.path.abspath(f) for f in files} - def isfile(self, file: str) -> bool: - return file in self.files + def isfile(self, path: str) -> bool: + return path in self.files - def isdir(self, dir: str) -> bool: - if not dir.endswith(os.sep): - dir += os.sep - return any(f.startswith(dir) for f in self.files) + def isdir(self, path: str) -> bool: + if not path.endswith(os.sep): + path += os.sep + return any(f.startswith(path) for f in self.files) - def listdir(self, dir: str) -> list[str]: - if not dir.endswith(os.sep): - dir += os.sep - return list({f[len(dir) :].split(os.sep)[0] for f in self.files if f.startswith(dir)}) + def listdir(self, path: str) -> list[str]: + if not path.endswith(os.sep): + path += os.sep + return list({f[len(path) :].split(os.sep)[0] for f in self.files if f.startswith(path)}) - def init_under_package_root(self, file: str) -> bool: + def init_under_package_root(self, path: str) -> bool: return False diff --git a/mypy/test/testpep561.py b/mypy/test/testpep561.py index a95b9ea2a084..d7344ec898c7 100644 --- a/mypy/test/testpep561.py +++ b/mypy/test/testpep561.py @@ -23,8 +23,8 @@ class PEP561Suite(DataSuite): files = ["pep561.test"] base_path = "." - def run_case(self, test_case: DataDrivenTestCase) -> None: - test_pep561(test_case) + def run_case(self, testcase: DataDrivenTestCase) -> None: + test_pep561(testcase) @contextmanager