Unverified Commit d2956695 authored by Marius van den Beek's avatar Marius van den Beek Committed by GitHub
Browse files

Merge pull request #18339 from bernt-matthias/topic/linter_list_import

[24.0] Make sure that all Linter subclasses are imported for listing them
parents cb7357a5 8beef0b4
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -102,12 +102,21 @@ class Linter(ABC):
        return cls.__name__

    @classmethod
    def list_listers(cls) -> List[str]:
    def list_linters(cls) -> List[str]:
        """
        list the names of all linter derived from Linter
        """
        submodules.import_submodules(galaxy.tool_util.linters)
        return [s.__name__ for s in cls.__subclasses__()]

    list_listers: Callable[[], List[str]]  # deprecated alias


# Define the `list_listers` alias outside of the `Linter` class so that
# @classmethod's change to `list_linters`s signature has taken effect and mypy
# doesn't report an [assignment] error
Linter.list_listers = Linter.list_linters


class LintMessage:
    """