-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
odd rendering of dataclass __init__ method #404
Comments
Could you please post a full self-contained example? The following works just fine for me:
|
If I put all the classes into one single file (in an attempt to offer you a self-contained example), then the problem disappears. So this: from dataclasses import dataclass
# from .shift import Shift
class Shift:
pass
class TimeWindow:
pass
@dataclass(frozen=True, slots=True)
class ShiftChange:
"""A single instance of one shift being added or deleted, and when."""
shift: Shift
"""The shift that this change concerns."""
exists: bool
"""Whether the shift exists after the operation (i.e. it was added)."""
window: TimeWindow
"""When the change occurred.""" renders with no issue: but if the However, notably, even if the sibling class Shift:
pass the formatting is still broken, so it's not a matter of what's in Also for what it's worth, it's apparently not limited to noting in particular the splitting of my |
Ah, now I can repro. Thanks! Fixed in a34e22c, a new release should be out in a few minutes. 😃 |
All looking perfect in v12.0.2. Many thanks. |
Problem Description
Given this
dataclass
definition:pdoc
renders the__init__
method like this:I noted in particular:
shift
andexists
parameterswindow
parameter on the same line as theexists
parameter, but not theshift
parameter.System Information
The text was updated successfully, but these errors were encountered: