Add typing for Core::VariableHelpers and Core::Chunker#5443
Add typing for Core::VariableHelpers and Core::Chunker#5443
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Typing analysisNote: Ignored files are excluded from the next sections. Untyped methodsThis PR introduces 1 partially typed method, and clears 1 untyped method. Untyped methods (+0-1)✅ Cleared:Partially typed methods (+1-0)❌ Introduced:If you believe a method or an attribute is rightfully untyped or partially typed, you can add |
BenchmarksBenchmark execution time: 2026-03-12 09:22:29 Comparing candidate commit 18faeb9 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 0 unstable metrics.
|
What does this PR do?
Types
Core::Environment::VariableHelpersandCore::Chunker.Motivation:
Replaces
untypedparameters and return types with precise types derived from the method implementations.Change log entry
None.
Additional Notes:
VariableHelpers#env_to_bool:vartyped asString | Array[String](the two documented forms),defaultasbool?,deprecation_warning:keyword arg added to the sig, return isbool?.VariableHelpers#decode_array: private method that finds a matching env key; returnsString?.Chunker.chunk_by_size:listisArray[untyped](elements need.sizebut no interface exists),max_chunk_sizeisNumeric, returnsEnumerator[Array[untyped], untyped](fromslice_before).How to test the change?
bundle exec steep check lib/datadog/core/environment/variable_helpers.rb lib/datadog/core/chunker.rb