File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -289,9 +289,9 @@ def python_format(self) -> bool:
289289
290290 :type: `bool`"""
291291 ids = self .id
292- if not isinstance (ids , (list , tuple )):
293- ids = [ ids ]
294- return any (PYTHON_FORMAT .search (id ) for id in ids )
292+ if isinstance (ids , (list , tuple )):
293+ return any ( PYTHON_FORMAT . search ( id ) for id in ids )
294+ return bool (PYTHON_FORMAT .search (ids ) )
295295
296296 @property
297297 def python_brace_format (self ) -> bool :
@@ -304,9 +304,9 @@ def python_brace_format(self) -> bool:
304304
305305 :type: `bool`"""
306306 ids = self .id
307- if not isinstance (ids , (list , tuple )):
308- ids = [ ids ]
309- return any ( _has_python_brace_format (id ) for id in ids )
307+ if isinstance (ids , (list , tuple )):
308+ return any ( _has_python_brace_format ( id ) for id in ids )
309+ return _has_python_brace_format (ids )
310310
311311
312312class TranslationError (Exception ):
You can’t perform that action at this time.
0 commit comments