I enhanced a class by adding some few methods from another class (Jira's class from atlassian-python package)
My class is called JiraExtended.
Original methods from the class display this way:

The ones I created show this way with lesser info on function parameters for exemple:

The way I define docstrings is pretty much the same.
def grant_user_permission(self, username : str = None, permissionschemeid : str|int = None, permission : str = "BROWSE_PROJECTS") -> None:
"""
Grants a permission to a user (username) on a specified Permission Scheme.
:username: the user's username to grant the permission to, current username if not specified.
:permissionschemeid: The id of the permission scheme.
:permission: The permission key to grant, "BROWSE_PROJECTS" if not specified.
"""
if not permissionschemeid:
raise Exception("Provide a username and permissionschemeid")
if not username:
username : str = self.myself()['name']
url = self.resource_url(resource = f"permissionscheme/{permissionschemeid}/permission")
self.post(url, data=json.dumps({"holder": {"type": "user", "parameter": username}, "permission": permission}))
What's the secret so that Pylance guides me correctly?
:param username:rather than:username:(see also the tutorial). Is that what you are looking for? If yes, then this is a duplicate of How to document Python function parameters with Sphinx? and/or How to document a method with parameter(s)?.