Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Googles Python Styleguide (multi level Subsequent Indents) #45

Open
raabf opened this issue Apr 16, 2015 · 1 comment
Open

Comments

@raabf
Copy link

raabf commented Apr 16, 2015

It would also be nice if the plugin would support Googles Python Styleguide

A correctly formatted docstring after this guide should be look like this:

        """Short description of the Function.

        Args:
            first_arg (int): Description of the first argument. Lorem ipsum
                dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
                eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
                sed diam voluptua.
            second_arg (str, optional): Description if the second argument.
                Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
                diam nonumy eirmod tempor invidunt ut labore et dolore magna
                aliquyam erat, sed diam voluptua.

        Returns:
            Much Fun! Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
            sed diam nonumy eirmod tempor invidunt ut labore et dolore magna
            aliquyam erat, sed diam voluptua.

        """

After ALT+Q in the Args: and the Returns: block, it becomes this:

        """Short description of the Function.

        Args: first_arg (int): Description of the first argument. Lorem ipsum
            dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
            tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
            voluptua. second_arg (str, optional): Description if the second
            argument. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
            sed diam nonumy eirmod tempor invidunt ut labore et dolore magna
            aliquyam erat, sed diam voluptua.

        Returns: Much Fun! Lorem ipsum dolor sit amet, consetetur sadipscing
            elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore
            magna aliquyam erat, sed diam voluptua.

        """

This form is very handy. The python docstring is intended be good human readable, which is the case in this style. But through doxypypy and napoleon it can correctly parsed by Doxygen and Sphinx. Therefore you can also use it for externally documenting your code.

Sublime-Wrap-Plus already has an Subsequent Indents feature. For this guide it is necessary that Sublime-Wrap-Plus also support that on multi level indents. For this style it is sufficient to only have an second level. I don't know if it is simpler/better to implement only a second level or generalize that and support all levels. Thanks :-)

@nikogosovd
Copy link

Is there any movement on the issue? Maybe some workaround exists...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants