Skip to content

Commit

Permalink
Replace f-strings with join
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-Chen-Wang committed Aug 10, 2020
1 parent dcb3323 commit 4a33e7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cachalot/tests/migrations/0001_initial.py
Expand Up @@ -13,7 +13,7 @@ def extra_regular_available_fields():
# TODO Add to module import when Dj40 dropped
from django import VERSION as DJANGO_VERSION
from django.contrib.postgres.fields import JSONField
if float(f"{DJANGO_VERSION[0]}.{DJANGO_VERSION[1]}") > 3.0:
if float(".".join(map(str, DJANGO_VERSION[:2]))) > 3.0:
fields.append(('json', JSONField(null=True, blank=True)))
except ImportError:
pass
Expand Down
2 changes: 1 addition & 1 deletion cachalot/tests/test_utils.py
Expand Up @@ -18,7 +18,7 @@ def setUp(self):
def tearDown(self):
if connection.vendor == 'postgresql':
flush_args = [no_style(), (PostgresModel._meta.db_table,),]
if float(f"{DJANGO_VERSION[0]}.{DJANGO_VERSION[1]}") < 3.1:
if float(".".join(map(str, DJANGO_VERSION[:2]))) < 3.1:
flush_args.append(())
flush_sql_list = connection.ops.sql_flush(*flush_args)
with transaction.atomic():
Expand Down

0 comments on commit 4a33e7b

Please sign in to comment.