Skip to content
This repository was archived by the owner on Jun 11, 2024. It is now read-only.

Commit 0773818

Browse files
committed
make autocomplete work
1 parent 3d4d821 commit 0773818

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

atomx/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ def __setattr__(self, key, value):
5454
self._attributes[key] = value
5555
self._dirty.add(key)
5656

57+
def __dir__(self):
58+
"""Manually add dynamic attributes for autocomplete"""
59+
return dir(type(self)) + list(self.__dict__.keys()) + list(self._attributes.keys())
60+
5761
def __repr__(self):
5862
return '{}({})'.format(self.__class__.__name__, pprint.pformat(self.json))
5963

0 commit comments

Comments
 (0)