Fixed PEP8 violations, replaced pylint disable codes with string representations, and improved brittle unit test