Skip to content

Commit

Permalink
fix patch_name and type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Nov 5, 2024
1 parent d0c0022 commit 8c373a0
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
3 changes: 1 addition & 2 deletions lib/datadog/ci/contrib/patcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ def self.included(base)
end

# Prepended instance methods for all patchers
# @public_api
module CommonMethods
attr_accessor \
:patch_error_result,
:patch_successful

def patch_name
name
(self.class != Class && self.class != Module) ? self.class.name : name
end

def patched?
Expand Down
33 changes: 33 additions & 0 deletions sig/datadog/ci/contrib/patcher.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module Datadog
module CI
module Contrib
module Patcher
def self.included: (untyped base) -> untyped

module CommonMethods
attr_accessor patch_error_result: untyped

attr_accessor patch_successful: untyped

def patch_name: () -> String?

def name: () -> String

def patched?: () -> bool

def patch: () -> void

def on_patch_error: (untyped e) -> untyped

def default_tags: () -> untyped

private

def patch_only_once: () -> untyped

@patch_only_once: Datadog::Core::Utils::OnlyOnce
end
end
end
end
end
15 changes: 15 additions & 0 deletions vendor/rbs/ddtrace/0/datadog/core/telemetry/logger.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module Datadog
module Core
module Telemetry
module Logger
def self.report: (Exception exception, ?level: Symbol, ?description: String?) -> void

def self.error: (String description) -> void

private

def self.instance: () -> Datadog::Core::Telemetry::Component?
end
end
end
end

0 comments on commit 8c373a0

Please sign in to comment.