Reflections on a random project

Project: netflix/Aminator


  • NullHandler for logs.
  • info() on entrance and exit, debug for the innards.
  • use of __all__ = () for .
  • setup.cfg and pbr from Openstack.
  • Docstrings used, and occasional comments in code, including TODO.
  • Sphinx for docs, with its own Makefile.
  • Use of __metaclass__.
  • Uses abstract base class.
  • comma separated imports.
  • Long code lines, but not too long.
  • Deeply nested context managers.
  • When implementing context managers, sometimes they are defined:
def __exit__(self, typ, val, trc):

and at other times:

def __exit__(self, exc_type, exc_value, trace):
  • use of @property decorators.
  • variable names use snake case.
  • Git used. Commit messages are one or two lines.
  • Authors can merge their own code after one review.
  • Pull requests are comprehensively described.
  • Does not use relative imports.