Add typing for AppSec::Response#to_rack, HashCoercion, and Forking#5456
Add typing for AppSec::Response#to_rack, HashCoercion, and Forking#5456
Conversation
- Response#to_rack: Array[untyped] -> precise [Integer, Hash, Array] tuple - HashCoercion#coerce: parameters and hash types use any (intentionally open) - Forking: included/extended use ::Module parameter and void return Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
👋 Hey @marcotc, please fill "Change log entry" section in the pull request description. If changes need to be present in CHANGELOG.md you can state it this way **Change log entry**
Yes. A brief summary to be placed into the CHANGELOG.md(possible answers Yes/Yep/Yeah) Or you can opt out like that **Change log entry**
None.(possible answers No/Nope/None) Visited at: 2026-03-13 20:32:20 UTC |
Typing analysisNote: Ignored files are excluded from the next sections. Untyped methodsThis PR clears 2 partially typed methods. It increases the percentage of typed methods from 61.19% to 61.29% (+0.1%). Partially typed methods (+0-2)✅ Cleared: |
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 11175ff | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@marcotc advice learned by failure - you have to run steep with all project files, otherwise changes might break contracts that will be not verified on few files run. |
What does this PR do?
AppSec::Response#to_rack:::Array[untyped]→ precise[::Integer, ::Hash[::String, ::String], ::Array[::String]]tuple matching thestatus/headers/bodyattribute typesAppSec::Utils::HashCoercion#coerce: parameter and hash types useany(accepts any Ruby object, returns any hash)Core::Utils::Forking:included/extendedaccept::Moduleand returnvoid(standardincluded/extendedhook pattern)How to test the change?
bundle exec steep check \ lib/datadog/appsec/response.rb \ lib/datadog/appsec/utils/hash_coercion.rb \ lib/datadog/core/utils/forking.rbChangelog
None.