summaryrefslogtreecommitdiff
path: root/django/core
diff options
context:
space:
mode:
authorcoagulant <baryshev@gmail.com>2013-11-03 01:02:56 +0400
committerTim Graham <timograham@gmail.com>2013-11-02 18:20:39 -0400
commit3bc0d46a840f17dce561daca8a6b8690b2cf5d0a (patch)
treec25954abbde0c4c06af7f862effcd351047cddf9 /django/core
parent2a03a9a9a1c4517be75e72899e545b0bc9dd0688 (diff)
Fixed all E261 warnings
Diffstat (limited to 'django/core')
-rw-r--r--django/core/cache/backends/memcached.py2
-rw-r--r--django/core/files/uploadhandler.py2
-rw-r--r--django/core/handlers/base.py4
-rw-r--r--django/core/handlers/wsgi.py2
-rw-r--r--django/core/management/__init__.py6
-rw-r--r--django/core/management/commands/inspectdb.py6
-rw-r--r--django/core/urlresolvers.py6
-rw-r--r--django/core/validators.py2
8 files changed, 15 insertions, 15 deletions
diff --git a/django/core/cache/backends/memcached.py b/django/core/cache/backends/memcached.py
index 9b2c5e8bd1..c49c20e59b 100644
--- a/django/core/cache/backends/memcached.py
+++ b/django/core/cache/backends/memcached.py
@@ -60,7 +60,7 @@ class BaseMemcachedCache(six.with_metaclass(BaseMemcachedCacheMethods, BaseCache
# in memcache backends, a negative timeout must be passed.
timeout = -1
- if timeout > 2592000: # 60*60*24*30, 30 days
+ if timeout > 2592000: # 60*60*24*30, 30 days
# See http://code.google.com/p/memcached/wiki/FAQ
# "You can set expire times up to 30 days in the future. After that
# memcached interprets it as a date, and will expire the item after
diff --git a/django/core/files/uploadhandler.py b/django/core/files/uploadhandler.py
index 3bd6993771..4b23d48fb4 100644
--- a/django/core/files/uploadhandler.py
+++ b/django/core/files/uploadhandler.py
@@ -64,7 +64,7 @@ class FileUploadHandler(object):
"""
Base class for streaming upload handlers.
"""
- chunk_size = 64 * 2 ** 10 #: The default chunk size is 64 KB.
+ chunk_size = 64 * 2 ** 10 # : The default chunk size is 64 KB.
def __init__(self, request=None):
self.file_name = None
diff --git a/django/core/handlers/base.py b/django/core/handlers/base.py
index 577cb2176b..bf65687d5c 100644
--- a/django/core/handlers/base.py
+++ b/django/core/handlers/base.py
@@ -189,7 +189,7 @@ class BaseHandler(object):
# Allow sys.exit() to actually exit. See tickets #1023 and #4701
raise
- except: # Handle everything else.
+ except: # Handle everything else.
# Get the exception info now, in case another exception is thrown later.
signals.got_request_exception.send(sender=self.__class__, request=request)
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
@@ -199,7 +199,7 @@ class BaseHandler(object):
for middleware_method in self._response_middleware:
response = middleware_method(request, response)
response = self.apply_response_fixes(request, response)
- except: # Any exception should be gathered and handled
+ except: # Any exception should be gathered and handled
signals.got_request_exception.send(sender=self.__class__, request=request)
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py
index 4c54b3e39d..21cadf48b8 100644
--- a/django/core/handlers/wsgi.py
+++ b/django/core/handlers/wsgi.py
@@ -52,7 +52,7 @@ class LimitedStream(object):
elif size < len(self.buffer):
result = self.buffer[:size]
self.buffer = self.buffer[size:]
- else: # size >= len(self.buffer)
+ else: # size >= len(self.buffer)
result = self.buffer + self._read_limited(size - len(self.buffer))
self.buffer = b''
return result
diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py
index 3516ac330b..de49f5e241 100644
--- a/django/core/management/__init__.py
+++ b/django/core/management/__init__.py
@@ -121,7 +121,7 @@ def get_commands():
_commands.update(dict((name, app_name)
for name in find_commands(path)))
except ImportError:
- pass # No management module - ignore this app
+ pass # No management module - ignore this app
return _commands
@@ -379,12 +379,12 @@ class ManagementUtility(object):
options, args = parser.parse_args(self.argv)
handle_default_options(options)
except: # Needed because parser.parse_args can raise SystemExit
- pass # Ignore any option errors at this point.
+ pass # Ignore any option errors at this point.
try:
subcommand = self.argv[1]
except IndexError:
- subcommand = 'help' # Display help if no arguments were given.
+ subcommand = 'help' # Display help if no arguments were given.
if subcommand == 'help':
if len(args) <= 2:
diff --git a/django/core/management/commands/inspectdb.py b/django/core/management/commands/inspectdb.py
index 89549dc3c1..a24ae2b51e 100644
--- a/django/core/management/commands/inspectdb.py
+++ b/django/core/management/commands/inspectdb.py
@@ -66,9 +66,9 @@ class Command(NoArgsCommand):
indexes = connection.introspection.get_indexes(cursor, table_name)
except NotImplementedError:
indexes = {}
- used_column_names = [] # Holds column names used in the table so far
+ used_column_names = [] # Holds column names used in the table so far
for i, row in enumerate(connection.introspection.get_table_description(cursor, table_name)):
- comment_notes = [] # Holds Field notes, to be displayed in a Python comment.
+ comment_notes = [] # Holds Field notes, to be displayed in a Python comment.
extra_params = OrderedDict() # Holds Field parameters such as 'db_column'.
column_name = row[0]
is_relation = i in relations
@@ -112,7 +112,7 @@ class Command(NoArgsCommand):
# Add 'null' and 'blank', if the 'null_ok' flag was present in the
# table description.
- if row[6]: # If it's NULL...
+ if row[6]: # If it's NULL...
if field_type == 'BooleanField(':
field_type = 'NullBooleanField('
else:
diff --git a/django/core/urlresolvers.py b/django/core/urlresolvers.py
index 723fe626be..76b50916e0 100644
--- a/django/core/urlresolvers.py
+++ b/django/core/urlresolvers.py
@@ -24,9 +24,9 @@ from django.utils import six
from django.utils.translation import get_language
-_resolver_cache = {} # Maps URLconf modules to RegexURLResolver instances.
-_ns_resolver_cache = {} # Maps namespaces to RegexURLResolver instances.
-_callable_cache = {} # Maps view and url pattern names to their view functions.
+_resolver_cache = {} # Maps URLconf modules to RegexURLResolver instances.
+_ns_resolver_cache = {} # Maps namespaces to RegexURLResolver instances.
+_callable_cache = {} # Maps view and url pattern names to their view functions.
# SCRIPT_NAME prefixes for each thread are stored here. If there's no entry for
# the current thread (which is the only one we ever access), it is assumed to
diff --git a/django/core/validators.py b/django/core/validators.py
index cf5ec7aa77..695dda258b 100644
--- a/django/core/validators.py
+++ b/django/core/validators.py
@@ -86,7 +86,7 @@ class EmailValidator(object):
code = 'invalid'
user_regex = re.compile(
r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*$" # dot-atom
- r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"$)', # quoted-string
+ r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"$)', # quoted-string
re.IGNORECASE)
domain_regex = re.compile(
r'(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}|[A-Z0-9-]{2,})$' # domain