-
-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
Python 3.6.5
dotmap 1.3.8
Pycharm Community 2019.1.1
I was hoping to use dotmap to provide dot notation code completion to some existing dictionaries. However, when initialized from an existing dictionary it does not seem to provide the code completion suggestions like it should.
Note that functionally everything works, you just have to already know what the keys are since the code completion fails.
from dotmap import DotMap
d1 = DotMap()
d1.dog = 'pug'
d1.cat = 'tabby'
print(d1)
# Start typing d1. and you get all of the existing keys suggested as results, as expected.
print(d1.dog)
print(d1.cat)
d2 = {'first': 'Carl', 'last': 'Smith'}
d2 = DotMap(d2)
print(d2)
# Start typing d2. and none of the keys are suggested.
# However, if you know the key names and manually type them they function.
print(d2.first)
print(d2.last)
Metadata
Metadata
Assignees
Labels
No labels
