# Path: src/_pytest/pathlib.py
# def resolve_from_str(input: str, rootpath: Path) -> Path:
#     input = expanduser(input)
#     input = expandvars(input)
#     if isabs(input):
#         return Path(input)
#     else:
#         return rootpath.joinpath(input)
# 
# Path: src/_pytest/pathlib.py
# def rm_rf(path: Path) -> None:
#     """Remove the path contents recursively, even if some elements
#     are read-only."""
#     path = ensure_extended_length_path(path)
#     onerror = partial(on_rm_rf_error, start_path=path)
#     shutil.rmtree(str(path), onerror=onerror)
# 
# Path: src/_pytest/reports.py
# class CollectReport(BaseReport):
#     """Collection report object.
# 
#     Reports can contain arbitrary extra attributes.
#     """
# 
#     when = "collect"
# 
#     def __init__(
#         self,
#         nodeid: str,
#         outcome: "Literal['passed', 'failed', 'skipped']",
#         longrepr: Union[
#             None, ExceptionInfo[BaseException], Tuple[str, int, str], str, TerminalRepr
#         ],
#         result: Optional[List[Union[Item, Collector]]],
#         sections: Iterable[Tuple[str, str]] = (),
#         **extra,
#     ) -> None:
#         #: Normalized collection nodeid.
#         self.nodeid = nodeid
# 
#         #: Test outcome, always one of "passed", "failed", "skipped".
#         self.outcome = outcome
# 
#         #: None or a failure representation.
#         self.longrepr = longrepr
# 
#         #: The collected items and collection nodes.
#         self.result = result or []
# 
#         #: Tuples of str ``(heading, content)`` with extra information
#         #: for the test report. Used by pytest to add text captured
#         #: from ``stdout``, ``stderr``, and intercepted logging events. May
#         #: be used by other plugins to add arbitrary information to reports.
#         self.sections = list(sections)
# 
#         self.__dict__.update(extra)
# 
#     @property
#     def location(self):
#         return (self.fspath, None, self.fspath)
# 
#     def __repr__(self) -> str:
#         return "<CollectReport {!r} lenresult={} outcome={!r}>".format(
#             self.nodeid, len(self.result), self.outcome
#         )


import json
import os
import attr
        import warnings
from pathlib import Path
from typing import Dict
from typing import Generator
from typing import Iterable
from typing import List
from typing import Optional
from typing import Set
from typing import Union
from .pathlib import resolve_from_str
from .pathlib import rm_rf
from .reports import CollectReport
from _pytest import nodes
from _pytest._io import TerminalWriter
from _pytest.compat import final
from _pytest.config import Config
from _pytest.config import ExitCode
from _pytest.config import hookimpl
from _pytest.config.argparsing import Parser
from _pytest.deprecated import check_ispytest
from _pytest.fixtures import fixture
from _pytest.fixtures import FixtureRequest
from _pytest.main import Session
from _pytest.python import Module
from _pytest.python import Package
from _pytest.reports import TestReport
        from _pytest.warning_types import PytestCacheWarning
        from _pytest.main import wrap_session
    from pprint import pformat
                # Only filter with known failures.
                if not self._collected_at_least_one_failure:
                    if not any(x.nodeid in lastfailed for x in result):
                        return
                    self.lfplugin.config.pluginmanager.register(
                        LFPluginCollSkipfiles(self.lfplugin), "lfplugin-collskip"
                    )
                    self._collected_at_least_one_failure = True

                session = collector.session
                result[:] = [
                    x
                    for x in result
                    if x.nodeid in lastfailed
                    # Include any passed arguments (not trivial to filter).
                    or session.isinitpath(x.path)
                    # Keep all sub-collectors.
                    or isinstance(x, nodes.Collector)
                ]
                return
        yield


class LFPluginCollSkipfiles:
    def __init__(self, lfplugin: "LFPlugin") -> None:
        self.lfplugin = lfplugin

    @hookimpl
    def pytest_make_collect_report(
        self, collector: nodes.Collector

# Path: src/_pytest/pathlib.py
# def resolve_from_str(input: str, rootpath: Path) -> Path:
#     input = expanduser(input)
#     input = expandvars(input)
#     if isabs(input):
#         return Path(input)
#     else:
#         return rootpath.joinpath(input)
# 
# Path: src/_pytest/pathlib.py
# def rm_rf(path: Path) -> None:
#     """Remove the path contents recursively, even if some elements
#     are read-only."""
#     path = ensure_extended_length_path(path)
#     onerror = partial(on_rm_rf_error, start_path=path)
#     shutil.rmtree(str(path), onerror=onerror)
# 
# Path: src/_pytest/reports.py
# class CollectReport(BaseReport):
#     """Collection report object.
# 
#     Reports can contain arbitrary extra attributes.
#     """
# 
#     when = "collect"
# 
#     def __init__(
#         self,
#         nodeid: str,
#         outcome: "Literal['passed', 'failed', 'skipped']",
#         longrepr: Union[
#             None, ExceptionInfo[BaseException], Tuple[str, int, str], str, TerminalRepr
#         ],
#         result: Optional[List[Union[Item, Collector]]],
#         sections: Iterable[Tuple[str, str]] = (),
#         **extra,
#     ) -> None:
#         #: Normalized collection nodeid.
#         self.nodeid = nodeid
# 
#         #: Test outcome, always one of "passed", "failed", "skipped".
#         self.outcome = outcome
# 
#         #: None or a failure representation.
#         self.longrepr = longrepr
# 
#         #: The collected items and collection nodes.
#         self.result = result or []
# 
#         #: Tuples of str ``(heading, content)`` with extra information
#         #: for the test report. Used by pytest to add text captured
#         #: from ``stdout``, ``stderr``, and intercepted logging events. May
#         #: be used by other plugins to add arbitrary information to reports.
#         self.sections = list(sections)
# 
#         self.__dict__.update(extra)
# 
#     @property
#     def location(self):
#         return (self.fspath, None, self.fspath)
# 
#     def __repr__(self) -> str:
#         return "<CollectReport {!r} lenresult={} outcome={!r}>".format(
#             self.nodeid, len(self.result), self.outcome
#         )


# Path: src/_pytest/cacheprovider.py
import json
import os
import attr
        import warnings
from pathlib import Path
from typing import Dict
from typing import Generator
from typing import Iterable
from typing import List
from typing import Optional
from typing import Set
from typing import Union
from .pathlib import resolve_from_str
from .pathlib import rm_rf
from .reports import CollectReport
from _pytest import nodes
from _pytest._io import TerminalWriter
from _pytest.compat import final
from _pytest.config import Config
from _pytest.config import ExitCode
from _pytest.config import hookimpl
from _pytest.config.argparsing import Parser
from _pytest.deprecated import check_ispytest
from _pytest.fixtures import fixture
from _pytest.fixtures import FixtureRequest
from _pytest.main import Session
from _pytest.python import Module
from _pytest.python import Package
from _pytest.reports import TestReport
        from _pytest.warning_types import PytestCacheWarning
        from _pytest.main import wrap_session
    from pprint import pformat

                # Only filter with known failures.
                if not self._collected_at_least_one_failure:
                    if not any(x.nodeid in lastfailed for x in result):
                        return
                    self.lfplugin.config.pluginmanager.register(
                        LFPluginCollSkipfiles(self.lfplugin), "lfplugin-collskip"
                    )
                    self._collected_at_least_one_failure = True

                session = collector.session
                result[:] = [
                    x
                    for x in result
                    if x.nodeid in lastfailed
                    # Include any passed arguments (not trivial to filter).
                    or session.isinitpath(x.path)
                    # Keep all sub-collectors.
                    or isinstance(x, nodes.Collector)
                ]
                return
        yield


class LFPluginCollSkipfiles:
    def __init__(self, lfplugin: "LFPlugin") -> None:
        self.lfplugin = lfplugin

    @hookimpl
    def pytest_make_collect_report(
        self, collector: nodes.Collector

    ) -> Optional[CollectReport]: