[meld: 4/5] Removed unneeded object class base
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld: 4/5] Removed unneeded object class base
- Date: Thu, 7 Jun 2018 22:44:03 +0000 (UTC)
commit 1c74c99a619b9495ad137d558e2737f111085b9a
Author: Claude Paroz <claude 2xlibre net>
Date: Mon Jun 4 19:47:03 2018 +0200
Removed unneeded object class base
bin/meld | 2 +-
meld/dirdiff.py | 2 +-
meld/filediff.py | 2 +-
meld/filters.py | 2 +-
meld/gutterrendererchunk.py | 2 +-
meld/matchers/helpers.py | 2 +-
meld/meldbuffer.py | 4 ++--
meld/meldwindow.py | 2 +-
meld/misc.py | 2 +-
meld/recent.py | 2 +-
meld/sourceview.py | 4 ++--
meld/task.py | 2 +-
meld/ui/gnomeglade.py | 2 +-
meld/ui/listselector.py | 2 +-
meld/undo.py | 2 +-
meld/vc/_vc.py | 4 ++--
meld/vcview.py | 2 +-
17 files changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/bin/meld b/bin/meld
index 735c3e97..5cd94119 100755
--- a/bin/meld
+++ b/bin/meld
@@ -42,7 +42,7 @@ freeze_support()
def disable_stdout_buffering():
- class Unbuffered(object):
+ class Unbuffered:
def __init__(self, file):
self.file = file
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index 2811d5fb..286171c1 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -210,7 +210,7 @@ class DirDiffTreeStore(tree.DiffTreeStore):
self, ntree, [str, str, object, object, object])
-class CanonicalListing(object):
+class CanonicalListing:
"""Multi-pane lists with canonicalised matching and error detection"""
def __init__(self, n, canonicalize=None):
diff --git a/meld/filediff.py b/meld/filediff.py
index e1a811a7..dae8223b 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -78,7 +78,7 @@ MASK_SHIFT, MASK_CTRL = 1, 2
PANE_LEFT, PANE_RIGHT = -1, +1
-class CursorDetails(object):
+class CursorDetails:
__slots__ = (
"pane", "pos", "line", "offset", "chunk", "prev", "next",
"prev_conflict", "next_conflict",
diff --git a/meld/filters.py b/meld/filters.py
index d6d5ea36..fa53a332 100644
--- a/meld/filters.py
+++ b/meld/filters.py
@@ -18,7 +18,7 @@ import re
from . import misc
-class FilterEntry(object):
+class FilterEntry:
__slots__ = ("label", "active", "filter", "byte_filter", "filter_string")
diff --git a/meld/gutterrendererchunk.py b/meld/gutterrendererchunk.py
index 27213714..7dbc95e3 100644
--- a/meld/gutterrendererchunk.py
+++ b/meld/gutterrendererchunk.py
@@ -77,7 +77,7 @@ def renderer_to_gtk_state(state):
return gtk_state
-class MeldGutterRenderer(object):
+class MeldGutterRenderer:
def set_renderer_defaults(self):
self.set_alignment_mode(GtkSource.GutterRendererAlignmentMode.FIRST)
diff --git a/meld/matchers/helpers.py b/meld/matchers/helpers.py
index 424a30d8..4c8af6a4 100644
--- a/meld/matchers/helpers.py
+++ b/meld/matchers/helpers.py
@@ -38,7 +38,7 @@ class MatcherWorker(multiprocessing.Process):
time.sleep(0)
-class CachedSequenceMatcher(object):
+class CachedSequenceMatcher:
"""Simple class for caching diff results, with LRU-based eviction
Results from the SequenceMatcher are cached and timestamped, and
diff --git a/meld/meldbuffer.py b/meld/meldbuffer.py
index 515400c5..1f483ccd 100644
--- a/meld/meldbuffer.py
+++ b/meld/meldbuffer.py
@@ -218,7 +218,7 @@ class MeldBufferData(GObject.GObject):
return self._mtime == self._disk_mtime
-class BufferLines(object):
+class BufferLines:
"""Gtk.TextBuffer shim with line-based access and optional filtering
This class allows a Gtk.TextBuffer to be treated as a list of lines of
@@ -299,7 +299,7 @@ class BufferLines(object):
return self.buf.get_line_count()
-class BufferAction(object):
+class BufferAction:
"""A helper to undo/redo text insertion/deletion into/from a text buffer"""
def __init__(self, buf, offset, text):
diff --git a/meld/meldwindow.py b/meld/meldwindow.py
index 2d573a89..dbfbc096 100644
--- a/meld/meldwindow.py
+++ b/meld/meldwindow.py
@@ -695,7 +695,7 @@ class MeldWindow(Component):
if isinstance(page, MeldDoc):
return page
- class DummyDoc(object):
+ class DummyDoc:
def __getattr__(self, a):
return lambda *x: None
return DummyDoc()
diff --git a/meld/misc.py b/meld/misc.py
index 9f36111d..21d52915 100644
--- a/meld/misc.py
+++ b/meld/misc.py
@@ -321,7 +321,7 @@ def read_pipe_iter(command, workdir, errorstream, yield_interval=0.1):
this function yields None.
When all the data is read, the entire string is yielded.
"""
- class Sentinel(object):
+ class Sentinel:
def __init__(self):
self.proc = None
diff --git a/meld/recent.py b/meld/recent.py
index 614db747..de780fd2 100644
--- a/meld/recent.py
+++ b/meld/recent.py
@@ -45,7 +45,7 @@ class RecentType(enum.Enum):
Merge = "Merge"
-class RecentFiles(object):
+class RecentFiles:
mime_type = "application/x-meld-comparison"
recent_path = os.path.join(GLib.get_user_data_dir(), "meld")
diff --git a/meld/sourceview.py b/meld/sourceview.py
index 25d5467b..a3f3c21d 100644
--- a/meld/sourceview.py
+++ b/meld/sourceview.py
@@ -51,7 +51,7 @@ def get_custom_encoding_candidates():
return custom_candidates
-class LanguageManager(object):
+class LanguageManager:
manager = GtkSource.LanguageManager()
@@ -76,7 +76,7 @@ class TextviewLineAnimationType(Enum):
stroke = 'stroke'
-class TextviewLineAnimation(object):
+class TextviewLineAnimation:
__slots__ = ("start_mark", "end_mark", "start_rgba", "end_rgba",
"start_time", "duration", "anim_type")
diff --git a/meld/task.py b/meld/task.py
index 23ce9375..6cda396e 100644
--- a/meld/task.py
+++ b/meld/task.py
@@ -19,7 +19,7 @@
import traceback
-class SchedulerBase(object):
+class SchedulerBase:
"""Base class with common functionality for schedulers
Derived classes must implement get_current_task.
diff --git a/meld/ui/gnomeglade.py b/meld/ui/gnomeglade.py
index be093c84..e7d877f2 100644
--- a/meld/ui/gnomeglade.py
+++ b/meld/ui/gnomeglade.py
@@ -22,7 +22,7 @@ import meld.conf
ui_file = meld.conf.ui_file
-class Component(object):
+class Component:
"""Base class for all Gtk.Builder created objects
This class loads the UI file, autoconnects signals, and makes
diff --git a/meld/ui/listselector.py b/meld/ui/listselector.py
index fa4d3d37..af74b4dd 100644
--- a/meld/ui/listselector.py
+++ b/meld/ui/listselector.py
@@ -18,7 +18,7 @@ def with_template_file(template_file):
return add_template
-class TemplateHackMixin(object):
+class TemplateHackMixin:
def get_template_child(self, widget_type, name):
# Taken from an in-progress patch on bgo#701843
diff --git a/meld/undo.py b/meld/undo.py
index e55cedaf..9e7dbc43 100644
--- a/meld/undo.py
+++ b/meld/undo.py
@@ -40,7 +40,7 @@ from gi.repository import GObject
log = logging.getLogger(__name__)
-class GroupAction(object):
+class GroupAction:
"""A group action combines several actions into one logical action.
"""
def __init__(self, seq):
diff --git a/meld/vc/_vc.py b/meld/vc/_vc.py
index 501e2cd3..11ab5d78 100644
--- a/meld/vc/_vc.py
+++ b/meld/vc/_vc.py
@@ -62,7 +62,7 @@ def partition(pred, iterable):
list(itertools.ifilter(pred, t2)))
-class Entry(object):
+class Entry:
# These are labels for possible states of version controlled files;
# not all states have a label to avoid visual clutter.
state_names = {
@@ -124,7 +124,7 @@ class Entry(object):
return entry.state == STATE_IGNORED or entry.isdir
-class Vc(object):
+class Vc:
VC_DIR = None
diff --git a/meld/vcview.py b/meld/vcview.py
index 447357f1..68aef804 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -76,7 +76,7 @@ _temp_dirs, _temp_files = [], []
atexit.register(cleanup_temp)
-class ConsoleStream(object):
+class ConsoleStream:
def __init__(self, textview):
self.textview = textview
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]