Skip to content

Commit 1edddae

Browse files
Define __dir__ to contain COMMANDS and SENSORS (#76)
* Update __dir__ to contain Roku.commands * Add sensors to Roku.__dir__ * Add attributes back into __dir__
1 parent 2d220b4 commit 1edddae

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

roku/core.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,14 @@ def __getitem__(self, key):
209209
app = self._app_for_id(key)
210210
return app
211211

212+
def __dir__(self):
213+
return sorted(
214+
dir(type(self)) +
215+
list(self.__dict__.keys()) +
216+
list(COMMANDS.keys()) +
217+
list(SENSORS)
218+
)
219+
212220
def _app_for_name(self, name):
213221
for app in self.apps:
214222
if app.name == name:

0 commit comments

Comments
 (0)