Skip to content

Commit

Permalink
more trailing comma tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed Jan 26, 2022
1 parent 32dd9ec commit ba3d510
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion tests/data/trailing_comma_optional_parens1.py
Expand Up @@ -2,6 +2,25 @@
_winapi.ERROR_PIPE_BUSY) or _check_timeout(t):
pass


class X:
def get_help_text(self):
return ngettext(
"Your password must contain at least %(min_length)d character.",
"Your password must contain at least %(min_length)d characters.",
self.min_length,
) % {'min_length': self.min_length}

class A:
def b(self):
if self.connection.mysql_is_mariadb and (
10,
4,
3,
) < self.connection.mysql_version < (10, 5, 2):
pass


# output

if (
Expand All @@ -12,4 +31,31 @@
)
or _check_timeout(t)
):
pass
pass


class X:
def get_help_text(self):
return (
ngettext(
"Your password must contain at least %(min_length)d character.",
"Your password must contain at least %(min_length)d characters.",
self.min_length,
)
% {"min_length": self.min_length}
)


class A:
def b(self):
if (
self.connection.mysql_is_mariadb
and (
10,
4,
3,
)
< self.connection.mysql_version
< (10, 5, 2)
):
pass

0 comments on commit ba3d510

Please sign in to comment.