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

Merge pull request #14496 from bernt-matthias/topic/lint_level

[22.01] fix lint context fail function
parents 0a69d3d8 0b3f8af2
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -251,10 +251,9 @@ class LintContext:
    def failed(self, fail_level: Union[LintLevel, str]) -> bool:
        if isinstance(fail_level, str):
            fail_level = LintLevel[fail_level.upper()]

        found_warns = self.found_warns
        found_errors = self.found_errors
        if fail_level >= LintLevel.WARN:
        if fail_level == LintLevel.WARN:
            lint_fail = (found_warns or found_errors)
        elif fail_level >= LintLevel.ERROR:
            lint_fail = found_errors