From 3e26b4c1013d51f0930afe996cc431f3cb3e5dcb Mon Sep 17 00:00:00 2001 From: Joseph Lee Date: Mon, 25 Jan 2021 12:32:16 -0800 Subject: [PATCH] ConfigHub/switch profiles: switch flags is integer, not an optional integer. Re #155. Mypy: switch flags must be an integer, not None or an integer. This guards against argument and attribute type mismatch. --- addon/appModules/splstudio/splconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon/appModules/splstudio/splconfig.py b/addon/appModules/splstudio/splconfig.py index d75a72751..9b5caca10 100755 --- a/addon/appModules/splstudio/splconfig.py +++ b/addon/appModules/splstudio/splconfig.py @@ -615,7 +615,7 @@ def getProfileFlags( # This involves promoting and demoting normal profile. # 17.10: this will never be invoked if only normal profile is in use # or if config was loaded from memory alone. - def switchProfile(self, prevProfile: Optional[str], newProfile: str, switchFlags: Optional[int]) -> None: + def switchProfile(self, prevProfile: Optional[str], newProfile: str, switchFlags: int) -> None: if self.normalProfileOnly or self.configInMemory: raise RuntimeError( "Only normal profile is in use or config was loaded from memory, cannot switch profiles"