checkpatch.pl reports some long lines. Most of them are due to strings that need to be long, or due to python's way to indent files and very long names on some class methods.
Yet, some of them are due to pylint instructions that can also be placed just before the line, or are too indented. Solve such cases. Signed-off-by: Mauro Carvalho Chehab <[email protected]> --- scripts/qmp_helper.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/qmp_helper.py b/scripts/qmp_helper.py index 63f3df2d75c3..80fdaef60214 100755 --- a/scripts/qmp_helper.py +++ b/scripts/qmp_helper.py @@ -199,7 +199,8 @@ def bit(b): def data_add(data, value, num_bytes): """Adds bytes from value inside a bitarray""" - data.extend(value.to_bytes(num_bytes, byteorder="little")) # pylint: disable=E1101 + # pylint: disable=E1101 + data.extend(value.to_bytes(num_bytes, byteorder="little")) def dump_bytearray(name, data): """Does an hexdump of a byte array, grouping in bytes""" @@ -351,7 +352,7 @@ def send_cmd(self, command, args=None, may_open=False, return_error=True, if obj and "return" in obj and not obj["return"]: break - except Exception as e: # pylint: disable=W0718 + except Exception as e: # pylint: disable=W0718 print(f"Command: {command}") print(f"Failed to inject error: {e}.") obj = None @@ -443,7 +444,9 @@ def argparse(parser): validation_bits = ",".join(qmp.VALIDATION_BITS.keys()) gedb_flags_bits = ",".join(qmp.GEDB_FLAGS_BITS.keys()) - g_gen = parser.add_argument_group("Generic Error Data") # pylint: disable=E1101 + # pylint: disable=E1101 + g_gen = parser.add_argument_group("Generic Error Data") + g_gen.add_argument("--block-status", help=f"block status bits: {block_status_bits}") g_gen.add_argument("--raw-data", nargs="+", -- 2.53.0
