[meld: 5/8] linting
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld: 5/8] linting
- Date: Sun, 27 Mar 2022 00:52:21 +0000 (UTC)
commit c6840efd397244080e319cbe917c22b8c9824939
Author: Roberto Vidal <vidal roberto j gmail com>
Date: Sat Mar 12 14:55:08 2022 +0100
linting
meld/filediff.py | 8 ++++----
meld/meldwindow.py | 11 +++++------
2 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 2ff9aa3c..8b79d9dd 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -1454,8 +1454,10 @@ class FileDiff(Gtk.VBox, MeldDoc):
elif action is SyncpointState.DISABLED:
next_option = self.move_sync_point_opt
-
- self.set_action_enabled("add-sync-point", action != SyncpointState.DISABLED)
+ self.set_action_enabled(
+ "add-sync-point",
+ action != SyncpointState.DISABLED
+ )
if next_option is not current_option:
self.popup_menu.insert(
@@ -2543,7 +2545,6 @@ class FileDiff(Gtk.VBox, MeldDoc):
FileDiff.set_css_name('meld-file-diff')
-
class SyncpointState(Enum):
# The state of a line when a dangling syncpoint can be moved to it
CAN_MOVE = "can_move"
@@ -2557,7 +2558,6 @@ class SyncpointState(Enum):
DISABLED = "disabled"
-
class Syncpoints:
def __init__(self, num_panes: int, comparator):
self._num_panes = num_panes
diff --git a/meld/meldwindow.py b/meld/meldwindow.py
index d5dd6576..e9d30dd1 100644
--- a/meld/meldwindow.py
+++ b/meld/meldwindow.py
@@ -30,7 +30,7 @@ from meld.const import (
FileComparisonMode,
)
from meld.dirdiff import DirDiff
-from meld.filediff import FileDiff, SyncpointState
+from meld.filediff import FileDiff
from meld.melddoc import ComparisonState, MeldDoc
from meld.menuhelpers import replace_menu_section
from meld.newdifftab import NewDiffTab
@@ -121,9 +121,9 @@ class MeldWindow(Gtk.ApplicationWindow):
Gtk.ApplicationWindow.do_realize(self)
app = self.get_application()
- gear_menu = app.get_menu_by_id("gear-menu")
+ menu = app.get_menu_by_id("gear-menu")
self.gear_menu_button.set_popover(
- Gtk.Popover.new_from_model(self.gear_menu_button, gear_menu))
+ Gtk.Popover.new_from_model(self.gear_menu_button, menu))
filter_model = app.get_menu_by_id("text-filter-menu")
self.text_filter_button.set_popover(
@@ -147,7 +147,7 @@ class MeldWindow(Gtk.ApplicationWindow):
"file-filters-changed", self.update_filename_filters),
]
- meld.ui.util.extract_accels_from_menu(gear_menu, self.get_application())
+ meld.ui.util.extract_accels_from_menu(menu, self.get_application())
def update_filename_filters(self, settings):
filter_items_model = Gio.Menu()
@@ -378,9 +378,8 @@ class MeldWindow(Gtk.ApplicationWindow):
if not isinstance(page, FileDiff):
return
- action = page.syncpoint_action()
-
# TODO: recompute menu items
+ # action = page.syncpoint_action()
def append_filediff(
self, gfiles, *, encodings=None, merge_output=None, meta=None):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]