jay (support) wrote:LOL - I didn't even know you could do that (it's a handy feature if I remember to use it). I normally just cmd-click the method name and it opens the file with the method in it.
As for your problem, I'm not really following.
Yeah, I could've been more clear. Within the docstring you can use RestructuredText for formatting (to make it look more like a man page, for example).
- Code: Select all
def channelListGenerator(self, filter="", valuesDict=None, typeId="", targetId=0):
""" The channelListGenerator() method generates a list of channel names
and IDs which are used to identify the target channel.
:**url**: "/channels.json"
:**parms**: {'api_key': self.pluginPrefs.get('apiKey', '')}
:**return**: [(channel_id, channel_name), (channel_id, channel_name)] """
self.debugLog(u'channelListGenerator() called.')
url = "/channels.json"
parms = {'api_key': self.pluginPrefs.get('apiKey', '')}
response, response_dict = self.sendToThingspeak('get', url, parms)
return [(thing['id'], thing['name']) for thing in response_dict]
foo.py
- Code: Select all
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import plugin
plugin.Plugin.channelListGenerator()
Then I put my cursor on 'channelListGenerator()', hit F1, and I get this constructed view of the docstring (simple example):
- Screen Shot 2017-09-02 at 12.07.45 PM.png (78.05 KiB) Viewed 1362 times
What I was wondering was whether you could get the same view directly when viewing plugin.py (as a corollary, if you have a markdown file called foo.md, PyCharm will show a viewer allowing you to see the markdown as you create it.