typed-argument-parser icon indicating copy to clipboard operation
typed-argument-parser copied to clipboard

Hashtag on final line of multiline assignment is not registered as a comment

Open swansonk14 opened this issue 1 year ago • 0 comments

In a multiline assign statement, a hashtag comment on the final line is not registered as a comment and is thus not included in the Tap help string. See below for a test that fails under the current implementation.

def test_multiline_argument_hashtag(self):
    class MultilineArgument:
        bar: str = (
            "This is a multiline argument"
            " that should not be included in the docstring"
        )  # biz baz

    class_variables = {"bar": {"comment": "biz baz"}}
    self.assertEqual(get_class_variables(MultilineArgument), class_variables)

swansonk14 avatar Aug 24 '24 23:08 swansonk14