Use f-strings in integrations starting with "F"and"G" (#32150)

* Use f-strings in integrations starting with F

* Use f-strings in tests for integrations starting with F

* Use f-strings in integrations starting with G

* Use f-strings in tests for integrations starting with G

* Fix pylint error

* Fix broken test
This commit is contained in:
springstan authored and GitHub committed 2020-02-24 17:54:20 -08:00
1 parent 496bd3dddf
commit ad102b3840
59 files changed
+219 -344

No files matched your search

+3 -3
View File
@@ -218,7 +218,7 @@ async def test_offset_in_progress_event(hass, mock_next_event):
event = copy.deepcopy(TEST_EVENT)
event["start"]["dateTime"] = start
event["end"]["dateTime"] = end
event["summary"] = "{} !!-15".format(event_summary)
event["summary"] = f"{event_summary} !!-15"
mock_next_event.return_value.event = event
assert await async_setup_component(hass, "google", {"google": GOOGLE_CONFIG})
@@ -250,7 +250,7 @@ async def test_all_day_offset_in_progress_event(hass, mock_next_event):
event = copy.deepcopy(TEST_EVENT)
event["start"]["date"] = start
event["end"]["date"] = end
event["summary"] = "{} !!-25:0".format(event_summary)
event["summary"] = f"{event_summary} !!-25:0"
mock_next_event.return_value.event = event
assert await async_setup_component(hass, "google", {"google": GOOGLE_CONFIG})
@@ -282,7 +282,7 @@ async def test_all_day_offset_event(hass, mock_next_event):
event = copy.deepcopy(TEST_EVENT)
event["start"]["date"] = start
event["end"]["date"] = end
event["summary"] = "{} !!-{}:0".format(event_summary, offset_hours)
event["summary"] = f"{event_summary} !!-{offset_hours}:0"
mock_next_event.return_value.event = event
assert await async_setup_component(hass, "google", {"google": GOOGLE_CONFIG})