mirror of
https://github.com/django/django.git
synced 2025-04-06 22:46:41 +00:00
Fixed warnings per flake8 7.2.0.
https://github.com/PyCQA/flake8/releases/tag/7.2.0
This commit is contained in:
parent
c1a4fccf53
commit
281910ff8e
@ -37,8 +37,6 @@ def get_srid_info(srid, connection):
|
||||
"""
|
||||
from django.contrib.gis.gdal import SpatialReference
|
||||
|
||||
global _srid_cache
|
||||
|
||||
try:
|
||||
# The SpatialRefSys model for the spatial backend.
|
||||
SpatialRefSys = connection.ops.spatial_ref_sys()
|
||||
|
@ -221,7 +221,6 @@ class BaseDatabaseWrapper:
|
||||
|
||||
def init_connection_state(self):
|
||||
"""Initialize the database connection settings."""
|
||||
global RAN_DB_VERSION_CHECK
|
||||
if self.alias not in RAN_DB_VERSION_CHECK:
|
||||
self.check_database_version_supported()
|
||||
RAN_DB_VERSION_CHECK.add(self.alias)
|
||||
|
@ -82,7 +82,6 @@ def check_errors(fn):
|
||||
|
||||
|
||||
def raise_last_exception():
|
||||
global _exception
|
||||
if _exception is not None:
|
||||
raise _exception[1]
|
||||
|
||||
|
@ -287,7 +287,6 @@ def translation(language):
|
||||
"""
|
||||
Return a translation object in the default 'django' domain.
|
||||
"""
|
||||
global _translations
|
||||
if language not in _translations:
|
||||
_translations[language] = DjangoTranslation(language)
|
||||
return _translations[language]
|
||||
|
@ -487,7 +487,7 @@ class ASGITest(SimpleTestCase):
|
||||
|
||||
# A view that will listen for the cancelled error.
|
||||
async def view(request):
|
||||
nonlocal view_started, view_did_cancel
|
||||
nonlocal view_did_cancel
|
||||
view_started.set()
|
||||
try:
|
||||
await asyncio.sleep(0.1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user