Skip to content

Commit

Permalink
Use 3.7-compatible async_ argument
Browse files Browse the repository at this point in the history
  • Loading branch information
numirias committed Jul 14, 2018
1 parent 6bf2f9c commit 27116e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions rplugin/python3/semshi/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,11 @@ def _update_error_indicator(self):

def _place_sign(self, id, line, name):
self._vim.command('sign place %d line=%d name=%s buffer=%d' %
(id, line, name, self._buf_num), async=True)
(id, line, name, self._buf_num), async_=True)

def _unplace_sign(self, id):
self._vim.command('sign unplace %d buffer=%d' %
(id, self._buf_num), async=True)
(id, self._buf_num), async_=True)

@debug_time(None, lambda _, a, c: '+%d, -%d' % (len(a), len(c)))
def _update_hls(self, add, clear):
Expand Down Expand Up @@ -271,7 +271,7 @@ def _call_atomic_async(self, calls):
# https://github.com/neovim/python-client/issues/310
batch_size = 3000
for i in range(0, len(calls), batch_size):
self._vim.api.call_atomic(calls[i:i + batch_size], async=True)
self._vim.api.call_atomic(calls[i:i + batch_size], async_=True)

def rename(self, cursor, new_name=None):
"""Rename node at `cursor` to `new_name`. If `new_name` is None, prompt
Expand Down
2 changes: 1 addition & 1 deletion test/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def test_rename():
# The command blocks until an input is received, so we need to call async
# and sleep
time.sleep(SLEEP)
vim.command('Semshi rename', async=True)
vim.command('Semshi rename', async_=True)
time.sleep(SLEEP)
vim.feedkeys('CC\n')
time.sleep(SLEEP)
Expand Down

0 comments on commit 27116e7

Please sign in to comment.