refactoring: cleanup a couple of lint warnings in base.py.