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>
oslo.utils
The oslo.utils library provides support for common utility type functions, such as encoding, exception handling, string manipulation, and time handling.
- Free software: Apache license
- Documentation: https://docs.openstack.org/oslo.utils/latest/
- Source: https://opendev.org/openstack/oslo.utils
- Bugs: https://bugs.launchpad.net/oslo.utils
- Release notes: https://docs.openstack.org/releasenotes/oslo.utils/
Description
Languages
Python
100%