diff options
Diffstat (limited to 'django/core')
| -rw-r--r-- | django/core/cache/backends/base.py | 2 | ||||
| -rw-r--r-- | django/core/cache/backends/memcached.py | 2 | ||||
| -rw-r--r-- | django/core/management/commands/check.py | 2 | ||||
| -rw-r--r-- | django/core/management/commands/makemigrations.py | 4 | ||||
| -rw-r--r-- | django/core/serializers/xml_serializer.py | 4 |
5 files changed, 7 insertions, 7 deletions
diff --git a/django/core/cache/backends/base.py b/django/core/cache/backends/base.py index 26113aaa31..0ffd47bc2a 100644 --- a/django/core/cache/backends/base.py +++ b/django/core/cache/backends/base.py @@ -74,7 +74,7 @@ class BaseCache(object): self.key_prefix = params.get('KEY_PREFIX', '') self.version = params.get('VERSION', 1) - self.key_func = get_key_func(params.get('KEY_FUNCTION', None)) + self.key_func = get_key_func(params.get('KEY_FUNCTION')) def get_backend_timeout(self, timeout=DEFAULT_TIMEOUT): """ diff --git a/django/core/cache/backends/memcached.py b/django/core/cache/backends/memcached.py index af68885641..fdd12a1e16 100644 --- a/django/core/cache/backends/memcached.py +++ b/django/core/cache/backends/memcached.py @@ -24,7 +24,7 @@ class BaseMemcachedCache(BaseCache): self.LibraryValueNotFoundException = value_not_found_exception self._lib = library - self._options = params.get('OPTIONS', None) + self._options = params.get('OPTIONS') @property def _cache(self): diff --git a/django/core/management/commands/check.py b/django/core/management/commands/check.py index 818700e4ed..f50d234f8c 100644 --- a/django/core/management/commands/check.py +++ b/django/core/management/commands/check.py @@ -32,7 +32,7 @@ class Command(BaseCommand): else: app_configs = None - tags = options.get('tags', None) + tags = options.get('tags') if tags: try: invalid_tag = next( diff --git a/django/core/management/commands/makemigrations.py b/django/core/management/commands/makemigrations.py index 2fe220b622..4cd36f3c8a 100644 --- a/django/core/management/commands/makemigrations.py +++ b/django/core/management/commands/makemigrations.py @@ -43,7 +43,7 @@ class Command(BaseCommand): self.dry_run = options.get('dry_run', False) self.merge = options.get('merge', False) self.empty = options.get('empty', False) - self.migration_name = options.get('name', None) + self.migration_name = options.get('name') self.exit_code = options.get('exit_code', False) # Make sure the app they asked for exists @@ -165,7 +165,7 @@ class Command(BaseCommand): if not self.dry_run: # Write the migrations file to the disk. migrations_directory = os.path.dirname(writer.path) - if not directory_created.get(app_label, False): + if not directory_created.get(app_label): if not os.path.isdir(migrations_directory): os.mkdir(migrations_directory) init_path = os.path.join(migrations_directory, "__init__.py") diff --git a/django/core/serializers/xml_serializer.py b/django/core/serializers/xml_serializer.py index 0a301cb946..e8415230d6 100644 --- a/django/core/serializers/xml_serializer.py +++ b/django/core/serializers/xml_serializer.py @@ -23,8 +23,8 @@ class Serializer(base.Serializer): """ def indent(self, level): - if self.options.get('indent', None) is not None: - self.xml.ignorableWhitespace('\n' + ' ' * self.options.get('indent', None) * level) + if self.options.get('indent') is not None: + self.xml.ignorableWhitespace('\n' + ' ' * self.options.get('indent') * level) def start_serialization(self): """ |
