Skip to content

Commit

Permalink
Merge pull request #1226 from Shopify/vs/set_logger_to_untyped
Browse files Browse the repository at this point in the history
Make logger untyped
  • Loading branch information
vinistock authored Oct 6, 2023
2 parents 12e616c + c443bd1 commit 81c1aed
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/shopify_api/context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ class Context
@is_private = T.let(false, T::Boolean)
@private_shop = T.let(nil, T.nilable(String))
@is_embedded = T.let(true, T::Boolean)
@logger = T.let(::Logger.new($stdout), ::Logger)
# Logger can either be a Logger or an ActiveSupport::BroadcastLogger, which is new in Rails 7.1.0. To avoid adding a
# dependency Active Support >= 7.1.0, we go with T.untyped
@logger = T.let(::Logger.new($stdout), T.untyped)
@log_level = T.let(:info, Symbol)
@notified_missing_resources_folder = T.let({}, T::Hash[String, T::Boolean])
@active_session = T.let(Concurrent::ThreadLocalVar.new { nil }, T.nilable(Concurrent::ThreadLocalVar))
Expand All @@ -33,7 +35,7 @@ class << self
is_private: T::Boolean,
is_embedded: T::Boolean,
log_level: T.any(String, Symbol),
logger: ::Logger,
logger: T.untyped,
host_name: T.nilable(String),
host: T.nilable(String),
private_shop: T.nilable(String),
Expand Down Expand Up @@ -116,7 +118,7 @@ def load_rest_resources(api_version:)
sig { returns(Auth::AuthScopes) }
attr_reader :scope

sig { returns(::Logger) }
sig { returns(T.untyped) }
attr_reader :logger

sig { returns(Symbol) }
Expand Down

0 comments on commit 81c1aed

Please sign in to comment.