Skip to content

Commit

Permalink
Add leading / trailing bracket / parent tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Aug 2, 2023
1 parent cbdafd9 commit 9f36d45
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@
= T

# type leading comment
type X = (
type X = ( # trailing open paren comment
# value leading comment
int # value trailing comment
# leading close paren comment
) # type trailing comment


Expand All @@ -60,15 +61,15 @@
# value leading comment
int # value trailing comment

# another value trailing comment
# leading close paren comment
)

# type parameters
type type_params_single_line[aaaaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbb, ccccccccccccccccc] = int
type type_params_arguments_on_their_own_line[aaaaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbb, ccccccccccc, ddddddddddddd, eeeeeee] = int
type type_params_argument_per_line[aaaaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbb, ccccccccccccccccc, ddddddddddddd, eeeeeeeeeeeeeeee, ffffffffffff] = int
type type_params_trailing_comma[a, b,] = int
type type_params_comments[
type type_params_comments[ # trailing open bracket comment
# leading comment
A,

Expand All @@ -78,7 +79,8 @@
# another leading comment
C,
D, # trailing comment
] = int
# leading close bracket comment
] = int # trailing value comment
type type_params_all_kinds[type_var, *type_var_tuple, **param_spec] = int

# type variable bounds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ type X[T] \
= T
# type leading comment
type X = (
type X = ( # trailing open paren comment
# value leading comment
int # value trailing comment
# leading close paren comment
) # type trailing comment
Expand All @@ -66,15 +67,15 @@ type X = (
# value leading comment
int # value trailing comment
# another value trailing comment
# leading close paren comment
)
# type parameters
type type_params_single_line[aaaaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbb, ccccccccccccccccc] = int
type type_params_arguments_on_their_own_line[aaaaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbb, ccccccccccc, ddddddddddddd, eeeeeee] = int
type type_params_argument_per_line[aaaaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbb, ccccccccccccccccc, ddddddddddddd, eeeeeeeeeeeeeeee, ffffffffffff] = int
type type_params_trailing_comma[a, b,] = int
type type_params_comments[
type type_params_comments[ # trailing open bracket comment
# leading comment
A,
Expand All @@ -84,7 +85,8 @@ type type_params_comments[
# another leading comment
C,
D, # trailing comment
] = int
# leading close bracket comment
] = int # trailing value comment
type type_params_all_kinds[type_var, *type_var_tuple, **param_spec] = int
# type variable bounds
Expand Down Expand Up @@ -150,17 +152,18 @@ type X[T] = T
type X[T] = T
# type leading comment
type X = (
type X = ( # trailing open paren comment
# value leading comment
int # value trailing comment
# leading close paren comment
) # type trailing comment
# type leading comment
type X = (
# value leading comment
int # value trailing comment
# another value trailing comment
# leading close paren comment
)
# type parameters
Expand Down Expand Up @@ -188,15 +191,16 @@ type type_params_trailing_comma[
a,
b,
] = int
type type_params_comments[
type type_params_comments[ # trailing open bracket comment
# leading comment
A,
# in between comment
B,
# another leading comment
C,
D, # trailing comment
] = int
# leading close bracket comment
] = int # trailing value comment
type type_params_all_kinds[type_var, *type_var_tuple, **param_spec] = int
# type variable bounds
Expand Down

0 comments on commit 9f36d45

Please sign in to comment.