summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-06-15 10:37:14 -0400
committerTim Graham <timograham@gmail.com>2015-06-15 11:27:09 -0400
commit47fcbe506c04019a12e16221843e25a52249b1ab (patch)
tree0ad523fef8859042a09b3de8dc3977ae48c23701 /django
parentccfb5c74083ac565c66a2d0cfe11e60e7d1c8337 (diff)
Fixed flake8 warnings on Python 3.
Diffstat (limited to 'django')
-rw-r--r--django/db/backends/oracle/operations.py2
-rw-r--r--django/db/utils.py2
-rw-r--r--django/utils/functional.py2
-rw-r--r--django/utils/html.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/django/db/backends/oracle/operations.py b/django/db/backends/oracle/operations.py
index ed42fcb3cf..1cd17a2af1 100644
--- a/django/db/backends/oracle/operations.py
+++ b/django/db/backends/oracle/operations.py
@@ -245,7 +245,7 @@ WHEN (new.%(col_name)s IS NULL)
# http://cx-oracle.sourceforge.net/html/cursor.html#Cursor.statement
# The DB API definition does not define this attribute.
statement = cursor.statement
- if statement and six.PY2 and not isinstance(statement, unicode):
+ if statement and six.PY2 and not isinstance(statement, unicode): # NOQA: unicode undefined on PY3
statement = statement.decode('utf-8')
# Unlike Psycopg's `query` and MySQLdb`'s `_last_executed`, CxOracle's
# `statement` doesn't contain the query parameters. refs #20010.
diff --git a/django/db/utils.py b/django/db/utils.py
index 534a4d5c20..8a27fdc0e2 100644
--- a/django/db/utils.py
+++ b/django/db/utils.py
@@ -17,7 +17,7 @@ DEFAULT_DB_ALIAS = 'default'
DJANGO_VERSION_PICKLE_KEY = '_django_version'
-class Error(Exception if six.PY3 else StandardError):
+class Error(Exception if six.PY3 else StandardError): # NOQA: StandardError undefined on PY3
pass
diff --git a/django/utils/functional.py b/django/utils/functional.py
index f3a36b318d..84f4227784 100644
--- a/django/utils/functional.py
+++ b/django/utils/functional.py
@@ -285,7 +285,7 @@ class LazyObject(object):
__bool__ = new_method_proxy(bool)
else:
__str__ = new_method_proxy(str)
- __unicode__ = new_method_proxy(unicode)
+ __unicode__ = new_method_proxy(unicode) # NOQA: unicode undefined on PY3
__nonzero__ = new_method_proxy(bool)
# Introspection support
diff --git a/django/utils/html.py b/django/utils/html.py
index cafc3ab6e1..bbdc03f3c6 100644
--- a/django/utils/html.py
+++ b/django/utils/html.py
@@ -380,7 +380,7 @@ def html_safe(klass):
)
klass_unicode = klass.__unicode__
klass.__unicode__ = lambda self: mark_safe(klass_unicode(self))
- klass.__html__ = lambda self: unicode(self)
+ klass.__html__ = lambda self: unicode(self) # NOQA: unicode undefined on PY3
else:
if '__str__' not in klass.__dict__:
raise ValueError(