Skip to content

Commit 7ca582a

Browse files
committed
Typing improvements
1 parent 1e0a1f0 commit 7ca582a

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

RSpecToggleSourceOrSpec.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ def is_enabled(self):
9494
view = self.window.active_view()
9595
return view and self._is_ruby_file(view)
9696

97-
def is_visible(self):
98-
view = self.window.active_view()
99-
return view and self._is_ruby_file(view)
100-
10197
def _is_ruby_file(self, view: sublime.View):
10298
syntax = view.syntax()
10399
return syntax and syntax.scope in ("source.ruby", "source.ruby.rspec")

generate_specification_command.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def run(self):
99
return
1010

1111
symbols = view.symbol_regions()
12-
result = []
12+
result: list[str] = []
1313
for symbol in symbols:
1414
# Sublime automatically assigns NAMESPACE for "RSpec.describe" format
1515
# https://github.com/sublimehq/sublime_text/issues/3315
@@ -27,4 +27,4 @@ def is_enabled(self):
2727
return False
2828

2929
syntax = view.syntax()
30-
return syntax and syntax.scope == "source.ruby.rspec"
30+
return syntax is not None and syntax.scope == "source.ruby.rspec"

shared.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import sublime_plugin
33

44

5-
def other_group_in_pair(window):
5+
def other_group_in_pair(window: sublime.Window):
66
"""Returns the neighbour focus group for the current window."""
77
if window.active_group() % 2 == 0:
88
target_group = window.active_group() + 1

0 commit comments

Comments
 (0)