Beispiel #1
0
    def function_def_defaults_qual(self):
        '''Get a list of fully qualified default values in a function def

        :return: List of defaults
        '''
        defaults = []
        for default in self._context['node'].args.defaults:
            defaults.append(utils.get_qual_attr(
                default,
                self._context['import_aliases']))
        return defaults
Beispiel #2
0
    def function_def_defaults_qual(self):
        """Get a list of fully qualified default values in a function def

        :return: List of defaults
        """
        defaults = []
        if ("node" in self._context and hasattr(self._context["node"], "args")
                and hasattr(self._context["node"].args, "defaults")):
            for default in self._context["node"].args.defaults:
                defaults.append(
                    utils.get_qual_attr(default,
                                        self._context["import_aliases"]))
        return defaults