From 6a4ab10cd4002d6c4b7d3a3862d041bcda86b6fa Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sat, 13 Mar 2021 15:58:29 +0000 Subject: [PATCH] Add comment about the __NSCFArray issue --- config.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config.py b/config.py index 50b0a41b..4db4e127 100644 --- a/config.py +++ b/config.py @@ -581,6 +581,12 @@ class MacConfig(AbstractConfig): def __raw_get(self, key: str) -> Union[None, list, str, int]: res = self._settings.get(key) + # On MacOS Catalina, with python.org python 3.9.2 any 'list' + # has type __NSCFArray so a simple `isinstance(res, list)` is + # False. So, check it's not-None, and not the other types. + # + # If we can find where to import the definition of NSCFArray + # then we could possibly test against that. if res and not isinstance(res, str) and not isinstance(res, int): return list(res)