Skip to content

Commit a79acec

Browse files
committed
Use str.format rather than %-formatting for consistency
1 parent 76214dd commit a79acec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Form/formactions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ def __init__(self, dbstate, uistate, track, citation):
9999

100100
self.actions_module = None
101101
# for security reasons provide the full path to the actions_module .py file
102-
full_path = os.path.join(os.path.dirname(__file__), '%s.py' % self.form_id)
102+
full_path = os.path.join(os.path.dirname(__file__), '{form_id}.py'.format(form_id=self.form_id))
103103
if os.path.exists(full_path):
104104
# temporarily modify sys.path so that any import statements in the module get processed correctly
105105
sys.path.insert(0, os.path.dirname(__file__))
106106
try:
107-
spec = importlib.util.spec_from_file_location('form.actions.%s' % self.form_id, full_path)
107+
spec = importlib.util.spec_from_file_location('form.actions.{form_id}'.format(form_id=self.form_id), full_path)
108108
self.actions_module = importlib.util.module_from_spec(spec)
109109
spec.loader.exec_module(self.actions_module)
110110
except (ValueError, ImportError, SyntaxError) as err:

0 commit comments

Comments
 (0)