Loading django/core/management/commands/syncdb.py +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ class Command(NoArgsCommand): (opts.auto_created and converter(opts.auto_created._meta.db_table) in tables)) manifest = SortedDict( (app_name, filter(model_installed, model_list)) (app_name, list(filter(model_installed, model_list))) for app_name, model_list in all_models ) Loading django/db/models/options.py +1 −1 Original line number Diff line number Diff line Loading @@ -387,7 +387,7 @@ class Options(object): predicates.append(lambda k, v: not k.field.rel.is_hidden()) cache = (self._related_objects_proxy_cache if include_proxy_eq else self._related_objects_cache) return filter(lambda t: all([p(*t) for p in predicates]), cache.items()) return [t for t in cache.items() if all(p(*t) for p in predicates)] def _fill_related_objects_cache(self): cache = SortedDict() Loading django/db/models/query.py +1 −1 Original line number Diff line number Diff line Loading @@ -1107,7 +1107,7 @@ class ValuesListQuerySet(ValuesQuerySet): # If a field list has been specified, use it. Otherwise, use the # full list of fields, including extras and aggregates. if self._fields: fields = list(self._fields) + filter(lambda f: f not in self._fields, aggregate_names) fields = list(self._fields) + [f for f in aggregate_names if f not in self._fields] else: fields = names Loading django/utils/autoreload.py +2 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,8 @@ _win = (sys.platform == "win32") def code_changed(): global _mtimes, _win for filename in filter(lambda v: v, map(lambda m: getattr(m, "__file__", None), sys.modules.values())): filenames = [getattr(m, "__file__", None) for m in sys.modules.values()] for filename in filter(None, filenames): if filename.endswith(".pyc") or filename.endswith(".pyo"): filename = filename[:-1] if filename.endswith("$py.class"): Loading django/utils/ipv6.py +1 −1 Original line number Diff line number Diff line Loading @@ -263,6 +263,6 @@ def _is_shorthand_ip(ip_str): """ if ip_str.count('::') == 1: return True if filter(lambda x: len(x) < 4, ip_str.split(':')): if any(len(x) < 4 for x in ip_str.split(':')): return True return False Loading
django/core/management/commands/syncdb.py +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ class Command(NoArgsCommand): (opts.auto_created and converter(opts.auto_created._meta.db_table) in tables)) manifest = SortedDict( (app_name, filter(model_installed, model_list)) (app_name, list(filter(model_installed, model_list))) for app_name, model_list in all_models ) Loading
django/db/models/options.py +1 −1 Original line number Diff line number Diff line Loading @@ -387,7 +387,7 @@ class Options(object): predicates.append(lambda k, v: not k.field.rel.is_hidden()) cache = (self._related_objects_proxy_cache if include_proxy_eq else self._related_objects_cache) return filter(lambda t: all([p(*t) for p in predicates]), cache.items()) return [t for t in cache.items() if all(p(*t) for p in predicates)] def _fill_related_objects_cache(self): cache = SortedDict() Loading
django/db/models/query.py +1 −1 Original line number Diff line number Diff line Loading @@ -1107,7 +1107,7 @@ class ValuesListQuerySet(ValuesQuerySet): # If a field list has been specified, use it. Otherwise, use the # full list of fields, including extras and aggregates. if self._fields: fields = list(self._fields) + filter(lambda f: f not in self._fields, aggregate_names) fields = list(self._fields) + [f for f in aggregate_names if f not in self._fields] else: fields = names Loading
django/utils/autoreload.py +2 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,8 @@ _win = (sys.platform == "win32") def code_changed(): global _mtimes, _win for filename in filter(lambda v: v, map(lambda m: getattr(m, "__file__", None), sys.modules.values())): filenames = [getattr(m, "__file__", None) for m in sys.modules.values()] for filename in filter(None, filenames): if filename.endswith(".pyc") or filename.endswith(".pyo"): filename = filename[:-1] if filename.endswith("$py.class"): Loading
django/utils/ipv6.py +1 −1 Original line number Diff line number Diff line Loading @@ -263,6 +263,6 @@ def _is_shorthand_ip(ip_str): """ if ip_str.count('::') == 1: return True if filter(lambda x: len(x) < 4, ip_str.split(':')): if any(len(x) < 4 for x in ip_str.split(':')): return True return False