Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b92822a

Browse files
more trailing comma tests (psf#2810)
1 parent b517dfb commit b92822a

1 file changed

Lines changed: 47 additions & 1 deletion

File tree

tests/data/trailing_comma_optional_parens1.py

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22
_winapi.ERROR_PIPE_BUSY) or _check_timeout(t):
33
pass
44

5+
6+
class X:
7+
def get_help_text(self):
8+
return ngettext(
9+
"Your password must contain at least %(min_length)d character.",
10+
"Your password must contain at least %(min_length)d characters.",
11+
self.min_length,
12+
) % {'min_length': self.min_length}
13+
14+
class A:
15+
def b(self):
16+
if self.connection.mysql_is_mariadb and (
17+
10,
18+
4,
19+
3,
20+
) < self.connection.mysql_version < (10, 5, 2):
21+
pass
22+
23+
524
# output
625

726
if (
@@ -12,4 +31,31 @@
1231
)
1332
or _check_timeout(t)
1433
):
15-
pass
34+
pass
35+
36+
37+
class X:
38+
def get_help_text(self):
39+
return (
40+
ngettext(
41+
"Your password must contain at least %(min_length)d character.",
42+
"Your password must contain at least %(min_length)d characters.",
43+
self.min_length,
44+
)
45+
% {"min_length": self.min_length}
46+
)
47+
48+
49+
class A:
50+
def b(self):
51+
if (
52+
self.connection.mysql_is_mariadb
53+
and (
54+
10,
55+
4,
56+
3,
57+
)
58+
< self.connection.mysql_version
59+
< (10, 5, 2)
60+
):
61+
pass

0 commit comments

Comments
 (0)