MCPcopy Create free account
hub / github.com/AMAP-ML/EMF / __dir__

Method __dir__

trl/trl/import_utils.py:119–126  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

117
118 # Needed for autocompletion in an IDE
119 def __dir__(self):
120 result = super().__dir__()
121 # The elements of self.__all__ that are submodules may or may not be in the dir already, depending on whether
122 # they have been accessed or not. So we only add the elements of self.__all__ that are not already in the dir.
123 for attr in self.__all__:
124 if attr not in result:
125 result.append(attr)
126 return result
127
128 def __getattr__(self, name: str) -> Any:
129 if name in self._objects:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected