From ba3d51015f635f0e2e0d39b219eb4d2d0a40f1e5 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 25 Jan 2022 21:16:05 -0800 Subject: [PATCH] more trailing comma tests --- tests/data/trailing_comma_optional_parens1.py | 48 ++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/tests/data/trailing_comma_optional_parens1.py b/tests/data/trailing_comma_optional_parens1.py index f5be2f24cf4..f9f4ae5e023 100644 --- a/tests/data/trailing_comma_optional_parens1.py +++ b/tests/data/trailing_comma_optional_parens1.py @@ -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 ( @@ -12,4 +31,31 @@ ) or _check_timeout(t) ): - pass \ No newline at end of file + 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