Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use requires_ancestor instead of T.unsafe(self) #83

Merged
merged 1 commit into from
May 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/spoom/cli/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ module Spoom
module Cli
module Helper
extend T::Sig
extend T::Helpers
include Thor::Shell

requires_ancestor Thor

# Print `message` on `$stdout`
sig { params(message: String).void }
def say(message)
Expand Down Expand Up @@ -66,7 +69,7 @@ def in_sorbet_project!
# Return the path specified through `--path`
sig { returns(String) }
def exec_path
T.unsafe(self).options[:path] # TODO: requires_ancestor
options[:path]
end

sig { returns(String) }
Expand All @@ -87,7 +90,7 @@ def sorbet_config
# Is the `--color` option true?
sig { returns(T::Boolean) }
def color?
T.unsafe(self).options[:color] # TODO: requires_ancestor
options[:color]
end

sig { params(string: String).returns(String) }
Expand Down
1 change: 1 addition & 0 deletions sorbet/config
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.
--ignore=vendor/
--enable-experimental-requires-ancestor