utils/backtrace: enable strict typing

This commit is contained in:
Caleb Xu 2024-04-28 02:36:19 -04:00
parent 5e027bffd6
commit 783e72dc59
No known key found for this signature in database
GPG Key ID: 47E6040D07B8407D

View File

@ -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`
@ -22,7 +24,7 @@ module Utils
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))
end
sig { void }