Import cleanup #520

Closed
wants to merge 9 commits into
from
Commits on Sep 6, 2012
  1. @kkress
  2. @kkress

    based on comments, adding back in the function level imports. First r…

    kkress committed Sep 6, 2012
    …ound will ignore those and do a sweep later to clean them up
Commits on Sep 8, 2012
  1. @kkress

    * r2/model is nearly complete. Still need to convert to using decerators

    kkress committed Sep 8, 2012
    * r2/controllers no longer has any global imports
    * r2/controllers is not in final state, but closer
    * added missing r2admin prototype send_system_message to admintools
    * fixed what looked like a typo in ipn.py : verify_ipn
    * fixed what looked like a typo in promotecontroller.py : POST_edit_promo
  2. @kkress

    Second round of pylint based changes to primarily r2.lib to ensure th…

    kkress committed Sep 8, 2012
    …at the
    
    new model import changes don't cause other libraries that used to use model *
    to break.  Who knows what imports they relied on before.
Commits on Sep 9, 2012
  1. @kkress

    Round 2 of import updates

    kkress committed Sep 9, 2012
    * Added @export decorator
    * Fixed @memoize and @wraps_api to use functools @wraps to ensure __name__ and
      __module__ are preserved
    * refactored a few files to handle cycles
    * added test_imports.py to allow 'compiling' all the python files and ensure
      they
    * r2.config up to import snuff
    * r2.controllers up to import snuff
    * removed large import blocks and replaced with use of <module>.<symbol> style
    * Fixed a lot of kw args with a key = value style to use key=value (only fixed
      where other change was needed)
    * Started work on r2.lib, but not finished yet
  2. @kkress

    Merge remote-tracking branch 'upstream/master' into import-cleanup

    kkress committed Sep 9, 2012
    Conflicts:
    	r2/r2/config/templates.py
    	r2/r2/controllers/__init__.py
    	r2/r2/controllers/api.py
    	r2/r2/controllers/errors.py
    	r2/r2/controllers/front.py
    	r2/r2/controllers/promotecontroller.py
    	r2/r2/controllers/validator/validator.py
    	r2/r2/lib/app_globals.py
    	r2/r2/lib/pages/pages.py
    	r2/r2/lib/utils/utils.py
    	r2/r2/models/builder.py
    	r2/r2/models/listing.py
    	r2/r2/models/modaction.py
    	r2/r2/models/query_cache.py
    	r2/r2/models/subreddit.py
    	r2/r2/models/vote.py
    
    merge and update the files in wiki changes to meet new standards
  3. @kkress

    Fixed a merge error I missed

    kkress committed Sep 9, 2012
  4. @kkress

    Cleanup of round 2 changes.

    kkress committed Sep 9, 2012
    A number of things were missed in the first set of import changes
    
    * Fix a couple of new lib dirs that need more specific imports
    * Fix a couple instances of things looking for NotFound in models
    * Just export everything from pages.py, its simpler
Commits on Sep 18, 2012
  1. @kkress

    Fix pylint identified issues with imports

    kkress committed Sep 18, 2012
    Mostly just missed <module> prefixes and 1 or 2 missed imports