Skip to content

Commit

Permalink
format: pep8 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
svinota committed Oct 27, 2023
1 parent 655ac2e commit d7e0e63
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pyroute2/ethtool/ioctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,12 @@ def get_statistics(self):
"""Statistics in raw format, without names"""
if not self.stat_names:
self.stat_names = self.get_stringset(set_id=ETH_SS_STATS)
gstats = generate_EthtoolGStats(len(self.stat_names))(cmd=ETHTOOL_GSTATS)
self.ifreq.gstats = ctypes.cast(ctypes.pointer(gstats), ctypes.POINTER(None))
gstats = generate_EthtoolGStats(len(self.stat_names))(
cmd=ETHTOOL_GSTATS
)
self.ifreq.gstats = ctypes.cast(
ctypes.pointer(gstats), ctypes.POINTER(None)
)
self.ioctl()
assert len(self.stat_names) == len(gstats.data)
return list(zip(self.stat_names, gstats.data))
Expand All @@ -510,7 +514,9 @@ def get_stringset(
gstrings = EthtoolGstringsType(
cmd=ETHTOOL_GSTRINGS, string_set=set_id, len=gstrings_length
)
self.ifreq.gstrings = ctypes.cast(ctypes.pointer(gstrings), ctypes.POINTER(None))
self.ifreq.gstrings = ctypes.cast(
ctypes.pointer(gstrings), ctypes.POINTER(None)
)
self.ioctl()

strings_found = []
Expand Down

0 comments on commit d7e0e63

Please sign in to comment.