Skip to content

Commit

Permalink
Fix rename input, remove unmatchable typing for *Command.run
Browse files Browse the repository at this point in the history
Fixes #755
  • Loading branch information
tomv564 committed Oct 18, 2019
1 parent 1a2af66 commit 8463278
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugin/rename.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def input(self, args: dict) -> 'Optional[sublime_plugin.TextInputHandler]':
else:
return None

def run(self, edit: sublime.Edit, new_name: str = "", event: 'Optional[dict]' = None) -> None:
def run(self, edit: sublime.Edit, new_name: str, event: 'Optional[dict]' = None) -> None:
pos = get_position(self.view, event)
position = get_document_position(self.view, pos)
if position:
Expand Down
9 changes: 5 additions & 4 deletions stubs/sublime_plugin.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ class WindowCommand(Command):
...

# def run_(self, edit_token, args): ...
def run(self) -> None:
...

# def run(self) -> None: (mypy issue #5876).
# ...


class TextCommand(Command):
Expand All @@ -123,8 +124,8 @@ class TextCommand(Command):
...

# def run_(self, edit_token, args): ...
def run(self, edit: Edit) -> None:
...
# def run(self, edit: Edit) -> None: (mypy issue #5876)
# ...


class EventListener:
Expand Down

0 comments on commit 8463278

Please sign in to comment.