diff --git a/pyproject.toml b/pyproject.toml index 0b787d1d78..48848b87d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -232,7 +232,6 @@ ignore = [ "A", "B", "SIM", - "BLE", "D", "EXE", "FBT", diff --git a/src/ansiblelint/__main__.py b/src/ansiblelint/__main__.py index 30fe1563d6..9a33dd57ad 100755 --- a/src/ansiblelint/__main__.py +++ b/src/ansiblelint/__main__.py @@ -73,7 +73,7 @@ def emit(self, record: logging.LogRecord) -> None: console_stderr.print(f"[dim]{msg}[/dim]", highlight=False) except RecursionError: # See issue 36272 raise - except Exception: # pylint: disable=broad-exception-caught + except Exception: # pylint: disable=broad-exception-caught # noqa:BLE001 self.handleError(record) diff --git a/src/ansiblelint/_internal/rules.py b/src/ansiblelint/_internal/rules.py index 4b490ca8e7..48c6bf6ace 100644 --- a/src/ansiblelint/_internal/rules.py +++ b/src/ansiblelint/_internal/rules.py @@ -87,7 +87,7 @@ def getmatches(self, file: Lintable) -> list[MatchError]: for method in [self.matchlines, self.matchtasks, self.matchyaml]: try: matches.extend(method(file)) - except Exception as exc: # pylint: disable=broad-except + except Exception as exc: # pylint: disable=broad-except # noqa:BLE001 _logger.warning( "Ignored exception from %s.%s while processing %s: %s", self.__class__.__name__, diff --git a/src/ansiblelint/config.py b/src/ansiblelint/config.py index f1ac30f646..de232304ac 100644 --- a/src/ansiblelint/config.py +++ b/src/ansiblelint/config.py @@ -228,7 +228,7 @@ def guess_install_method() -> str: logging.debug("Skipping %s as it is not installed.", package_name) use_pip = False # pylint: disable=broad-except - except Exception as exc: + except Exception as exc: # noqa:BLE001 # On Fedora 36, we got a AttributeError exception from pip that we want to avoid logging.debug(exc) use_pip = False diff --git a/src/ansiblelint/utils.py b/src/ansiblelint/utils.py index 3317544d15..512f9f9fc4 100644 --- a/src/ansiblelint/utils.py +++ b/src/ansiblelint/utils.py @@ -999,7 +999,7 @@ def is_playbook(filename: str) -> bool: try: f = parse_yaml_from_file(filename) - except Exception as exc: # pylint: disable=broad-except + except Exception as exc: # pylint: disable=broad-except # noqa:BLE001 _logger.warning( "Failed to load %s with %s, assuming is not a playbook.", filename, diff --git a/src/ansiblelint/version.py b/src/ansiblelint/version.py index 4967ced0e5..99340c3c2b 100644 --- a/src/ansiblelint/version.py +++ b/src/ansiblelint/version.py @@ -6,7 +6,7 @@ import pkg_resources __version__ = pkg_resources.get_distribution("ansible-lint").version - except Exception: # pylint: disable=broad-except + except Exception: # pylint: disable=broad-except # noqa:BLE001 # this is the fallback SemVer version picked by setuptools_scm when tag # information is not available. __version__ = "0.1.dev1"