Return candidates matching the text.

def find_matches(self, text):
        """Return candidates matching the text."""
        if self.use_main_ns:
            self.namespace = __main__.__dict__

        if "." in text:
            return self.attr_matches(text)
        else:
            return self.global_matches(text)