typing: Add type annotations for testscenarios in StringToBytesTest
The StringToBytesTest class uses testscenarios.multiply_scenarios() to dynamically inject test attributes (sign, magnitude, unit_prefix, etc.) at runtime. Mypy cannot infer these dynamically-generated attributes, resulting in 19 “has no attribute” errors during type checking.
This change adds explicit type annotations for the scenarios class attribute and all instance attributes that get injected by the testscenarios framework, allowing mypy to properly validate the test code without errors.
Assisted-By: Claude Sonnet 4.5 noreply@anthropic.com Change-Id: Ice60c7f944bea3fdce4284cc2f0881f40996cf8f Signed-off-by: Hervé Beraud herveberaud.pro@gmail.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号