From 40837894e8bab8f82d6d0541fa3fa537da84fdfc Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Thu, 5 Dec 2019 15:51:32 +0100 Subject: lgtm: ignore Iterator does not return self from __iter__ method --- mesonbuild/mesonlib.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index a19b2cfe2..0d8ec3cff 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -1416,8 +1416,14 @@ class LibType(Enum): PREFER_STATIC = 3 -class ProgressBarFallback: - '''Fallback progress bar implementation when tqdm is not found''' +class ProgressBarFallback: # lgtm [py/iter-returns-non-self] + ''' + Fallback progress bar implementation when tqdm is not found + + Since this class is not an actual iterator, but only provides a minimal + fallback, it is safe to ignore the 'Iterator does not return self from + __iter__ method' warning. + ''' def __init__(self, iterable=None, total=None, bar_type=None, desc=None): if iterable is not None: self.iterable = iter(iterable) -- cgit v1.2.3