[meld] Extract some constants to the correct scope



commit b69bcf69e1dbf041ee32da00d9a20a099475a991
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Dec 31 09:55:34 2017 +1000

    Extract some constants to the correct scope

 meld/misc.py   | 6 ++++--
 meld/vc/svn.py | 6 +++---
 2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/meld/misc.py b/meld/misc.py
index 51951279..712c0a07 100644
--- a/meld/misc.py
+++ b/meld/misc.py
@@ -145,9 +145,11 @@ def make_tool_button_widget(label):
     return hbox
 
 
+MELD_STYLE_SCHEME = "meld-base"
+MELD_STYLE_SCHEME_DARK = "meld-dark"
+
+
 def get_base_style_scheme():
-    MELD_STYLE_SCHEME = "meld-base"
-    MELD_STYLE_SCHEME_DARK = "meld-dark"
 
     global base_style_scheme
 
diff --git a/meld/vc/svn.py b/meld/vc/svn.py
index 6ff20f41..58fbcf04 100644
--- a/meld/vc/svn.py
+++ b/meld/vc/svn.py
@@ -31,6 +31,9 @@ import xml.etree.ElementTree as ElementTree
 from meld.conf import _
 from . import _vc
 
+#: Simple enum constants for differentiating conflict cases.
+CONFLICT_TYPE_MERGE, CONFLICT_TYPE_UPDATE = 1, 2
+
 
 class Vc(_vc.Vc):
 
@@ -101,9 +104,6 @@ class Vc(_vc.Vc):
         if conflict == _vc.CONFLICT_MERGED:
             return path, False
 
-        CONFLICT_TYPE_MERGE = 1
-        CONFLICT_TYPE_UPDATE = 2
-
         # First fine what type of conflict this is by looking at the base
         # we can possibly return straight away!
         conflict_type = None


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]