Cleanup pylint sections
This commit is contained in:
parent
312df1ee9d
commit
41b4ffd9fb
1 changed files with 21 additions and 28 deletions
|
|
@ -598,7 +598,6 @@ def disk_attribute_check(state, test_objects) -> None:
|
||||||
|
|
||||||
|
|
||||||
def disk_io_benchmark(state, test_objects, skip_usb=True) -> None:
|
def disk_io_benchmark(state, test_objects, skip_usb=True) -> None:
|
||||||
# pylint: disable=too-many-statements
|
|
||||||
"""Disk I/O benchmark using dd."""
|
"""Disk I/O benchmark using dd."""
|
||||||
LOG.info('Disk I/O Benchmark (dd)')
|
LOG.info('Disk I/O Benchmark (dd)')
|
||||||
aborted = False
|
aborted = False
|
||||||
|
|
@ -623,7 +622,6 @@ def disk_io_benchmark(state, test_objects, skip_usb=True) -> None:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Start benchmark
|
# Start benchmark
|
||||||
if not aborted:
|
|
||||||
std.clear_screen()
|
std.clear_screen()
|
||||||
std.print_report(test.dev.generate_report())
|
std.print_report(test.dev.generate_report())
|
||||||
test.set_status('Working')
|
test.set_status('Working')
|
||||||
|
|
@ -648,6 +646,7 @@ def disk_io_benchmark(state, test_objects, skip_usb=True) -> None:
|
||||||
if aborted:
|
if aborted:
|
||||||
test.set_status('Aborted')
|
test.set_status('Aborted')
|
||||||
test.report.append(std.color_string(' Aborted', 'YELLOW'))
|
test.report.append(std.color_string(' Aborted', 'YELLOW'))
|
||||||
|
break
|
||||||
|
|
||||||
# Update progress after each test
|
# Update progress after each test
|
||||||
state.update_progress_pane()
|
state.update_progress_pane()
|
||||||
|
|
@ -662,7 +661,6 @@ def disk_io_benchmark(state, test_objects, skip_usb=True) -> None:
|
||||||
|
|
||||||
|
|
||||||
def disk_self_test(state, test_objects) -> None:
|
def disk_self_test(state, test_objects) -> None:
|
||||||
# pylint: disable=too-many-statements
|
|
||||||
"""Disk self-test if available."""
|
"""Disk self-test if available."""
|
||||||
LOG.info('Disk Self-Test(s)')
|
LOG.info('Disk Self-Test(s)')
|
||||||
aborted = False
|
aborted = False
|
||||||
|
|
@ -720,7 +718,6 @@ def disk_self_test(state, test_objects) -> None:
|
||||||
|
|
||||||
|
|
||||||
def disk_surface_scan(state, test_objects) -> None:
|
def disk_surface_scan(state, test_objects) -> None:
|
||||||
# pylint: disable=too-many-branches
|
|
||||||
"""Read-only disk surface scan using badblocks."""
|
"""Read-only disk surface scan using badblocks."""
|
||||||
LOG.info('Disk Surface Scan (badblocks)')
|
LOG.info('Disk Surface Scan (badblocks)')
|
||||||
aborted = False
|
aborted = False
|
||||||
|
|
@ -745,15 +742,11 @@ def disk_surface_scan(state, test_objects) -> None:
|
||||||
[None, 'BLUE', None, 'CYAN', None],
|
[None, 'BLUE', None, 'CYAN', None],
|
||||||
sep='',
|
sep='',
|
||||||
)
|
)
|
||||||
#std.print_colored([disk.path.name, disk.description], [None, 'BLUE'])
|
|
||||||
std.print_report(failed_attributes)
|
std.print_report(failed_attributes)
|
||||||
std.print_standard('')
|
std.print_standard('')
|
||||||
|
|
||||||
# Run surface scans
|
# Run surface scans
|
||||||
for test in reversed(test_objects):
|
for test in reversed([test for test in test_objects if not test.disabled]):
|
||||||
if test.disabled:
|
|
||||||
# Skip
|
|
||||||
continue
|
|
||||||
|
|
||||||
# Start thread
|
# Start thread
|
||||||
test_log = f'{state.log_dir}/{test.dev.path.name}_badblocks.log'
|
test_log = f'{state.log_dir}/{test.dev.path.name}_badblocks.log'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue