Tidy up black formatting

This commit is contained in:
David Smith 2020-12-07 19:59:40 +00:00
parent 5a1941a2e3
commit e708d016de
4 changed files with 7 additions and 9 deletions

View file

@ -13,7 +13,7 @@ from analytical.utils import disable_html, get_required_setting, is_internal_ip
USER_ID_RE = re.compile(r"^\d+$")
INIT_CODE = (
"""<script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script>"""
'<script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script>'
)
SETUP_CODE = """
<script type="text/javascript">

View file

@ -10,11 +10,9 @@ from analytical.utils import disable_html, get_required_setting, is_internal_ip
ACCOUNT_NUMBER_RE = re.compile(r"^\d+$")
SETUP_CODE = (
'<script type="text/javascript" src="{placeholder_url}">'
"</script>".format(
placeholder_url="//dnn506yrbagrg.cloudfront.net/pages/scripts/"
"%(account_nr_1)s/%(account_nr_2)s.js"
)
'<script type="text/javascript" '
'src="//dnn506yrbagrg.cloudfront.net/pages/scripts/%(account_nr_1)s/%(account_nr_2)s.js">'
"</script>"
)
USERVAR_CODE = "CE2.set(%(varnr)d, '%(value)s');"

View file

@ -46,7 +46,7 @@ NO_ALLOW_HASH_CODE = "_gaq.push(['_setAllowHash', false]);"
TRACK_PAGE_VIEW = "_gaq.push(['_trackPageview']);"
ALLOW_LINKER_CODE = "_gaq.push(['_setAllowLinker', true]);"
CUSTOM_VAR_CODE = (
"_gaq.push(['_setCustomVar', %(index)s, '%(name)s', " "'%(value)s', %(scope)s]);"
"_gaq.push(['_setCustomVar', %(index)s, '%(name)s', '%(value)s', %(scope)s]);"
)
SITE_SPEED_CODE = "_gaq.push(['_trackPageLoadTime']);"
ANONYMIZE_IP_CODE = "_gaq.push(['_gat._anonymizeIp']);"

View file

@ -22,12 +22,12 @@ class ChartbeatTagTestCaseNoSites(TestCase):
@override_settings(
INSTALLED_APPS=(
INSTALLED_APPS=[
"analytical",
"django.contrib.sites",
"django.contrib.auth",
"django.contrib.contenttypes",
)
]
)
@override_settings(CHARTBEAT_USER_ID="12345")
class ChartbeatTagTestCaseWithSites(TestCase):