(self)
return result
Introspects the actor's attributes.
Introspects the actor's attributes.
Introspects the actor s attributes .
def _introspect_attributes(self):
        """Introspects the actor's attributes."""
        result = {}
        attr_paths_to_visit = [[attr_name] for attr_name in dir(self._actor)]

        while attr_paths_to_visit:
            attr_path = attr_paths_to_visit.pop(0)

            if not self._is_exposable_attribute(attr_path[-1]):
                continue

            attr = self._actor._introspect_attribute_from_path(attr_path)

            if self._is_self_proxy(attr):
                logger.warning(
                    f"{self._actor} attribute {'.'.join(attr_path)!r} "
                    f"is a proxy to itself. "
                    f"Consider making it private "
                    f"by renaming it to {'_' + attr_path[-1]!r}."
                )
                continue

            attr_info = AttrInfo(
                callable=self._is_callable_attribute(attr),
                traversable=self._is_traversable_attribute(attr),
            )
            result[tuple(attr_path)] = attr_info

            if attr_info.traversable:
                for attr_name in dir(attr):
                    attr_paths_to_visit.append(attr_path + [attr_name])

        return result
def _introspect_attributes ( self ) : result = { } attr_paths_to_visit = [ [ attr_name ] for attr_name in dir ( self . _actor ) ] while attr_paths_to_visit : attr_path = attr_paths_to_visit . pop ( 0 ) if not self . _is_exposable_attribute ( attr_path [ - 1 ] ) : continue attr = self . _actor . _introspect_attribute_from_path ( attr_path ) if self . _is_self_proxy ( attr ) : logger . warning ( f"{self._actor} attribute {'.'.join(attr_path)!r} " f"is a proxy to itself. " f"Consider making it private " f"by renaming it to {'_' + attr_path[-1]!r}." ) continue attr_info = AttrInfo ( callable = self . _is_callable_attribute ( attr ) , traversable = self . _is_traversable_attribute ( attr ) , ) result [ tuple ( attr_path ) ] = attr_info if attr_info . traversable : for attr_name in dir ( attr ) : attr_paths_to_visit . append ( attr_path + [ attr_name ] ) return result