Skip to content

Commit 32f1cb7

Browse files
committed
use dict comprehension
1 parent 584723c commit 32f1cb7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

fluent.runtime/fluent/runtime/__init__.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,13 @@ def lookup(self, full_id):
6868
def format(self, message_id, args=None):
6969
if message_id.startswith(TERM_SIGIL):
7070
raise LookupError(message_id)
71-
fluent_args = {}
7271
if args is not None:
73-
for argname, argvalue in args.items():
74-
fluent_args[argname] = native_to_fluent(argvalue)
72+
fluent_args = {
73+
argname: native_to_fluent(argvalue)
74+
for argname, argvalue in args.items()
75+
}
76+
else:
77+
fluent_args = {}
7578

7679
errors = []
7780
resolve = self.lookup(message_id)

0 commit comments

Comments
 (0)