1
0
mirror of https://github.com/django/django.git synced 2025-07-05 18:29:11 +00:00

[4.2.x] Fixed warnings per flake8 7.2.0.

https://github.com/PyCQA/flake8/releases/tag/7.2.0

Backport of 281910ff8e9ae98fa78ee5d26ae3f0b713ccf418 from main.
This commit is contained in:
Mariusz Felisiak 2025-03-30 17:54:15 +02:00 committed by Natalia
parent d5db532077
commit 24eeba2c15
4 changed files with 0 additions and 5 deletions

View File

@ -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()

View File

@ -234,7 +234,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)

View File

@ -82,7 +82,6 @@ def check_errors(fn):
def raise_last_exception():
global _exception
if _exception is not None:
raise _exception[1]

View File

@ -288,7 +288,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]