Ticket #26125: 26125.diff

File 26125.diff, 2.2 KB (added by Tim Graham, 8 years ago)
  • django/conf/global_settings.py

    diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py
    index 5128a28..ace9530 100644
    a b from __future__ import unicode_literals  
    66
    77# This is defined here as a do-nothing function because we can't import
    88# django.utils.translation -- that module depends on the settings.
    9 gettext_noop = lambda s: s
     9def gettext_noop(s):
     10    return s
    1011
    1112####################
    1213# CORE             #
  • django/db/backends/base/operations.py

    diff --git a/django/db/backends/base/operations.py b/django/db/backends/base/operations.py
    index 6e5aff1..d68a5aa 100644
    a b class BaseDatabaseOperations(object):  
    204204        according to their own quoting schemes.
    205205        """
    206206        # Convert params to contain Unicode values.
    207         to_unicode = lambda s: force_text(s, strings_only=True, errors='replace')
     207        def to_unicode(s):
     208            return force_text(s, strings_only=True, errors='replace')
    208209        if isinstance(params, (list, tuple)):
    209210            u_params = tuple(to_unicode(val) for val in params)
    210211        elif params is None:
  • setup.cfg

    diff --git a/setup.cfg b/setup.cfg
    index 9ba3316..8579282 100644
    a b install-script = scripts/rpm-install.sh  
    44
    55[flake8]
    66exclude = build,.git,./django/utils/lru_cache.py,./django/utils/six.py,./django/conf/app_template/*,./django/dispatch/weakref_backports.py,./tests/.env,./xmlrunner,tests/view_tests/tests/py3_test_debug.py,tests/template_tests/annotated_tag_function.py
    7 ignore = E123,E128,E402,W503,E731,W601
     7ignore = E123,E128,E402,W503,W601
    88max-line-length = 119
    99
    1010[isort]
  • tests/lookup/tests.py

    diff --git a/tests/lookup/tests.py b/tests/lookup/tests.py
    index 203f254..7e81163 100644
    a b class LookupTests(TestCase):  
    141141    def test_values(self):
    142142        # values() returns a list of dictionaries instead of object instances --
    143143        # and you can specify which fields you want to retrieve.
    144         identity = lambda x: x
     144        def identity(x):
     145            return x
    145146        self.assertQuerysetEqual(Article.objects.values('headline'),
    146147            [
    147148                {'headline': 'Article 5'},
Back to Top