-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testing: Check that the max_line_length is working when formating code
- Loading branch information
1 parent
82cc322
commit b531830
Showing
4 changed files
with
262 additions
and
13 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
spyder/plugins/editor/widgets/tests/assets/autopep8_max_line.py
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,56 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Spyder Editor | ||
This is a temporary script file. | ||
""" | ||
|
||
import os | ||
import sys | ||
|
||
|
||
# %% functions | ||
def d(): | ||
def inner(): return 2 | ||
return inner | ||
# ---- func 1 and 2 | ||
|
||
|
||
def func1(): | ||
for i in range(3): | ||
print(i) | ||
|
||
|
||
def func2(): | ||
if True: | ||
pass | ||
# ---- other functions | ||
|
||
|
||
def a(): | ||
pass | ||
|
||
|
||
def b(): | ||
pass | ||
|
||
|
||
def c(): | ||
pass | ||
|
||
|
||
# %% classes | ||
class Class1: | ||
def __init__(self): | ||
super( | ||
Class1, self).__init__() | ||
self.x = 2 | ||
|
||
def method3(self): | ||
pass | ||
|
||
def method2(self): | ||
pass | ||
|
||
def method1(self): | ||
pass |
70 changes: 70 additions & 0 deletions
70
spyder/plugins/editor/widgets/tests/assets/black_max_line.py
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,70 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Spyder Editor | ||
This is a temporary script file. | ||
""" | ||
|
||
import os | ||
import sys | ||
|
||
|
||
# %% functions | ||
def d(): | ||
def inner(): | ||
return 2 | ||
|
||
return inner | ||
|
||
|
||
# ---- func 1 and 2 | ||
def func1(): | ||
for i in range( | ||
3 | ||
): | ||
print(i) | ||
|
||
|
||
def func2(): | ||
if True: | ||
pass | ||
|
||
|
||
# ---- other functions | ||
def a(): | ||
pass | ||
|
||
|
||
def b(): | ||
pass | ||
|
||
|
||
def c(): | ||
pass | ||
|
||
|
||
# %% classes | ||
class Class1: | ||
def __init__( | ||
self, | ||
): | ||
super( | ||
Class1, | ||
self, | ||
).__init__() | ||
self.x = 2 | ||
|
||
def method3( | ||
self, | ||
): | ||
pass | ||
|
||
def method2( | ||
self, | ||
): | ||
pass | ||
|
||
def method1( | ||
self, | ||
): | ||
pass |
68 changes: 68 additions & 0 deletions
68
spyder/plugins/editor/widgets/tests/assets/yapf_max_line.py
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,68 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Spyder Editor | ||
This is a temporary script file. | ||
""" | ||
|
||
import os | ||
import sys | ||
|
||
|
||
# %% functions | ||
def d(): | ||
|
||
def inner(): | ||
return 2 | ||
|
||
return inner | ||
|
||
|
||
# ---- func 1 and 2 | ||
def func1(): | ||
for i in range( | ||
3): | ||
print(i) | ||
|
||
|
||
def func2(): | ||
if True: | ||
pass | ||
|
||
|
||
# ---- other functions | ||
def a(): | ||
pass | ||
|
||
|
||
def b(): | ||
pass | ||
|
||
|
||
def c(): | ||
pass | ||
|
||
|
||
# %% classes | ||
class Class1: | ||
|
||
def __init__( | ||
self): | ||
super( | ||
Class1, | ||
self | ||
).__init__( | ||
) | ||
self.x = 2 | ||
|
||
def method3( | ||
self): | ||
pass | ||
|
||
def method2( | ||
self): | ||
pass | ||
|
||
def method1( | ||
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