mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
Fixed a number of lint warnings, particularly around unused variables.
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import os
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.cache import get_cache
|
||||
from django.core.cache.backends.db import BaseDatabaseCache
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.db.backends.sqlite3.creation import DatabaseCreation
|
||||
|
||||
|
||||
class SpatiaLiteCreation(DatabaseCreation):
|
||||
|
||||
def create_test_db(self, verbosity=1, autoclobber=False):
|
||||
@@ -53,8 +55,6 @@ class SpatiaLiteCreation(DatabaseCreation):
|
||||
interactive=False,
|
||||
database=self.connection.alias)
|
||||
|
||||
from django.core.cache import get_cache
|
||||
from django.core.cache.backends.db import BaseDatabaseCache
|
||||
for cache_alias in settings.CACHES:
|
||||
cache = get_cache(cache_alias)
|
||||
if isinstance(cache, BaseDatabaseCache):
|
||||
@@ -62,7 +62,7 @@ class SpatiaLiteCreation(DatabaseCreation):
|
||||
|
||||
# Get a cursor (even though we don't need one yet). This has
|
||||
# the side effect of initializing the test database.
|
||||
cursor = self.connection.cursor()
|
||||
self.connection.cursor()
|
||||
|
||||
return test_database_name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user