From d98b695fecd8761ba600cc5e30fb239be5221253 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sun, 9 Jan 2022 00:28:44 +0200 Subject: [PATCH] config: return Sequence instead of List from _getconftestmodules Nothing should mutate the internal data structure here. --- src/_pytest/config/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py index a30ee6cee..a6a22d2b9 100644 --- a/src/_pytest/config/__init__.py +++ b/src/_pytest/config/__init__.py @@ -546,7 +546,7 @@ class PytestPluginManager(PluginManager): def _getconftestmodules( self, path: Path, importmode: Union[str, ImportMode], rootpath: Path - ) -> List[types.ModuleType]: + ) -> Sequence[types.ModuleType]: if self._noconftest: return []