From 67f51b0f0e4bd95b5f5ee85b8d1e7a0417ecab5f Mon Sep 17 00:00:00 2001 From: Nathaniel Ramm Date: Sun, 19 Apr 2026 00:23:21 +1000 Subject: [PATCH] fix(profiles): align DescriptorProfile.post_init signature with base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MountainAshBaseSettings.post_init declares reinitialise as Optional[bool], but DescriptorProfile narrowed it to bool. Pyright flagged this as an LSP-violating override in any subclass that multi-inherited both parents (e.g. downstream storage settings), forcing downstream code to pick whichever override would only generate warnings in one parent, not both. Widening the override to Optional[bool] matches the base and clears the inconsistency for all downstream consumers. Runtime behavior is unchanged — None was already coerced to falsy. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/mountainash_settings/profiles/profile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mountainash_settings/profiles/profile.py b/src/mountainash_settings/profiles/profile.py index 84fcd8d..37fce77 100644 --- a/src/mountainash_settings/profiles/profile.py +++ b/src/mountainash_settings/profiles/profile.py @@ -109,7 +109,7 @@ def provider_type(self) -> t.Any: def post_init( self, template_settings_parameters: t.Any = None, - reinitialise: bool = False, + reinitialise: t.Optional[bool] = False, ) -> None: """Resolve any ``ParameterSpec.template`` fields.