class_docstr: Plugin which implements the --lf (run last-failing) option.
class_docstr_tok: ["Plugin","which","implements","the","--","lf","(","run","last-failing",")","option","."]
code: def pytest_collectreport(self, report: CollectReport) -> None:
      passed = report.outcome in ("passed", "skipped")
      if passed:
          if report.nodeid in self.lastfailed:
              self.lastfailed.pop(report.nodeid)
              self.lastfailed.update(
                  (item.nodeid, True) for item in report.result
              )
      else:
          self.lastfailed[report.nodeid] = True
  
imports: import dataclasses
  import json
  import os
  from pathlib import Path
  from typing import Dict
  from typing import final
  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.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.nodes import Directory
  from _pytest.nodes import File
  from _pytest.reports import TestReport
label_desc: Use image node_id 5 for calling the LFPlugin obj's underlying member method code with example usage: obj.pytest_collectreport(report) without return types