summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Gayot <olivier.gayot@sigexec.com>2020-09-13 00:21:42 +0200
committerOlivier Gayot <olivier.gayot@sigexec.com>2020-09-13 00:21:42 +0200
commit1fc6905e87d9e7d25fde60a67f2d5e575123c6ea (patch)
tree07ef88f6becfd27798508f779b69ad3c1b1f3978
parentc54514b283c47f774b0b6e9e22449ee6876ffc51 (diff)
Use f-string instead of + operator to concat strings
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
-rw-r--r--swiftstory/Cards.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/swiftstory/Cards.py b/swiftstory/Cards.py
index 3d314c3..d570f87 100644
--- a/swiftstory/Cards.py
+++ b/swiftstory/Cards.py
@@ -5,12 +5,12 @@ class Cards:
@staticmethod
def get_white_cards(lang):
''' Read the file containing the white cards and return a list of cards '''
- with open('usr/share/swiftstory/lang/' + lang + '/cards/white.json', encoding='utf-8') as fh:
+ with open(f'usr/share/swiftstory/lang/{lang}/cards/white.json', encoding='utf-8') as fh:
return json.load(fh)
@staticmethod
def get_black_cards(lang):
''' Read the file containing the black cards and return a list of cards '''
- with open('usr/share/swiftstory/lang/' + lang + '/cards/black.json', encoding='utf-8') as fh:
+ with open(f'usr/share/swiftstory/lang/{lang}/cards/black.json', encoding='utf-8') as fh:
return json.load(fh)