Fix pylint issues

Unfortunately, R0801 cannot be suppressed locally.