Skip to content

[bug] Adjacent Docstrings are not combined across interleaved comments #356

Description

@JasonLunn

Given a .bzl that defines a macro like:

def foo(
        name,
        bar,
        baz,
        **kwargs):
    """Does something.

    Args:
      name: Name of the build target.
      bar: Bar.
      baz: Baz.
      **kwargs: Other args to be passed on to genrules.
    """

I expected to be able to leverage implicit concatenation of adjacent strings to split the DocString into multiple chunks with comments interleaved between them: e.g.:

def foo(
        name,
        bar, # strip
        baz, #strip
        **kwargs):
    """Does something.

    Args:
      name: Name of the build target.
    """
    # begin-strip
    """
      bar: Bar.
      baz: Baz.
    """
    # end-strip

   """
      **kwargs: Other args to be passed on to genrules.
   """

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions