Watch the extraneous whitespace.  Just one line in between methods, two lines in between module-level items.  You may want to install flake8 and run your files through that.  (I use it with a vim plugin and ignore E501 (now F501, I think)).