Skip to content

Commit

Permalink
ConfigHub/switch profiles: switch flags is integer, not an optional i…
Browse files Browse the repository at this point in the history
…nteger. Re #155.

Mypy: switch flags must be an integer, not None or an integer. This guards against argument and attribute type mismatch.
  • Loading branch information
josephsl committed Jan 25, 2021
1 parent e5d989e commit 3e26b4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addon/appModules/splstudio/splconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 3e26b4c

Please sign in to comment.