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