From 1f97386318eb33fb48029b2b6d9d45ddcb7cc23f Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Fri, 4 Mar 2016 02:20:07 +0200 Subject: [PATCH] Linting. --- suplemon/editor.py | 2 -- suplemon/main.py | 6 +++--- suplemon/viewer.py | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/suplemon/editor.py b/suplemon/editor.py index 2ffb0fd..5a98621 100644 --- a/suplemon/editor.py +++ b/suplemon/editor.py @@ -3,8 +3,6 @@ Editor class for extending viewer with text editing features. """ -import re - from . import helpers from .line import Line diff --git a/suplemon/main.py b/suplemon/main.py index 0858355..d5fd338 100644 --- a/suplemon/main.py +++ b/suplemon/main.py @@ -615,11 +615,11 @@ def save_file_as(self, file=False): name = self.ui.query("Save as:", f.name) if not name: return False - dir = os.path.dirname(name) - if dir and not os.path.exists(dir): + target_dir = os.path.dirname(name) + if target_dir and not os.path.exists(target_dir): if self.ui.query_bool("The path doesn't exist, do you want to create it?"): self.logger.debug("Creating missing folders in save path.") - os.makedirs(dir) + os.makedirs(target_dir) else: return False f.set_name(name) diff --git a/suplemon/viewer.py b/suplemon/viewer.py index 5b9b166..8be19ad 100644 --- a/suplemon/viewer.py +++ b/suplemon/viewer.py @@ -388,7 +388,7 @@ def render_line_pygments(self, line, pos, x_offset, max_len): def render_line_linelight(self, line, pos, x_offset, max_len): """Render line with naive line based highlighting.""" - x, y = pos + y = pos[1] line_data = line.get_data() line_data = self._prepare_line_for_rendering(line_data, max_len) curs_color = curses.color_pair(self.get_line_color(line)) @@ -396,7 +396,7 @@ def render_line_linelight(self, line, pos, x_offset, max_len): def render_line_normal(self, line, pos, x_offset, max_len): """Render line without any highlighting.""" - x, y = pos + y = pos[1] line_data = line.get_data() line_data = self._prepare_line_for_rendering(line_data, max_len) self.window.addstr(y, x_offset, line_data)