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

utils/backtrace: enable strict typing #17170

Merged
merged 1 commit into from
Apr 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions Library/Homebrew/utils/backtrace.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# typed: true
# typed: strict
# frozen_string_literal: true

module Utils
module Backtrace
@print_backtrace_message = T.let(false, T::Boolean)

# Cleans `sorbet-runtime` gem paths from the backtrace unless...
# 1. `verbose` is set
# 2. first backtrace line starts with `sorbet-runtime`
Expand All @@ -22,7 +24,7 @@

sig { returns(String) }
def self.sorbet_runtime_path
@sorbet_runtime_path ||= "#{Gem.paths.home}/gems/sorbet-runtime"
@sorbet_runtime_path ||= T.let("#{Gem.paths.home}/gems/sorbet-runtime", T.nilable(String))

Check warning on line 27 in Library/Homebrew/utils/backtrace.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/utils/backtrace.rb#L27

Added line #L27 was not covered by tests
end

sig { void }
Expand Down