mypy: Fix assert location

This commit is contained in:
Florian Bruhin 2018-11-27 08:37:59 +01:00
parent f34a8ba194
commit 7934dc9a95

View File

@ -1190,11 +1190,11 @@ class CommandDispatcher:
if config.val.tabs.wrap:
new_idx %= self._count()
else:
assert isinstance(index, int)
# absolute moving
if count is not None:
new_idx = count - 1
elif index is not None:
assert isinstance(index, int)
new_idx = index - 1 if index >= 0 else index + self._count()
else:
new_idx = 0