Fix pyflakes warnings, add stub for lobject call