Skip to content

fix: fix code for empty message#9

Open
flying-sheep wants to merge 2 commits intomainfrom
pa/fix-empty-msg
Open

fix: fix code for empty message#9
flying-sheep wants to merge 2 commits intomainfrom
pa/fix-empty-msg

Conversation

@flying-sheep
Copy link
Copy Markdown
Member

the test code so far generated

.. version-deprecated:: foo
   None

which is certainly not intended

Copy link
Copy Markdown
Collaborator

@ilia-kats ilia-kats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, missed that part when converting from a dataclass to the string subclass.

assert lines[2].startswith(".. version-deprecated")
if msg is not None:
if msg is None:
assert len(lines) == 3
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lines contains all lines of the docstring, not just the deprecation message, which is why the tests are failing. So this should be something like len(lines_orig) + 3

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants