I think that the reason for this is just that you shouldn’t be cluttering up your code with type hint noise unless there’s a good reason for it. Am I wrong? Are there cases in which:
*warn-on-reflection*shows that reflection is occurring that can be avoided with a type hint, but
- the offending line is not in performance-critical code, and
- there is some harm to including the type hint (other than readability).
i.e. this is a case in which the type hint won’t improve performance. Is it bad to include the type hint (apart from its effect on readability)?
Partly I’m just wondering whether I should take out a series of type hints I added that that turned out not to improve performance (though perhaps some of them could make a difference to performance at a later time when the code changes). The little bit of noise that these type hints add doesn’t bother me.