Skip to content

Commit

Permalink
Fix mypy error by asserting
Browse files Browse the repository at this point in the history
Since we just asked `is_panel_active`, the following `find_output_panel`
*must* succeed.  So we `assert panel` to tell it mypy.
  • Loading branch information
kaste committed May 20, 2021
1 parent 349622b commit f1aabca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions message_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def run(self, msg=""):

if is_panel_active(window):
panel = window.find_output_panel(PANEL_NAME)
assert panel
else:
panel = window.create_output_panel(PANEL_NAME)
syntax_path = "Packages/SublimeLinter/panel/message_view.sublime-syntax"
Expand Down

0 comments on commit f1aabca

Please sign in to comment.