[meld] meldapp: Remove cyclic import order hacks
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] meldapp: Remove cyclic import order hacks
- Date: Sun, 31 Dec 2017 20:16:21 +0000 (UTC)
commit 41457990902c5d83cf7110f61b8860123f54cc29
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Dec 23 09:27:26 2017 +1000
meldapp: Remove cyclic import order hacks
filediff and meldwindow used to import the module-level app variable,
but don't actually do this any more. As such, we can get rid of our
awful trailing import hackery.
meld/meldapp.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/meld/meldapp.py b/meld/meldapp.py
index a4336aae..7b782e2c 100644
--- a/meld/meldapp.py
+++ b/meld/meldapp.py
@@ -28,6 +28,8 @@ import meld.conf
import meld.preferences
import meld.ui.util
from meld.conf import _
+from meld.filediff import FileDiff
+from meld.meldwindow import MeldWindow
log = logging.getLogger(__name__)
@@ -133,7 +135,7 @@ class MeldApp(Gtk.Application):
self.quit()
def new_window(self):
- window = meldwindow.MeldWindow()
+ window = MeldWindow()
self.add_window(window.widget)
window.widget.meldwindow = window
return window
@@ -370,7 +372,7 @@ class MeldApp(Gtk.Application):
if options.label:
tab.set_labels(options.label)
- if options.outfile and isinstance(tab, filediff.FileDiff):
+ if options.outfile and isinstance(tab, FileDiff):
outfile = make_file_from_command_line(options.outfile)
tab.set_merge_output_file(outfile.get_path())
@@ -392,6 +394,3 @@ class MeldApp(Gtk.Application):
app = MeldApp()
-
-from . import filediff
-from . import meldwindow
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]