Skip to content

Commit 24eeba2

Browse files
felixxmnessita
authored andcommitted
[4.2.x] Fixed warnings per flake8 7.2.0.
https://github.com/PyCQA/flake8/releases/tag/7.2.0 Backport of 281910f from main.
1 parent d5db532 commit 24eeba2

File tree

4 files changed

+0
-5
lines changed

4 files changed

+0
-5
lines changed

django/contrib/gis/db/models/fields.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ def get_srid_info(srid, connection):
3737
"""
3838
from django.contrib.gis.gdal import SpatialReference
3939

40-
global _srid_cache
41-
4240
try:
4341
# The SpatialRefSys model for the spatial backend.
4442
SpatialRefSys = connection.ops.spatial_ref_sys()

django/db/backends/base/base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ def get_new_connection(self, conn_params):
234234

235235
def init_connection_state(self):
236236
"""Initialize the database connection settings."""
237-
global RAN_DB_VERSION_CHECK
238237
if self.alias not in RAN_DB_VERSION_CHECK:
239238
self.check_database_version_supported()
240239
RAN_DB_VERSION_CHECK.add(self.alias)

django/utils/autoreload.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ def wrapper(*args, **kwargs):
8282

8383

8484
def raise_last_exception():
85-
global _exception
8685
if _exception is not None:
8786
raise _exception[1]
8887

django/utils/translation/trans_real.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@ def translation(language):
288288
"""
289289
Return a translation object in the default 'django' domain.
290290
"""
291-
global _translations
292291
if language not in _translations:
293292
_translations[language] = DjangoTranslation(language)
294293
return _translations[language]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy