general: Fix linter issues across the codebase

This commit is contained in:
Paweł Poławski 2024-08-22 10:43:05 +02:00 committed by Brian C. Lane
parent 77a61da760
commit db08c472f3
5 changed files with 10 additions and 10 deletions

View file

@ -71,9 +71,9 @@ def test_mkfs_btrfs_integration(tmp_path, stage_module):
output = subprocess.check_output([
"btrfs", "filesystem", "show", fake_disk_path], encoding="utf-8")
assert f'uuid: {fake_uuid}' in output, \
f'expected UUID not found in: {output}'
f'expected UUID not found in: {output}'
assert f'Label: \'{fake_label}\'' in output, \
f'expected label not found in: {output}'
f'expected label not found in: {output}'
@pytest.mark.parametrize("test_input, expected", [

View file

@ -74,11 +74,11 @@ def test_mkfs_fat_integration(tmp_path, stage_module):
output = subprocess.check_output([
"file", "-s", fake_disk_path], encoding="utf-8")
assert f'serial number 0x{fake_volid}' in output, \
f'expected serial number (volid) not found in: {output}'
f'expected serial number (volid) not found in: {output}'
assert f'label: "{fake_label} "' in output, \
f'expected label not found in: {output}'
f'expected label not found in: {output}'
assert f'FAT ({fat_size} bit)' in output, \
f'expected FAT size not found in: {output}'
f'expected FAT size not found in: {output}'
@pytest.mark.parametrize("test_input, expected", [

View file

@ -71,9 +71,9 @@ def test_mkfs_xfs_integration(tmp_path, stage_module):
output = subprocess.check_output([
"xfs_admin", "-l", "-u", fake_disk_path], encoding="utf-8")
assert f'UUID = {fake_uuid}' in output, \
f'expected UUID not found in: {output}'
f'expected UUID not found in: {output}'
assert f'label = "{fake_label}"' in output, \
f'expected label not found in: {output}'
f'expected label not found in: {output}'
@pytest.mark.parametrize("test_input, expected", [

View file

@ -178,8 +178,8 @@ def create_image_with_partitions(tmp_path):
["parted", "--script", img, "mklabel", "msdos"],
["parted", "--script", img, "mkpart", "primary", "ext4", "1MiB", "10Mib"],
["parted", "--script", img, "mkpart", "primary", "ext4", "10MiB", "19Mib"],
["mkfs.ext4", "-F", "-E", f"offset={1*1024*1024}", img, "9M"],
["mkfs.ext4", "-F", "-E", f"offset={10*1024*1024}", img, "9M"],
["mkfs.ext4", "-F", "-E", f"offset={1 * 1024 * 1024}", img, "9M"],
["mkfs.ext4", "-F", "-E", f"offset={10 * 1024 * 1024}", img, "9M"],
]:
subprocess.check_call(cmd)
return tree, img.name

View file

@ -1069,7 +1069,7 @@ class ManifestFile:
prob = ""
if hasattr(err, 'problem_mark'):
mark = err.problem_mark
prob = f": {err.problem} at line {mark.line+1} (col {mark.column+1})"
prob = f": {err.problem} at line {mark.line + 1} (col {mark.column + 1})"
print(f"Invalid yaml in \"{path}\"{prob}")
sys.exit(1)
else: