Fix pylint violations from #2129

Link: #2129