def is_trait(self, name):
        """ Attempt to resolve a name to see if it is a trait. """

        # fixme: We might want to be a bit cleverer than this ;^)
        return True

        # Try the namespace's locals first.
        if name in self.locals:
            # These are the definitive traits markers!
            if name in ['TraitFactory', 'Trait', 'Instance']:
                is_trait = True

            # The name won't be in the '_is_trait' dictionary if it was not
            # defined by an assignment i.e., it is a class or function!
            elif not self._is_trait.get(name, False):
                is_trait = False

            else:
                next = self.locals[name]
                if len(next.source) > 0:
                    is_trait = self.is_trait(next.source)

                else:
                    is_trait = False

        # Is the name imported?
        elif self.is_imported(name):
            module_name = self.get_next_module_name(name)
            module = self.get_next_module(module_name)

            if module is not None:
                components = name.split('.')
                is_trait = module.is_trait(components[-1])

            else:
                is_trait = False

        # If we have a parent namespace then try that.
        elif self.namespace is not None:
            is_trait = self.namespace.is_trait(name)

        # Otherwise give up!
        else:
            is_trait = False

        return is_trait
dataset/ETHPy150Open enthought/envisage/envisage/developer/code_browser/namespace.py/Namespace.is_trait/original