Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
legau authored and sergeyklay committed Mar 13, 2023
1 parent 359c37d commit d88db95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
/*.egg-info
/htmlcov
/docs/_build
/.venv
/.vscode

# Python cache.
*.py[cod]
Expand All @@ -31,5 +29,3 @@ __pycache__
# Ignore codecoverage stuff.
.coverage*
coverage.xml


5 changes: 2 additions & 3 deletions environ/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
"""This module handles import compatibility issues."""

from pkgutil import find_loader
import warnings


if find_loader('simplejson'):
import simplejson as json
Expand All @@ -33,14 +31,15 @@ def choose_rediscache_driver():
# django-redis library takes precedence
if find_loader('django_redis'):
return 'django_redis.cache.RedisCache'

# use built-in support if Django 4+
if DJANGO_VERSION is not None and DJANGO_VERSION >= (4, 0):
return 'django.core.cache.backends.redis.RedisCache'

# back compatibility with redis_cache package
return 'redis_cache.RedisCache'


def choose_postgres_driver():
"""Backward compatibility for postgresql driver."""
old_django = DJANGO_VERSION is not None and DJANGO_VERSION < (2, 0)
Expand Down

0 comments on commit d88db95

Please sign in to comment.