fix tests
This commit is contained in:
parent
d48f8ed854
commit
387f3fbaaa
@ -19,3 +19,27 @@
|
|||||||
CtxManager3() as example3,
|
CtxManager3() as example3,
|
||||||
):
|
):
|
||||||
...
|
...
|
||||||
|
|
||||||
|
# output
|
||||||
|
|
||||||
|
with CtxManager() as example:
|
||||||
|
...
|
||||||
|
|
||||||
|
with CtxManager1(), CtxManager2():
|
||||||
|
...
|
||||||
|
|
||||||
|
with CtxManager1() as example, CtxManager2():
|
||||||
|
...
|
||||||
|
|
||||||
|
with CtxManager1(), CtxManager2() as example:
|
||||||
|
...
|
||||||
|
|
||||||
|
with CtxManager1() as example1, CtxManager2() as example2:
|
||||||
|
...
|
||||||
|
|
||||||
|
with (
|
||||||
|
CtxManager1() as example1,
|
||||||
|
CtxManager2() as example2,
|
||||||
|
CtxManager3() as example3,
|
||||||
|
):
|
||||||
|
...
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
except:
|
except:
|
||||||
try:
|
try:
|
||||||
raise TypeError(int)
|
raise TypeError(int)
|
||||||
except* (Exception):
|
except* Exception:
|
||||||
pass
|
pass
|
||||||
1 / 0
|
1 / 0
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -226,6 +226,7 @@ def _init_host(self, parsed) -> None:
|
|||||||
add_compiler(compilers[(7.0, 32)])
|
add_compiler(compilers[(7.0, 32)])
|
||||||
# add_compiler(compilers[(7.1, 64)])
|
# add_compiler(compilers[(7.1, 64)])
|
||||||
|
|
||||||
|
|
||||||
# Comment before function.
|
# Comment before function.
|
||||||
def inline_comments_in_brackets_ruin_everything():
|
def inline_comments_in_brackets_ruin_everything():
|
||||||
if typedargslist:
|
if typedargslist:
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# The percent-percent comments are Spyder IDE cells.
|
# The percent-percent comments are Spyder IDE cells.
|
||||||
|
|
||||||
#%%
|
|
||||||
|
# %%
|
||||||
def func():
|
def func():
|
||||||
x = """
|
x = """
|
||||||
a really long string
|
a really long string
|
||||||
@ -44,4 +45,4 @@ def func():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
#%%
|
# %%
|
@ -62,6 +62,8 @@ def decorated1():
|
|||||||
# Preview.empty_lines_before_class_or_def_with_leading_comments.
|
# Preview.empty_lines_before_class_or_def_with_leading_comments.
|
||||||
# In the current style, the user will have to split those lines by hand.
|
# In the current style, the user will have to split those lines by hand.
|
||||||
some_instruction
|
some_instruction
|
||||||
|
|
||||||
|
|
||||||
# This comment should be split from `some_instruction` by two lines but isn't.
|
# This comment should be split from `some_instruction` by two lines but isn't.
|
||||||
def g():
|
def g():
|
||||||
...
|
...
|
||||||
|
@ -119,7 +119,6 @@ def f():
|
|||||||
if not prev:
|
if not prev:
|
||||||
prevp = preceding_leaf(p)
|
prevp = preceding_leaf(p)
|
||||||
if not prevp or prevp.type in OPENING_BRACKETS:
|
if not prevp or prevp.type in OPENING_BRACKETS:
|
||||||
|
|
||||||
return NO
|
return NO
|
||||||
|
|
||||||
if prevp.type == token.EQUAL:
|
if prevp.type == token.EQUAL:
|
||||||
|
@ -116,9 +116,9 @@ def f(
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def xxxxxxxxxxxxxxxxxxxxxxxxxxxx() -> Set[
|
def xxxxxxxxxxxxxxxxxxxxxxxxxxxx() -> (
|
||||||
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
Set["xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]
|
||||||
]:
|
):
|
||||||
json = {
|
json = {
|
||||||
"k": {
|
"k": {
|
||||||
"k2": {
|
"k2": {
|
||||||
@ -140,9 +140,7 @@ def some_function_with_a_really_long_name() -> (
|
|||||||
|
|
||||||
def some_method_with_a_really_long_name(
|
def some_method_with_a_really_long_name(
|
||||||
very_long_parameter_so_yeah: str, another_long_parameter: int
|
very_long_parameter_so_yeah: str, another_long_parameter: int
|
||||||
) -> (
|
) -> another_case_of_returning_a_deeply_nested_import_of_a_type_i_suppose_cause_why_not:
|
||||||
another_case_of_returning_a_deeply_nested_import_of_a_type_i_suppose_cause_why_not
|
|
||||||
):
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@ -155,10 +153,8 @@ def func() -> (
|
|||||||
|
|
||||||
|
|
||||||
def func() -> (
|
def func() -> (
|
||||||
(
|
also_super_long_type_annotation_that_may_cause_an_AST_related_crash_in_black(
|
||||||
also_super_long_type_annotation_that_may_cause_an_AST_related_crash_in_black(
|
this_shouldn_t_get_a_trailing_comma_too
|
||||||
this_shouldn_t_get_a_trailing_comma_too
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
):
|
):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user