commit: c899a5a007c28c8b9005d142f8c7b539e097d5b3 Author: Mike Frysinger <vapier <AT> chromium <DOT> org> AuthorDate: Tue Jan 2 17:49:06 2024 +0000 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> CommitDate: Tue Jan 2 17:49:06 2024 +0000 URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=c899a5a0
lddtree: disable pyelftools pylint import errors Since pyelftools isn't commonly installed, disable the pylint check by default. Signed-off-by: Mike Frysinger <vapier <AT> chromium.org> Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org> lddtree.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lddtree.py b/lddtree.py index 247e9db..70d755c 100755 --- a/lddtree.py +++ b/lddtree.py @@ -53,6 +53,8 @@ from typing import Any, Dict, Iterable, List, Optional, Tuple, Union, cast assert sys.version_info >= (3, 6), f"Python 3.6+ required, but found {sys.version}" +# Disable import errors for all 3rd party modules. +# pylint: disable=import-error try: import argcomplete except ImportError: @@ -61,6 +63,8 @@ except ImportError: from elftools.common import exceptions from elftools.elf.elffile import ELFFile +# pylint: enable=import-error + def warn(msg: Any, prefix: Optional[str] = "warning") -> None: """Write |msg| to stderr with a |prefix| before it"""