From be0a2a749a9fb3d07da9fcc66f920e96ca710ea8 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Tue, 25 Aug 2026 14:37:45 +0200 Subject: [PATCH] Fix a pylint disable comment This stopped working with pylint 4.0.7 which is probably a pylint regression, but the correct location for the comment is always on the same line where the error occurs (disable-next can be used to supress the warning on the following like) so this worked only by acciddent anyway. --- src/python/gi/overrides/BlockDev.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/python/gi/overrides/BlockDev.py b/src/python/gi/overrides/BlockDev.py index a968a31ba..03a32fe2d 100644 --- a/src/python/gi/overrides/BlockDev.py +++ b/src/python/gi/overrides/BlockDev.py @@ -1263,8 +1263,7 @@ def __getattr__(self, attr): def wrapped(*args, **kwargs): try: ret = orig_obj(*args, **kwargs) - # pylint: disable=catching-non-exception - except tuple(tr_t[0] for tr_t in self._tr_excs) as e: + except tuple(tr_t[0] for tr_t in self._tr_excs) as e: # pylint: disable=catching-non-exception if hasattr(e, "msg"): msg = e.msg # pylint: disable=no-member elif hasattr(e, "message"):