Skip to content

Commit 368da92

Browse files
committed
lint: fix whitespace
This commit only modifies whitespace to make pylint happy. Signed-off-by: Jeff Mahoney <jeffm@suse.com>
1 parent 270f980 commit 368da92

5 files changed

Lines changed: 9 additions & 10 deletions

File tree

‎crash/arch/x86_64.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class x86_64Architecture(CrashArchitecture):
106106
ident = "i386:x86-64"
107107
aliases = ["x86_64"]
108108

109-
_frame_offset : Optional[int] = None
109+
_frame_offset: Optional[int] = None
110110

111111
def __init__(self) -> None:
112112
super(x86_64Architecture, self).__init__()

‎crash/commands/dev.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
class DevCommand(Command):
1818
"""display character and block devices"""
1919

20-
def __init__(self, name : str) -> None:
20+
def __init__(self, name: str) -> None:
2121
parser = ArgumentParser(prog=name)
2222

2323
parser.add_argument('-d', action='store_true', default=False)
2424

2525
super().__init__(name, parser)
2626

27-
def execute(self, args : argparse.Namespace) -> None:
27+
def execute(self, args: argparse.Namespace) -> None:
2828
if args.d:
2929
print("{:^5} {:^16} {:^10} {:^16} {:^5} {:^5} {:^5} {:^5}"
3030
.format("MAJOR", "GENDISK", "NAME", "REQUEST_QUEUE",

‎crash/subsystem/storage/__init__.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def _rq_in_flight(request: gdb.Value) -> bool:
367367
elif struct_has_member(request_s, 'atomic_flags'):
368368
def _rq_in_flight(request: gdb.Value) -> bool:
369369
return (request['atomic_flags'] &
370-
(1 << int(types.enum_rq_atomic_flags_type['REQ_ATOM_STARTED'].enumval)) != 0)
370+
(1 << int(types.enum_rq_atomic_flags_type['REQ_ATOM_STARTED'].enumval)) != 0)
371371
else:
372372
def _rq_in_flight(request: gdb.Value) -> bool:
373373
return request['cmd_flags'] & REQ_STARTED != 0 # type: ignore
@@ -377,4 +377,3 @@ def _rq_in_flight(request: gdb.Value) -> bool:
377377
type_cbs = TypeCallbacks([('struct device_type', _check_types),
378378
('enum req_flag_bits', _export_req_flags),
379379
('struct request', _check_struct_request)])
380-

‎crash/subsystem/storage/blockmq.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class NoQueueError(RuntimeError):
1414
pass
1515

1616
types = Types(['struct request', 'struct request_queue',
17-
'struct sbitmap_queue', 'struct blk_mq_hw_ctx' ])
17+
'struct sbitmap_queue', 'struct blk_mq_hw_ctx'])
1818

1919
def _check_queue_type(queue: gdb.Value) -> None:
2020
if not queue_is_mq(queue):

‎crash/types/slab.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class SlabSLAB(Slab):
213213

214214
BUFCTL_END = ~0 & 0xffffffff
215215

216-
kmem_cache : 'KmemCacheSLAB'
216+
kmem_cache: 'KmemCacheSLAB'
217217

218218
def __init__(self, gdb_obj: gdb.Value, kmem_cache: 'KmemCacheSLAB',
219219
error: bool = False) -> None:
@@ -501,7 +501,7 @@ def check(self, slabtype: int, nid: int) -> int:
501501

502502
class SlabSLUB(Slab):
503503

504-
kmem_cache : 'KmemCacheSLUB'
504+
kmem_cache: 'KmemCacheSLUB'
505505

506506
def __init__(self, gdb_obj: gdb.Value, kmem_cache: 'KmemCacheSLUB') -> None:
507507
super().__init__(gdb_obj, kmem_cache)
@@ -770,7 +770,7 @@ class KmemCacheSLAB(KmemCache):
770770

771771
slab_list_name = {0: "partial", 1: "full", 2: "free"}
772772
slab_list_fullname = {0: "slabs_partial", 1: "slabs_full", 2: "slabs_free"}
773-
buffer_size : int
773+
buffer_size: int
774774

775775
def __init__(self, name: str, gdb_obj: gdb.Value) -> None:
776776
super().__init__(name, gdb_obj)
@@ -1012,7 +1012,7 @@ def ___check_slabs(self, node: gdb.Value, slabtype: int, nid: int,
10121012

10131013
count = errors['num_ok']
10141014
if (count and errors['first_ok'] is not None and
1015-
errors['last_ok'] is not None):
1015+
errors['last_ok'] is not None):
10161016
print(f"{errors['num_ok']} slab objects were ok between "
10171017
f"0x{errors['first_ok']:x} and 0x{errors['last_ok']:x}")
10181018

0 commit comments

Comments
 (0)