summaryrefslogtreecommitdiffstats
path: root/qa/base.py
diff options
context:
space:
mode:
authorJoris Roovers <joris.roovers@gmail.com>2020-10-31 12:04:37 +0100
committerJoris Roovers <joris.roovers@gmail.com>2020-11-01 10:58:58 +0100
commitec1453728770dc8b8877f7aef888c7ccca5a3d05 (patch)
tree6c412a444cb59dc2696ad1ab3a1ce5f3919fec03 /qa/base.py
parent484117b6261a2a519a572a0a7376bbab4fe15aa7 (diff)
Replace format() with f-strings
Replaces most occurences for format() with f-strings (supported since Python 3.6) - this makes for more readable code in most cases. Relates to #151
Diffstat (limited to 'qa/base.py')
-rw-r--r--qa/base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/qa/base.py b/qa/base.py
index 02118d7..2dd2715 100644
--- a/qa/base.py
+++ b/qa/base.py
@@ -57,7 +57,8 @@ class BaseTestCase(TestCase):
@classmethod
def generate_temp_path(cls):
- return os.path.realpath("/tmp/gitlint-test-{0}".format(datetime.now().strftime("%Y%m%d-%H%M%S-%f")))
+ timestamp = datetime.now().strftime("%Y%m%d-%H%M%S-%f")
+ return os.path.realpath(f"/tmp/gitlint-test-{timestamp}")
@classmethod
def create_tmp_git_repo(cls):