0640ed88fe
The typed oslo.config stubs introduced new type mismatches that needed attention across five files. An empty set() without annotation left mypy unable to infer the element type, so _DEPRECATED_EXCEPTIONS now carries an explicit set[type] annotation. The list_opts() concatenation mixed list[BoolOpt] with list[Opt] via the + operator, which mypy rejects because list is invariant. Switching to unpacking ([*a, *b, ...]) builds a single list whose element type is the union of all sources, sidestepping the issue without casts or redundant annotations on each individual list. _store_global_conf was annotated as returning ConfigOpts but never returns anything — the return type is now None to match reality. The tuple-based membership checks in _mutate_hook ((None, 'debug') in fresh) are a legitimate oslo.config API pattern for querying mutated options by (group, name), but the typed stubs only declare __contains__(str). These are silenced with type: ignore until the stubs are updated upstream. The TestConfigOpts.__call__ override intentionally narrows the parent signature to hardcode test defaults — this is a deliberate simplification for test ergonomics, not a Liskov violation worth fixing, so it gets a type: ignore[override]. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Change-Id: I24a98cb4f58b5452a8510b8c756ad6f257e2bb0a Signed-off-by: Hervé Beraud <herveberaud.pro@gmail.com>