def __scan_file(self, keywords, data_file, import_history):
        if time() - self.start_time > SCAN_TIMEOUT:
            sublime.set_timeout(lambda: self.view.set_status('scan_error', 'scanning timeout exceeded'), 0)
            sublime.set_timeout(lambda: self.view.erase_status('scan_error'), 5000)
            return
        self.scanned_files.add(data_file.source)
        if import_history in data_file.source:
            # prevent circular import loops
            return
        import_history = copy(import_history)
        import_history.append(data_file.source)

        for setting in data_file.imports:
            if hasattr(setting, 'type'):
                if setting.type == 'Resource':
                    resource_path = os.path.normpath(os.path.join(setting.directory, setting.name))
                    cached, stored_hash = scanner_cache.get_cached_data(resource_path)
                    if cached:
                        self.__scan_file(keywords, cached, import_history)
                    else:
                        try:
                            resource_data = ResourceFile(source=resource_path).populate()
                            scanner_cache.put_data(resource_path, resource_data, stored_hash)
                            self.__scan_file(keywords, resource_data, import_history)
                        except DataError as de:
                            print 'error reading resource:', resource_path

        self.scan_keywords(data_file, keywords)
dataset/ETHPy150Open shellderp/sublime-robot-plugin/lib/robot_scanner.py/Scanner.__scan_file/swapped operands of `in`