ruff
b6c40748 - Insert newline between docstring and following own line comment (#8216)

Commit
2 years ago
Insert newline between docstring and following own line comment (#8216) **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
Author
Parents
Loading