You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
This is is still actual.
I have also come up to the above solution, but there is one issue: I have declared the following in the __init__ method of class like this:
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.
The text was updated successfully, but these errors were encountered: