def _override(self, key, args):
        """
        Updates the cached settings with the provided argument. Defaults to
        the previous value if the key isn't found in the arguments object

        :param key: Settings key to override, ex: 'time', 'units'
        :param args: argument object provided to settings init function
        """
        try:
            if args in key and args[key] is not None:
                self.settings[key] = args[key]
        except TypeError:
            if getattr(args, key, self.settings[key]) is not None:
                self.settings[key] = getattr(args, key, self.settings[key])
dataset/ETHPy150Open JackWink/Weather/weatherpy/settings.py/Settings._override/swapped operands of `in`