Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

autopep8

  • Loading branch information...
commit 81746d9a634fbe93f283ca6eedcb644fcd082864 1 parent 974ef90
@atsuoishimoto atsuoishimoto authored
View
32 kaa/cui/color.py
@@ -289,22 +289,22 @@ class ColorName:
# from tmux color.c
_COLOR256_TO_16 = [
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 0, 4, 4, 4, 12, 12, 2, 6, 4, 4, 12, 12, 2, 2, 6, 4,
- 12, 12, 2, 2, 2, 6, 12, 12, 10, 10, 10, 10, 14, 12, 10, 10,
- 10, 10, 10, 14, 1, 5, 4, 4, 12, 12, 3, 8, 4, 4, 12, 12,
- 2, 2, 6, 4, 12, 12, 2, 2, 2, 6, 12, 12, 10, 10, 10, 10,
- 14, 12, 10, 10, 10, 10, 10, 14, 1, 1, 5, 4, 12, 12, 1, 1,
- 5, 4, 12, 12, 3, 3, 8, 4, 12, 12, 2, 2, 2, 6, 12, 12,
- 10, 10, 10, 10, 14, 12, 10, 10, 10, 10, 10, 14, 1, 1, 1, 5,
- 12, 12, 1, 1, 1, 5, 12, 12, 1, 1, 1, 5, 12, 12, 3, 3,
- 3, 7, 12, 12, 10, 10, 10, 10, 14, 12, 10, 10, 10, 10, 10, 14,
- 9, 9, 9, 9, 13, 12, 9, 9, 9, 9, 13, 12, 9, 9, 9, 9,
- 13, 12, 9, 9, 9, 9, 13, 12, 11, 11, 11, 11, 7, 12, 10, 10,
- 10, 10, 10, 14, 9, 9, 9, 9, 9, 13, 9, 9, 9, 9, 9, 13,
- 9, 9, 9, 9, 9, 13, 9, 9, 9, 9, 9, 13, 9, 9, 9, 9,
- 9, 13, 11, 11, 11, 11, 11, 15, 0, 0, 0, 0, 0, 0, 8, 8,
- 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 15, 15, 15, 15, 15, 15
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 0, 4, 4, 4, 12, 12, 2, 6, 4, 4, 12, 12, 2, 2, 6, 4,
+ 12, 12, 2, 2, 2, 6, 12, 12, 10, 10, 10, 10, 14, 12, 10, 10,
+ 10, 10, 10, 14, 1, 5, 4, 4, 12, 12, 3, 8, 4, 4, 12, 12,
+ 2, 2, 6, 4, 12, 12, 2, 2, 2, 6, 12, 12, 10, 10, 10, 10,
+ 14, 12, 10, 10, 10, 10, 10, 14, 1, 1, 5, 4, 12, 12, 1, 1,
+ 5, 4, 12, 12, 3, 3, 8, 4, 12, 12, 2, 2, 2, 6, 12, 12,
+ 10, 10, 10, 10, 14, 12, 10, 10, 10, 10, 10, 14, 1, 1, 1, 5,
+ 12, 12, 1, 1, 1, 5, 12, 12, 1, 1, 1, 5, 12, 12, 3, 3,
+ 3, 7, 12, 12, 10, 10, 10, 10, 14, 12, 10, 10, 10, 10, 10, 14,
+ 9, 9, 9, 9, 13, 12, 9, 9, 9, 9, 13, 12, 9, 9, 9, 9,
+ 13, 12, 9, 9, 9, 9, 13, 12, 11, 11, 11, 11, 7, 12, 10, 10,
+ 10, 10, 10, 14, 9, 9, 9, 9, 9, 13, 9, 9, 9, 9, 9, 13,
+ 9, 9, 9, 9, 9, 13, 9, 9, 9, 9, 9, 13, 9, 9, 9, 9,
+ 9, 13, 11, 11, 11, 11, 11, 15, 0, 0, 0, 0, 0, 0, 8, 8,
+ 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 15, 15, 15, 15, 15, 15
]
def __init__(self):
View
3  kaa/cui/editor.py
@@ -142,7 +142,8 @@ def on_focus(self):
if self.document:
self.document.mode.on_focus(self)
- def _getcharattrs(self, row, rectangular, selfrom, selto, colfrom, colto, line_overlay):
+ def _getcharattrs(self, row, rectangular, selfrom,
+ selto, colfrom, colto, line_overlay):
# returns character attributes of each characters in row.
ncols = row.colfrom
for pos, cols in zip(row.positions, row.cols):
View
8 kaa/cui/keydef.py
@@ -36,7 +36,7 @@
class KeyEvent:
""" Stores information of keyboard input event.
-
+
Attributes:
wnd -- Windows object of the event
key -- key code returned by curses.
@@ -46,8 +46,8 @@ class KeyEvent:
}
def __init__(self, wnd, key, no_trailing_char):
- """
-
+ """
+
Auguments:
wnd -- Windows object of the event
key -- key code returned by curses.
@@ -70,7 +70,7 @@ def unget(self):
class MouseEvent:
""" Stores information of mouse input event.
-
+
Attributes:
wnd -- Windows object of the event
x, y -- Event coordinates
View
3  kaa/editmode.py
@@ -160,7 +160,8 @@ def on_key_pressed(self, wnd, event):
super().on_key_pressed(wnd, event)
def _get_keybinds(self, wnd):
- return [wnd.document.mode.keybind_vi_commandmode, wnd.document.mode.keybind]
+ return [wnd.document.mode.keybind_vi_commandmode,
+ wnd.document.mode.keybind]
def flush_pending_str(self, wnd):
self.pending_str = ''
View
20 kaa/filetype/default/keybind.py
@@ -180,12 +180,18 @@
pagedown: ('screen.lineselection.begin', 'cursor.pagedown', 'screen.lineselection.set-end'),
pageup: ('screen.lineselection.begin', 'cursor.pageup', 'screen.lineselection.set-end'),
- 'h': ('screen.lineselection.begin', 'cursor.left', 'screen.lineselection.set-end'),
- 'l': ('screen.lineselection.begin', 'cursor.right', 'screen.lineselection.set-end'),
- 'k': ('screen.lineselection.begin', 'cursor.up', 'screen.lineselection.set-end'),
- 'j': ('screen.lineselection.begin', 'cursor.down', 'screen.lineselection.set-end'),
-
- 'gg': ('screen.lineselection.begin', 'cursor.top-of-file', 'screen.lineselection.set-end'),
- 'G': ('screen.lineselection.begin', 'cursor.end-of-file', 'screen.lineselection.set-end'),
+ 'h': ('screen.lineselection.begin', 'cursor.left',
+ 'screen.lineselection.set-end'),
+ 'l': ('screen.lineselection.begin', 'cursor.right',
+ 'screen.lineselection.set-end'),
+ 'k': ('screen.lineselection.begin', 'cursor.up',
+ 'screen.lineselection.set-end'),
+ 'j': ('screen.lineselection.begin', 'cursor.down',
+ 'screen.lineselection.set-end'),
+
+ 'gg': ('screen.lineselection.begin', 'cursor.top-of-file',
+ 'screen.lineselection.set-end'),
+ 'G': ('screen.lineselection.begin', 'cursor.end-of-file',
+ 'screen.lineselection.set-end'),
}
View
4 kaa/filetype/default/modebase.py
@@ -316,7 +316,9 @@ def get_line_overlays(self):
def run_highlight(self):
if self.highlight:
- return self.highlight.update_style(self.document, batch=self.HIGHLIGHTBATCH)
+ return self.highlight.update_style(
+ self.document,
+ batch=self.HIGHLIGHTBATCH)
def _split_chars(self, begin, end):
"""split characters by character category."""
View
3  kaa/screen.py
@@ -96,7 +96,8 @@ def translate_chars(posfrom, chars, tab_width, ambiguous_width):
MIN_WRAPCOLS = 10
-def col_splitter(maxcol, tol, dispchrs, dispcols, positions, intervals, styles, stylemap, nowrap=False, nowrapindent=False):
+def col_splitter(maxcol, tol, dispchrs, dispcols, positions,
+ intervals, styles, stylemap, nowrap=False, nowrapindent=False):
"""Split string by column"""
if nowrap:
View
3  kaa/theme.py
@@ -51,7 +51,8 @@ def fill(self, default):
class Overlay(Style):
- def __init__(self, name, fgcolor=None, bgcolor=None, underline=None, bold=None):
+ def __init__(self, name, fgcolor=None, bgcolor=None,
+ underline=None, bold=None):
super().__init__(name, fgcolor, bgcolor, underline, bold)
def fill(self, default):
View
4 kaa/ui/pyconsole/pythonconsolemode.py
@@ -69,7 +69,7 @@ def write(self, s):
def _eval_str(self, s):
try:
- comp = compile(s, '<interactive input>', 'eval')
+ comp = compile(s, '<interactive input>', 'eval')
except SyntaxError:
return
@@ -86,7 +86,7 @@ def _eval_str(self, s):
def _exec_str(self, s):
try:
- comp = compile(s, '<interactive input>', 'exec')
+ comp = compile(s, '<interactive input>', 'exec')
except SyntaxError:
traceback.print_exc()
return
View
3  kaa/ui/selectlist/selectlist.py
@@ -73,7 +73,8 @@ def update_doc(self, items):
if n != (len(self.items) - 1):
f.append_text('default', self.SEP)
- def _update_item_style(self, wnd, item, activate, middle=None, bottom=None):
+ def _update_item_style(
+ self, wnd, item, activate, middle=None, bottom=None):
if item not in self.document.marks:
return
View
2  kaa/ui/statusbar/statusbarmode.py
@@ -74,7 +74,7 @@ def build_status(self, statusbar):
self.document.append(d['filename'], style_filename)
if d['modified']:
- self.document.append('*', style_filename)
+ self.document.append('*', style_filename)
self.document.append(' ', style_default)
self.document.append(
View
2  run_autopep8
@@ -0,0 +1,2 @@
+#!/bin/sh
+autopep8 -r -i -a --ignore=E721 kaa
Please sign in to comment.
Something went wrong with that request. Please try again.