python: Reduce strictness of pylint's duplicate-code check