Improve type signature for _RuleList#3455
Conversation
`List` is invariant, `Sequence` is covariant
|
Thanks, but according to #3119 (comment) changing this List to Sequence is incorrect. I'm not sure if that's true, though - this change appears to pass our mypy tests. (the PR was submitted at a time that our CI wasn't working so we don't can't see the test results on the web but I just checked out the branch and verified it locally). What do you think about that? |
I think that comment is a bit misguided. It would be different if TL;DR: I think this is fine as-is, if anything we can make it an Iterable. :) |
|
That makes sense to me. Thanks! |
This PR improves the type signature for
_RuleListto be more forgiving. Minimal repro:Before Patch:
After Patch:
Thank you for maintaining tornado, we (@mitmproxy) are super happy users for over a decade! 😃✨🍰