misc: apply double-quote-string-fixer (#79788)

This commit is contained in:
Valentin Deniaud 2023-08-16 10:12:11 +02:00
parent 8c135dd5da
commit 346e0a4d72
4 changed files with 14 additions and 14 deletions

View File

@ -1 +1 @@
__version__ = "0.4.3"
__version__ = '0.4.3'

View File

@ -29,7 +29,7 @@ def start_timestamp():
# {% querystring %} bits originally from django-tables2.
kwarg_re = re.compile(r"(?:(.+)=)?(.+)")
kwarg_re = re.compile(r'(?:(.+)=)?(.+)')
def token_kwargs(bits, parser):
@ -66,11 +66,11 @@ class QuerystringNode(template.Node):
for key, value in self.updates.items():
key = key.resolve(context)
value = value.resolve(context)
if key not in ("", None):
if key not in ('', None):
params[key] = value
for removal in self.removals:
params.pop(removal.resolve(context), None)
return escape("?" + urlencode(params, doseq=True))
return escape('?' + urlencode(params, doseq=True))
@register.tag
@ -93,7 +93,7 @@ def querystring(parser, token):
updates = token_kwargs(bits, parser)
# ``bits`` should now be empty of a=b pairs, it should either be empty, or
# have ``without`` arguments.
if bits and bits.pop(0) != "without":
if bits and bits.pop(0) != 'without':
raise TemplateSyntaxError("Malformed arguments to '%s'" % tag)
removals = [parser.compile_filter(bit) for bit in bits]
return QuerystringNode(updates, removals)

View File

@ -21,7 +21,7 @@ inkscape = os.path.abspath(os.path.join(os.path.dirname(__file__), 'inkscape_wra
class eo_sdist(sdist):
def run(self):
print("creating VERSION file")
print('creating VERSION file')
if os.path.exists('VERSION'):
os.remove('VERSION')
version = get_version()
@ -29,7 +29,7 @@ class eo_sdist(sdist):
version_file.write(version)
version_file.close()
sdist.run(self)
print("removing VERSION file")
print('removing VERSION file')
if os.path.exists('VERSION'):
os.remove('VERSION')

View File

@ -3,7 +3,7 @@ import os
DATABASES = {
'default': {
'ENGINE': os.environ.get('DB_ENGINE', 'django.db.backends.postgresql_psycopg2'),
'NAME': 'gadjo-test-%s' % os.environ.get("BRANCH_NAME", "").replace('/', '-')[:45],
'NAME': 'gadjo-test-%s' % os.environ.get('BRANCH_NAME', '').replace('/', '-')[:45],
}
}
@ -25,13 +25,13 @@ TEMPLATES = [
DEBUG = True
USE_TZ = True
INSTALLED_APPS = [
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sites",
"gadjo",
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sites',
'gadjo',
]
STATIC_URL = "/static/"
STATIC_URL = '/static/'
SITE_ID = 1
MIDDLEWARE_CLASSES = ()
LOGGING = {}
SECRET_KEY = "yay"
SECRET_KEY = 'yay'