Skip to content

Commit

Permalink
Linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
richrd committed Mar 4, 2016
1 parent 3a62ecd commit 1f97386
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions suplemon/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
Editor class for extending viewer with text editing features.
"""

import re

from . import helpers

from .line import Line
Expand Down
6 changes: 3 additions & 3 deletions suplemon/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions suplemon/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,15 +388,15 @@ 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))
self.window.addstr(y, x_offset, line_data, curs_color)

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)
Expand Down

0 comments on commit 1f97386

Please sign in to comment.