summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-10-28 12:13:22 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2022-10-28 12:13:22 +0200
commit638fc6d6e0af312d68f98aaf624a7312b75cf36e (patch)
tree446545392dc81cd3e7595f1c645afe72330000ae /python
parentpython: apply black formatting (diff)
downloadfrr-638fc6d6e0af312d68f98aaf624a7312b75cf36e.tar.xz
frr-638fc6d6e0af312d68f98aaf624a7312b75cf36e.zip
python: fix a bunch of pylint warnings in clippy
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'python')
-rw-r--r--python/clippy/elf.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/python/clippy/elf.py b/python/clippy/elf.py
index 5aaba832a..d4d1f4cb8 100644
--- a/python/clippy/elf.py
+++ b/python/clippy/elf.py
@@ -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)