[meld] Various lint fixes across the tree
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Various lint fixes across the tree
- Date: Thu, 18 Feb 2021 22:36:25 +0000 (UTC)
commit 0335eada714f90540112c4429b9f21932ab41932
Author: Kai Willadsen <kai willadsen gmail com>
Date: Tue Feb 16 07:14:51 2021 +1000
Various lint fixes across the tree
meld/actiongutter.py | 12 ++++++------
meld/dirdiff.py | 4 ++--
meld/filediff.py | 2 +-
meld/meldapp.py | 4 ++--
meld/misc.py | 30 +++++++++++++++---------------
meld/vc/cvs.py | 2 +-
meld/vc/git.py | 2 +-
setup_win32.py | 18 +++++++++---------
8 files changed, 37 insertions(+), 37 deletions(-)
---
diff --git a/meld/actiongutter.py b/meld/actiongutter.py
index 1cf276da..1abc23db 100644
--- a/meld/actiongutter.py
+++ b/meld/actiongutter.py
@@ -143,12 +143,12 @@ class ActionGutter(Gtk.DrawingArea):
@GObject.Signal
def chunk_action_activated(
- self,
- action: str, # String-ified ChunkAction
- from_view: Gtk.TextView,
- to_view: Gtk.TextView,
- chunk: object,
- ) -> None:
+ self,
+ action: str, # String-ified ChunkAction
+ from_view: Gtk.TextView,
+ to_view: Gtk.TextView,
+ chunk: object,
+ ) -> None:
...
def __init__(self):
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index cf107488..d9b2c26c 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -240,8 +240,8 @@ def _files_same(files, regexes, comparison_args):
EMBLEM_NEW = "emblem-new"
EMBLEM_SYMLINK = "emblem-symbolic-link"
-COL_EMBLEM, COL_EMBLEM_SECONDARY, COL_SIZE, COL_TIME, COL_PERMS, COL_END = \
- range(tree.COL_END, tree.COL_END + 6)
+COL_EMBLEM, COL_EMBLEM_SECONDARY, COL_SIZE, COL_TIME, COL_PERMS, COL_END = (
+ range(tree.COL_END, tree.COL_END + 6))
class DirDiffTreeStore(tree.DiffTreeStore):
diff --git a/meld/filediff.py b/meld/filediff.py
index 03224f0e..41cd14c2 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -2120,7 +2120,7 @@ class FileDiff(Gtk.VBox, MeldDoc):
def queue_draw(self, junk=None):
for t in self.textview:
t.queue_draw()
- for i in range(self.num_panes-1):
+ for i in range(self.num_panes - 1):
self.linkmap[i].queue_draw()
for gutter in self.actiongutter:
gutter.queue_draw()
diff --git a/meld/meldapp.py b/meld/meldapp.py
index dee076ad..128c1ec2 100644
--- a/meld/meldapp.py
+++ b/meld/meldapp.py
@@ -41,8 +41,8 @@ class MeldApp(Gtk.Application):
def __init__(self):
super().__init__(
- application_id=meld.conf.APPLICATION_ID,
- flags=Gio.ApplicationFlags.HANDLES_COMMAND_LINE,
+ application_id=meld.conf.APPLICATION_ID,
+ flags=Gio.ApplicationFlags.HANDLES_COMMAND_LINE,
)
GLib.set_application_name(meld.conf.APPLICATION_NAME)
GLib.set_prgname(meld.conf.APPLICATION_ID)
diff --git a/meld/misc.py b/meld/misc.py
index b0acec55..b7f7ef4f 100644
--- a/meld/misc.py
+++ b/meld/misc.py
@@ -92,12 +92,12 @@ def error_dialog(primary: str, secondary: str) -> Gtk.ResponseType:
def modal_dialog(
- primary: str,
- secondary: str,
- buttons: Union[Gtk.ButtonsType, Sequence[Tuple[str, int]]],
- parent: Optional[Gtk.Window] = None,
- messagetype: Gtk.MessageType = Gtk.MessageType.WARNING
- ) -> Gtk.ResponseType:
+ primary: str,
+ secondary: str,
+ buttons: Union[Gtk.ButtonsType, Sequence[Tuple[str, int]]],
+ parent: Optional[Gtk.Window] = None,
+ messagetype: Gtk.MessageType = Gtk.MessageType.WARNING
+) -> Gtk.ResponseType:
"""A common message dialog handler for Meld
This should only ever be used for interactions that must be resolved
@@ -205,11 +205,11 @@ SubprocessGenerator = Generator[Union[Tuple[int, str], None], None, None]
def read_pipe_iter(
- command: List[str],
- workdir: str,
- errorstream: 'ConsoleStream',
- yield_interval: float = 0.1,
- ) -> SubprocessGenerator:
+ command: List[str],
+ workdir: str,
+ errorstream: 'ConsoleStream',
+ yield_interval: float = 0.1,
+) -> SubprocessGenerator:
"""Read the output of a shell command iteratively.
Each time 'callback_interval' seconds pass without reading any data,
@@ -372,10 +372,10 @@ def merge_intervals(
def apply_text_filters(
- txt: AnyStr,
- regexes: Sequence[Pattern],
- apply_fn: Optional[Callable[[int, int], None]] = None
- ) -> AnyStr:
+ txt: AnyStr,
+ regexes: Sequence[Pattern],
+ apply_fn: Optional[Callable[[int, int], None]] = None
+) -> AnyStr:
"""Apply text filters
Text filters "regexes", resolved as regular expressions are applied
diff --git a/meld/vc/cvs.py b/meld/vc/cvs.py
index a1192af1..a1aad406 100644
--- a/meld/vc/cvs.py
+++ b/meld/vc/cvs.py
@@ -65,7 +65,7 @@ class Vc(_vc.Vc):
relargs = []
for f1 in relfiles:
- positions = [i for i, ch in enumerate(f1+os.sep) if ch == os.sep]
+ positions = [i for i, ch in enumerate(f1 + os.sep) if ch == os.sep]
arg1 = [f1[:pos] for pos in positions]
relargs += arg1
diff --git a/meld/vc/git.py b/meld/vc/git.py
index 473e8590..08d384f6 100644
--- a/meld/vc/git.py
+++ b/meld/vc/git.py
@@ -216,7 +216,7 @@ class Vc(_vc.Vc):
suffix = os.path.splitext(path)[1]
filename, is_temp = self.remerge_with_ancestor(
- local, base, remote, suffix=suffix)
+ local, base, remote, suffix=suffix)
for temp_file in (local, base, remote):
if os.name == "nt":
diff --git a/setup_win32.py b/setup_win32.py
index f8d4bebc..159f0ff4 100755
--- a/setup_win32.py
+++ b/setup_win32.py
@@ -39,10 +39,10 @@ def get_non_python_libs():
inst_lib.append(os.path.join(local_bin, 'gspawn-win64-helper.exe'))
return [
- (f, os.path.basename(f)) for f in inst_root
- ] + [
- (f, os.path.join('lib', os.path.basename(f))) for f in inst_lib
- ]
+ (f, os.path.basename(f)) for f in inst_root
+ ] + [
+ (f, os.path.join('lib', os.path.basename(f))) for f in inst_lib
+ ]
gtk_data_dirs = [
@@ -125,13 +125,13 @@ console_executable_options = dict(executable_options)
if 'mingw' in sysconfig.get_platform():
executable_options.update({
- "base": "Win32GUI", # comment to build console version to see stderr
- "targetName": "Meld.exe",
- "shortcutName": "Meld",
- "shortcutDir": "ProgramMenuFolder",
+ "base": "Win32GUI", # comment to build console version to see stderr
+ "targetName": "Meld.exe",
+ "shortcutName": "Meld",
+ "shortcutDir": "ProgramMenuFolder",
})
console_executable_options.update({
- "targetName": "MeldConsole.exe",
+ "targetName": "MeldConsole.exe",
})
# Copy conf.py in place if necessary
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]