I recently picked up PyCharm and I'm used to a feature from Wing where you can tell the IDE what class a particular identifier (variable, attribute, whatever) will be. For example:
my_object = SomeClass()
assert isinstance(my_object.my_attribute, SomeOtherClass)
At this point, Wing knows exactly what my_object.my_attribute is even if it couldn't otherwise figure it out from source code analysis.
I'm looking for a similar feature in PyCharm. I know what a particular attribute of an object is, but PyCharm doesn't, so how can I tell it, so it can give me handy completions?
Related question: I also do see a similar question, How can I tell PyCharm what type a parameter is expected to be?, but it doesn't cover attributes, just parameters.