On 06/10/2021 18:51, Kevin Wolf wrote:
Am 06.10.2021 um 15:01 hat Emanuele Giuseppe Esposito geschrieben:
The problem here is that some variables are formatted with
unnecessary spaces to make it prettier and easier to read.
However, pylint complains about those additional spaces.
A solution is to transform them as string with arbitrary spaces,
and then convert it back into a tuple.
Removing the spaces makes it a little bit ugly, and directly
using the string forces us to change the test reference output
accordingly, which will 1) contain ugly weird formatted strings,
2) is not portable if somebody changes the formatting in the test
string.
Signed-off-by: Emanuele Giuseppe Esposito <eespo...@redhat.com>
Changing our logic because of a style checker feels wrong. I'd rather
stick in a line like this before the definitions:
# pylint: disable=bad-whitespace
(Not sure if the syntax of this is entirely correct, but from the
comment in your patch and existing uses in iotests, I think this would
be the line.)
Ok, I will add the line. Same remarks from the previous patch applies:
unfortunately then we disable the warning for the whole file.
Since here (like the previous patch) the error spans on multiple lines,
adding a # pylint: disable= comment on each line is infeasible and ugly.
Emanuele