aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2024-01-02 12:49:06 -0500
committerMike Frysinger <vapier@gentoo.org>2024-01-02 12:49:06 -0500
commitc899a5a007c28c8b9005d142f8c7b539e097d5b3 (patch)
treeeeae57a60ed3bafd6d646f8cf228eed0e326a3c7
parentlddtree: use older Python typing style (diff)
downloadpax-utils-c899a5a007c28c8b9005d142f8c7b539e097d5b3.tar.gz
pax-utils-c899a5a007c28c8b9005d142f8c7b539e097d5b3.tar.bz2
pax-utils-c899a5a007c28c8b9005d142f8c7b539e097d5b3.zip
lddtree: disable pyelftools pylint import errors
Since pyelftools isn't commonly installed, disable the pylint check by default. Signed-off-by: Mike Frysinger <vapier@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rwxr-xr-xlddtree.py4
1 files changed, 4 insertions, 0 deletions
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"""