-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Class new line between docstrings / vars / methods (#219)
Partially addresses #144
- Loading branch information
Showing
6 changed files
with
78 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
class ClassSimplest: | ||
pass | ||
class ClassWithInit: | ||
def __init__(self): | ||
pass | ||
class ClassWithInitAndVars: | ||
cls_var = 100 | ||
def __init__(self): | ||
pass | ||
class ClassWithInitAndVarsAndDocstring: | ||
"""Test class""" | ||
cls_var = 100 | ||
def __init__(self): | ||
pass | ||
|
||
|
||
# output | ||
|
||
|
||
class ClassSimplest: | ||
pass | ||
|
||
|
||
class ClassWithInit: | ||
def __init__(self): | ||
pass | ||
|
||
|
||
class ClassWithInitAndVars: | ||
cls_var = 100 | ||
|
||
def __init__(self): | ||
pass | ||
|
||
|
||
class ClassWithInitAndVarsAndDocstring: | ||
"""Test class""" | ||
|
||
cls_var = 100 | ||
|
||
def __init__(self): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
class C: | ||
|
||
@pytest.mark.parametrize( | ||
("post_data", "message"), | ||
[ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
class C: | ||
|
||
def test(self) -> None: | ||
with patch("black.out", print): | ||
self.assertEqual( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters