]> git.puffer.fish Git - matthieu/frr.git/commitdiff
python: fix a bunch of pylint warnings in clippy
authorDavid Lamparter <equinox@opensourcerouting.org>
Fri, 28 Oct 2022 10:13:22 +0000 (11:13 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 28 Oct 2022 10:13:22 +0000 (11:13 +0100)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
python/clippy/elf.py

index 5aaba832a9b44e2bf655f05e84b7f44980d46905..d4d1f4cb8be7762878431fcbf520ec36ff500493 100644 (file)
@@ -155,6 +155,10 @@ class ELFDissectData(object):
     Common bits for ELFDissectStruct and ELFDissectUnion
     """
 
+    def __init__(self):
+        self._data = None
+        self.elfclass = None
+
     def __len__(self):
         """
         Used for boolean evaluation, e.g. "if struct: ..."
@@ -407,6 +411,8 @@ class ELFDissectUnion(ELFDissectData):
     needed anymore and may be borked now.  Remove this comment when using.
     """
 
+    members = {}
+
     def __init__(self, dataptr, parent=None):
         self._dataptr = dataptr
         self._parent = parent
@@ -440,8 +446,16 @@ class ELFSubset(object):
     def __init__(self):
         super().__init__()
 
+        self.name = None
+        self._obj = None
+        self._elffile = None
+        self.ptrtype = None
+        self.endian = None
         self._pointers = WeakValueDictionary()
 
+    def _wrap_data(self, data, dstsect):
+        raise NotImplementedError()
+
     def __hash__(self):
         return hash(self.name)