mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-24 05:25:17 +00:00
![]() **Summary** Previously, own line comment following after a docstring followed by newline(s) before the first content statement were treated as trailing on the docstring and we didn't insert a newline after the docstring as black would. Before: ```python class ModuleBrowser: """Browse module classes and functions in IDLE.""" # This class is also the base class for pathbrowser.PathBrowser. def __init__(self, master, path, *, _htest=False, _utest=False): pass ``` After: ```python class ModuleBrowser: """Browse module classes and functions in IDLE.""" # This class is also the base class for pathbrowser.PathBrowser. def __init__(self, master, path, *, _htest=False, _utest=False): pass ``` I'm not entirely happy about hijacking `handle_own_line_comment_between_statements`, but i don't know a better spot to put it. Fixes #7948 **Test Plan** Fixtures |
||
---|---|---|
.. | ||
snapshots | ||
fixtures.rs |