Skip to content

Commit f38d779

Browse files
committed
Python < 3.6 compat
1 parent 32cc0e7 commit f38d779

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

klaus/repo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def name(self):
4444
@property
4545
def namespaced_name(self):
4646
if self.namespace:
47-
return f"~{self.namespace}/{self.name}"
47+
return "~{}/{}".format(self.namespace, self.name)
4848
else:
4949
return self.name
5050

@@ -365,6 +365,6 @@ def name(self):
365365
@property
366366
def namespaced_name(self):
367367
if self.namespace:
368-
return f"~{self.namespace}/{self.name}"
368+
return "~{}/{}".format(self.namespace, self.name)
369369
else:
370370
return self.name

klaus/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def _get_repo_and_rev(repo, namespace=None, rev=None, path=None):
9393
rev += "/" + path.rstrip("/")
9494

9595
if namespace:
96-
repo_key = f"~{namespace}/{repo}"
96+
repo_key = "~{}/{}".format(namespace, repo)
9797
else:
9898
repo_key = repo
9999
try:
@@ -423,7 +423,7 @@ def render_code(self, render_markup):
423423
force_unicode(self.context["blob_or_tree"].data),
424424
self.context["filename"],
425425
render_markup,
426-
**ctags_args,
426+
**ctags_args
427427
)
428428

429429
def make_template_context(self, *args):

tests/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
TEST_REPO = os.path.abspath("tests/repos/build/test_repo")
1818
TEST_REPO_ROOT = os.path.abspath("tests/repos/build")
19-
TEST_REPO_BASE_URL = f"~{NAMESPACE}/test_repo/"
19+
TEST_REPO_BASE_URL = "~{}/test_repo/".format(NAMESPACE)
2020
UNAUTH_TEST_REPO_URL = UNAUTH_TEST_SERVER + TEST_REPO_BASE_URL
2121
AUTH_TEST_REPO_URL = AUTH_TEST_SERVER + TEST_REPO_BASE_URL
2222

0 commit comments

Comments
 (0)