1. Matthew Schinckel
  2. werkzeug-main


jek  committed 6de8002

clean up various fatal identifier name typos and also tidies unused imports

  • Participants
  • Parent commits ea08c94
  • Branches default

Comments (0)

Files changed (12)

File werkzeug/_internal.py

View file
  • Ignore whitespace
 from weakref import WeakKeyDictionary
 from cStringIO import StringIO
 from Cookie import BaseCookie, Morsel, CookieError
-from time import asctime, gmtime, time
+from time import gmtime
 from datetime import datetime
 def _iter_modules(path):
     """Iterate over all modules in a package."""
+    import os
     import pkgutil
     if hasattr(pkgutil, 'iter_modules'):
         for importer, modname, ispkg in pkgutil.iter_modules(path):

File werkzeug/contrib/cache.py

View file
  • Ignore whitespace
         if isinstance(key, unicode):
             key = key.encode('utf-8')
         if self.key_prefix:
-            key = key_prefix + key
+            key = self.key_prefix + key
         self._client.decr(key, delta)
             for idx, key in enumerate(entries):
                     f = file(self._get_filename(key))
-                    if pickle.load(f) > now and idx % 3 != 0:
+                    if load(f) > now and idx % 3 != 0:

File werkzeug/contrib/iterio.py

View file
  • Ignore whitespace
         self.pos += len(s)
-    def writelines(slf, list):
+    def writelines(self, list):
     def flush(self):

File werkzeug/contrib/jsrouting.py

View file
  • Ignore whitespace
     from simplejson import dumps
 except ImportError:
     def dumps(*args):
-        raise RuntimeErrr('simplejson required for jsrouting')
+        raise RuntimeError('simplejson required for jsrouting')
 from inspect import getmro
 from werkzeug.minitmpl import Template

File werkzeug/contrib/kickstart.py

View file
  • Ignore whitespace
 from werkzeug.templates import Template
 from werkzeug.exceptions import HTTPException
 from werkzeug.routing import RequestRedirect
-from werkzeug.contrib.sessions import FilesystemSessionStore
 __all__ = ['Request', 'Response', 'TemplateNotFound', 'TemplateLoader',
            'GenshiTemplateLoader', 'Application']

File werkzeug/contrib/securecookie.py

View file
  • Ignore whitespace
 from hmac import new as hmac
 from datetime import datetime
 from time import time, mktime, gmtime
-from random import Random
 from werkzeug import url_quote_plus, url_unquote_plus
-from werkzeug.contrib.sessions import ModificationTrackingDict, generate_key
+from werkzeug.contrib.sessions import ModificationTrackingDict
 # rather ugly way to import the correct hash method.  Because

File werkzeug/contrib/sessions.py

View file
  • Ignore whitespace
 import os
 from os import path
 from time import time
-from random import Random, random
+from random import random
     from hashlib import sha1
 except ImportError:

File werkzeug/debug/repr.py

View file
  • Ignore whitespace
 import sys
 import re
-from types import InstanceType
 from traceback import format_exception_only
     from collections import deque

File werkzeug/http.py

View file
  • Ignore whitespace
     frozenset = frozenset
 except NameError:
     from sets import Set as set, ImmutableSet as frozenset
-from werkzeug._internal import _patch_wrapper, _UpdateDict, HTTP_STATUS_CODES
+from werkzeug._internal import _UpdateDict, HTTP_STATUS_CODES
 _accept_re = re.compile(r'([^\s;,]+)(?:[^,]*?;\s*q=(\d*(?:\.\d+)?))?')
         """Indicates what "quality of protection" the client has applied to
         the message for HTTP digest auth."""
         def on_update(header_set):
-            if not header_set and name in self:
+            if not header_set and 'qop' in self:
                 del self['qop']
             elif header_set:
                 self['qop'] = header_set.to_header()

File werkzeug/routing.py

View file
  • Ignore whitespace
                              Thomas Johansson.
     :license: BSD, see LICENSE for more details.
-import sys
 import re
 from urlparse import urljoin
 from itertools import izip

File werkzeug/test.py

View file
  • Ignore whitespace
 from urllib import urlencode
 from cStringIO import StringIO
 from mimetypes import guess_type
-from werkzeug.wrappers import BaseResponse
 from werkzeug.utils import create_environ, run_wsgi_app

File werkzeug/utils.py

View file
  • Ignore whitespace
     def linked(cls, environ):
         raise TypeError('%r object is always linked to environment, '
-                        'no separate initializer' % self.__class__.__name__)
+                        'no separate initializer' % cls.__name__)
     linked = classmethod(linked)
     def __eq__(self, other):