You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Black:
classModuleBrowser:
"""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
We should also insert the empty line after the docstring even if there is comment
The text was updated successfully, but these errors were encountered:
This might be intentional (though whether it’s good is debatable) — I believe we intentionally don’t insert a newline like that if it immediately follows an import, unlike Black.
**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
Ours:
Black:
We should also insert the empty line after the docstring even if there is comment
The text was updated successfully, but these errors were encountered: