| 657 | nextitem = None |
| 658 | |
| 659 | def __init_subclass__(cls) -> None: |
| 660 | problems = ", ".join( |
| 661 | base.__name__ for base in cls.__bases__ if issubclass(base, Collector) |
| 662 | ) |
| 663 | if problems: |
| 664 | warnings.warn( |
| 665 | f"{cls.__name__} is an Item subclass and should not be a collector, " |
| 666 | f"however its bases {problems} are collectors.\n" |
| 667 | "Please split the Collectors and the Item into separate node types.\n" |
| 668 | "Pytest Doc example: https://docs.pytest.org/en/latest/example/nonpython.html\n" |
| 669 | "example pull request on a plugin: https://github.com/asmeurer/pytest-flakes/pull/40/", |
| 670 | PytestWarning, |
| 671 | ) |
| 672 | |
| 673 | def __init__( |
| 674 | self, |