MCPcopy
hub / github.com/pytest-dev/pytest / consider_preparse

Method consider_preparse

src/_pytest/config/__init__.py:812–835  ·  view source on GitHub ↗

:meta private:

(
        self, args: Sequence[str], *, exclude_only: bool = False
    )

Source from the content-addressed store, hash-verified

810 #
811
812 def consider_preparse(
813 self, args: Sequence[str], *, exclude_only: bool = False
814 ) -> None:
815 """:meta private:"""
816 i = 0
817 n = len(args)
818 while i < n:
819 opt = args[i]
820 i += 1
821 if isinstance(opt, str):
822 if opt == "-p":
823 try:
824 parg = args[i]
825 except IndexError:
826 return
827 i += 1
828 elif opt.startswith("-p"):
829 parg = opt[2:]
830 else:
831 continue
832 parg = parg.strip()
833 if exclude_only and not parg.startswith("no:"):
834 continue
835 self.consider_pluginarg(parg)
836
837 def consider_pluginarg(self, arg: str) -> None:
838 """:meta private:"""

Calls 2

consider_pluginargMethod · 0.95
stripMethod · 0.80