I contacted support and it turns out it hasn't been implemented.
I have created a feature request on their issue tracker:
https://youtrack.jetbrains.com/issue/PY-14743
Update:
original feature request is marked as a duplicate of
https://youtrack.jetbrains.com/issue/PY-27635
State: In progress
Answer from gak on Stack OverflowI contacted support and it turns out it hasn't been implemented.
I have created a feature request on their issue tracker:
https://youtrack.jetbrains.com/issue/PY-14743
Update:
original feature request is marked as a duplicate of
https://youtrack.jetbrains.com/issue/PY-27635
State: In progress
def die_hard(self):
"""
Throws a :class:`NakatomiPlazaError`.
"""
raise NakatomiPlazaError('Yippee ki-yay')
Worked for me.
The PyCharm support told me the following :
As PyCharm developer said: You cannot distinguish classes and instances in type hints. The name of a class in a type hint means that an instance of that class is expected. If your function accepts the class itself, your options are either not to use type hints at all or use the 'type' as a class name. Anyway, there won't be any useful code completion in these cases. See also https://youtrack.jetbrains.com/issue/PY-11615.
The only way to specificate an argument is a class is to use :type arg: type, but the completion won't work well. There is no other way currently.
If you want to specify that a parameter is of type SomeClass, it should be declared as such:
@type (param): SomeClass
Specified properly, you should get something like this:

If you don't specify the type of the parameter properly:

At this point, I figured I would dig a little deeper to see if I could find anything interesting. If you go to the declaration of an object's .__class__, you'll be directed here (in builtins.py):

Perhaps __class__ was set to None? Even if it is by default but then updated when the class gets instantiated (which would be my guess as to what happens), this might be what PyCharm infers __class__ resolves to. All of this is just speculation on my end and may as well be incorrect, but... Just for the heck of it, what behavior can we see if we set a parameter's type to None, then?

Looks like the same thing that happened when we set the type to SomeClass.__fake__ (and I tested it with SomeClass.__class__, and the same thing happens there too.)
So I suppose the question at hand is, why can't you use @type cinstance: Bar?
Here's how I managed to display class attributes in the Docstring in Pycharm 2020.3.3 (I use professional edition) :
class TestModel(models.Model):
"""
A Test model to see the class attributes in the docstring
Attributes:
- :class:`str` name --> The name of the test object
- :class:`datetime` created_at --> Date and time when the instance was created
"""
name = models.CharField(max_length=50)
created_at = models.DateTimeField(auto_now_add=True)
Note that without the Attributes: line, it won't work as expected.
And this is how it is shown in the quick documentation :

For anyone who is struggling with this and stumbles upon this post (as I did)...
PyCharm doesn't support this at the moment - or rather, I should say that it still doesn't support it. Not Google style docstring, neither structuredText. There are multiple tickets regarding this issue on their Youtrack support website.
E.g. https://youtrack.jetbrains.com/issue/PY-17945 - this issue has been sitting there for over 5 years!
If you're using sphinx to generate your documentation
"""
`here <url>`__
"""
in your docstrings should be parsed properly.
Just add the link as a string into the docstring, like so:
def foo():
"""Lorem ipsum for more info, see here: www.myfancydocu.com""
The doctring is just a string, so there is no Hyperlink. But anyone that wants to look at the website can just copy the link.
There are automatic documentation-builders that build a documentation out of your code and docstrings in e.g. html. Those can probably add hyperlinks to the documentation with a specific syntax, but that syntax then depends on which documentation-builder you use. If you only have your code, then just adding the url as a string is all you can do.