Commits

Anonymous committed 6de8002

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

Comments (0)

Files changed (12)

werkzeug/_internal.py

 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):

werkzeug/contrib/cache.py

         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):
                 try:
                     f = file(self._get_filename(key))
-                    if pickle.load(f) > now and idx % 3 != 0:
+                    if load(f) > now and idx % 3 != 0:
                         f.close()
                         continue
                 except:

werkzeug/contrib/iterio.py

         self.pos += len(s)
         self._buffer.append(s)
 
-    def writelines(slf, list):
+    def writelines(self, list):
         self.write(''.join(list))
 
     def flush(self):

werkzeug/contrib/jsrouting.py

     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

werkzeug/contrib/kickstart.py

 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']

werkzeug/contrib/securecookie.py

 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

werkzeug/contrib/sessions.py

 import os
 from os import path
 from time import time
-from random import Random, random
+from random import random
 try:
     from hashlib import sha1
 except ImportError:

werkzeug/debug/repr.py

 """
 import sys
 import re
-from types import InstanceType
 from traceback import format_exception_only
 try:
     from collections import deque
     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()

werkzeug/routing.py

                              Thomas Johansson.
     :license: BSD, see LICENSE for more details.
 """
-import sys
 import re
 from urlparse import urljoin
 from itertools import izip
 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
 
 

werkzeug/utils.py

 
     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):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.