Skip to content

Commit 9d9abbf

Browse files
committed
Convert these string formats to f-strings
1 parent ffebc05 commit 9d9abbf

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

code/ch4_app/ch4_final_video_collector/infrastructure/view_modifiers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def view_method(*args, **kwargs):
2525

2626
if template_file and not isinstance(response_val, dict):
2727
raise Exception(
28-
"Invalid return type {}, we expected a dict as the return value.".format(type(response_val)))
28+
f"Invalid return type {type(response_val)}, we expected a dict as the return value.")
2929

3030
if template_file:
3131
response_val = flask.render_template(template_file, **response_val)

code/ch4_app/ch4_starter_video_collector/infrastructure/view_modifiers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def view_method(*args, **kwargs):
2525

2626
if template_file and not isinstance(response_val, dict):
2727
raise Exception(
28-
"Invalid return type {}, we expected a dict as the return value.".format(type(response_val)))
28+
f"Invalid return type {type(response_val)}, we expected a dict as the return value.")
2929

3030
if template_file:
3131
response_val = flask.render_template(template_file, **response_val)

code/ch5_partials/ch5_final_video_collector/infrastructure/view_modifiers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def view_method(*args, **kwargs):
2525

2626
if template_file and not isinstance(response_val, dict):
2727
raise Exception(
28-
"Invalid return type {}, we expected a dict as the return value.".format(type(response_val)))
28+
f"Invalid return type {type(response_val)}, we expected a dict as the return value.")
2929

3030
if template_file:
3131
response_val = flask.render_template(template_file, **response_val)

code/ch5_partials/ch5_starter_video_collector/infrastructure/view_modifiers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def view_method(*args, **kwargs):
2525

2626
if template_file and not isinstance(response_val, dict):
2727
raise Exception(
28-
"Invalid return type {}, we expected a dict as the return value.".format(type(response_val)))
28+
f"Invalid return type {type(response_val)}, we expected a dict as the return value.")
2929

3030
if template_file:
3131
response_val = flask.render_template(template_file, **response_val)

code/ch6_active_search/ch6_final_video_collector/infrastructure/view_modifiers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def view_method(*args, **kwargs):
2525

2626
if template_file and not isinstance(response_val, dict):
2727
raise Exception(
28-
"Invalid return type {}, we expected a dict as the return value.".format(type(response_val)))
28+
f"Invalid return type {type(response_val)}, we expected a dict as the return value.")
2929

3030
if template_file:
3131
response_val = flask.render_template(template_file, **response_val)

code/ch6_active_search/ch6_starter_video_collector/infrastructure/view_modifiers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def view_method(*args, **kwargs):
2525

2626
if template_file and not isinstance(response_val, dict):
2727
raise Exception(
28-
"Invalid return type {}, we expected a dict as the return value.".format(type(response_val)))
28+
f"Invalid return type {type(response_val)}, we expected a dict as the return value.")
2929

3030
if template_file:
3131
response_val = flask.render_template(template_file, **response_val)

code/ch7_infinite_scroll/ch7_final_video_collector/infrastructure/view_modifiers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def view_method(*args, **kwargs):
2525

2626
if template_file and not isinstance(response_val, dict):
2727
raise Exception(
28-
"Invalid return type {}, we expected a dict as the return value.".format(type(response_val)))
28+
f"Invalid return type {type(response_val)}, we expected a dict as the return value.")
2929

3030
if template_file:
3131
response_val = flask.render_template(template_file, **response_val)

code/ch7_infinite_scroll/ch7_starter_video_collector/infrastructure/view_modifiers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def view_method(*args, **kwargs):
2525

2626
if template_file and not isinstance(response_val, dict):
2727
raise Exception(
28-
"Invalid return type {}, we expected a dict as the return value.".format(type(response_val)))
28+
f"Invalid return type {type(response_val)}, we expected a dict as the return value.")
2929

3030
if template_file:
3131
response_val = flask.render_template(template_file, **response_val)

code/starter_video_collector/infrastructure/view_modifiers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def view_method(*args, **kwargs):
2525

2626
if template_file and not isinstance(response_val, dict):
2727
raise Exception(
28-
"Invalid return type {}, we expected a dict as the return value.".format(type(response_val)))
28+
f"Invalid return type {type(response_val)}, we expected a dict as the return value.")
2929

3030
if template_file:
3131
response_val = flask.render_template(template_file, **response_val)

0 commit comments

Comments
 (0)