Fixed a few linter errors

This commit is contained in:
Sumner Evans
2019-10-29 15:04:48 -06:00
parent 5dcebf4957
commit 0680c1bce8
5 changed files with 13 additions and 8 deletions

View File

@@ -267,9 +267,9 @@ with open(output_file, 'w+') as outfile:
[
'"""',
'WARNING: AUTOGENERATED FILE',
'This file was generated by the api_object_generator.py script. Do',
'not modify this file directly, rather modify the script or run it on',
'a new API version.',
'This file was generated by the api_object_generator.py',
'script. Do not modify this file directly, rather modify the',
'script or run it on a new API version.',
'"""',
'',
'from datetime import datetime',

View File

@@ -438,7 +438,8 @@ class AlbumsGrid(Gtk.Overlay):
text='Failed to retrieve albums',
)
self.error_dialog.format_secondary_markup(
f'Getting albums by {type_} failed due to the following error\n\n{e}'
f'Getting albums by {type_} failed due to the following'
f' error\n\n{e}'
)
self.error_dialog.run()
self.error_dialog.destroy()

View File

@@ -87,7 +87,8 @@ class EditFormDialog(Gtk.Dialog):
i += 1
# Add the spin button entries to the content area.
for label, value_field_name, range_config, default_value in self.numeric_fields:
for (label, value_field_name, range_config,
default_value) in self.numeric_fields:
entry_label = Gtk.Label(label=label + ':')
entry_label.set_halign(Gtk.Align.START)
content_grid.attach(entry_label, 0, i, 1, 1)

View File

@@ -270,8 +270,10 @@ class ChromecastPlayer(Player):
self.time_incrementor_running = False
self._can_hotswap_source = False
ChromecastPlayer.cast_status_listener.on_new_cast_status = self.on_new_cast_status
ChromecastPlayer.media_status_listener.on_new_media_status = self.on_new_media_status
ChromecastPlayer.cast_status_listener.on_new_cast_status = (
self.on_new_cast_status)
ChromecastPlayer.media_status_listener.on_new_media_status = (
self.on_new_media_status)
# Set host_ip
# TODO should have a mechanism to update this. Maybe it should be

View File

@@ -175,7 +175,8 @@ class ConfigureServersDialog(Gtk.Dialog):
# Show them, and select the current server.
self.show_all()
if self.selected_server_index is not None and self.selected_server_index >= 0:
if (self.selected_server_index is not None
and self.selected_server_index >= 0):
self.server_list.select_row(
self.server_list.get_row_at_index(self.selected_server_index))