diff options
| author | Tim Graham <timograham@gmail.com> | 2015-06-15 10:37:14 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-06-15 13:01:41 -0400 |
| commit | 062ce508b0edcb3a2e801d7959e08207bd8d2a1e (patch) | |
| tree | cde48b14db8ce70cdfb73e787f6c28aaa8bee1a9 /django | |
| parent | 53323a5c23231501a840deb8d2296b0508405d4d (diff) | |
[1.8.x] Fixed flake8 warnings on Python 3.
Backport of 47fcbe506c04019a12e16221843e25a52249b1ab from master
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/backends/oracle/operations.py | 2 | ||||
| -rw-r--r-- | django/db/utils.py | 2 | ||||
| -rw-r--r-- | django/utils/functional.py | 2 | ||||
| -rw-r--r-- | django/utils/html.py | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/django/db/backends/oracle/operations.py b/django/db/backends/oracle/operations.py index 02fd6fcc7d..fe90ca894d 100644 --- a/django/db/backends/oracle/operations.py +++ b/django/db/backends/oracle/operations.py @@ -235,7 +235,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 4ce7030eb3..d8aa34d30f 100644 --- a/django/db/utils.py +++ b/django/db/utils.py @@ -19,7 +19,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 e3875a2c51..81bcb17b97 100644 --- a/django/utils/functional.py +++ b/django/utils/functional.py @@ -310,7 +310,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 eabbb16467..837a17f171 100644 --- a/django/utils/html.py +++ b/django/utils/html.py @@ -388,7 +388,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( |
