Skip to content

Commit

Permalink
Merge a4b2d90 into 74f785e
Browse files Browse the repository at this point in the history
  • Loading branch information
chaudum committed Jan 24, 2018
2 parents 74f785e + a4b2d90 commit c67a4a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/crate/crash/repl.py
Expand Up @@ -89,7 +89,7 @@ class CrateStyle(Style):
class TruncatedFileHistory(FileHistory):

def __init__(self, filename, max_length=1000):
super(TruncatedFileHistory, self).__init__(filename)
super().__init__(filename)
base = os.path.dirname(filename)
if not os.path.exists(base):
os.makedirs(base)
Expand All @@ -100,7 +100,7 @@ def __init__(self, filename, max_length=1000):

def append(self, string):
self.strings = self.strings[:max(0, self.max_length - 1)]
super(TruncatedFileHistory, self).append(string)
super().append(string)


class SQLCompleter(Completer):
Expand Down Expand Up @@ -221,8 +221,7 @@ def is_multiline():
return False
return not doc.text.rstrip().endswith(';')

super(self.__class__, self).__init__(
*args, is_multiline=is_multiline, **kwargs)
super().__init__(*args, is_multiline=is_multiline, **kwargs)


class Capitalizer:
Expand Down Expand Up @@ -279,7 +278,6 @@ def create_buffer(cmd, history_file):
def _get_toolbar_tokens(is_conn_available, username, active_servers):
tokens = []
if is_conn_available():
active_servers = active_servers
hosts = ', '.join(
(n.replace('http://', '').replace('https://', '') for n in active_servers))
tokens.extend([(Token.Toolbar.Status.Key, 'USER: '),
Expand Down
2 changes: 1 addition & 1 deletion src/crate/crash/tests.py
Expand Up @@ -43,7 +43,7 @@
class CrateTestCmd(CrateCmd):

def __init__(self, **kwargs):
super(CrateTestCmd, self).__init__(**kwargs)
super().__init__(**kwargs)
doctest_print = PrintWrapper()
self.logger = ColorPrinter(False, stream=doctest_print, line_end='')

Expand Down

0 comments on commit c67a4a2

Please sign in to comment.