mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-11 11:21:07 +00:00
python: fix a bunch of pylint warnings in clippy
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
00f0c39903
commit
638fc6d6e0
@ -155,6 +155,10 @@ class ELFDissectData(object):
|
|||||||
Common bits for ELFDissectStruct and ELFDissectUnion
|
Common bits for ELFDissectStruct and ELFDissectUnion
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self._data = None
|
||||||
|
self.elfclass = None
|
||||||
|
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
"""
|
"""
|
||||||
Used for boolean evaluation, e.g. "if struct: ..."
|
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.
|
needed anymore and may be borked now. Remove this comment when using.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
members = {}
|
||||||
|
|
||||||
def __init__(self, dataptr, parent=None):
|
def __init__(self, dataptr, parent=None):
|
||||||
self._dataptr = dataptr
|
self._dataptr = dataptr
|
||||||
self._parent = parent
|
self._parent = parent
|
||||||
@ -440,8 +446,16 @@ class ELFSubset(object):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
|
self.name = None
|
||||||
|
self._obj = None
|
||||||
|
self._elffile = None
|
||||||
|
self.ptrtype = None
|
||||||
|
self.endian = None
|
||||||
self._pointers = WeakValueDictionary()
|
self._pointers = WeakValueDictionary()
|
||||||
|
|
||||||
|
def _wrap_data(self, data, dstsect):
|
||||||
|
raise NotImplementedError()
|
||||||
|
|
||||||
def __hash__(self):
|
def __hash__(self):
|
||||||
return hash(self.name)
|
return hash(self.name)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user