11from collections import OrderedDict
2- # import os
3- # import shutil
4- # import threading
5- # from termcolor import cprint
6- # from pygments import highlight
7- # from pygments.lexers import PythonLexer
8- # from pygments.formatters import Terminal256Formatter
9- # from pprint import pformat
10- from allure_commons .utils import thread_tag , thread_tag_detail
11-
12- # def pprint_color(obj):
13- # print(highlight(pformat(obj), PythonLexer(), Terminal256Formatter()))
142
15- from allure_commons .types import AttachmentType
16- from allure_commons .model2 import ExecutableItem
17- from allure_commons .model2 import TestResult
18- from allure_commons .model2 import Attachment , ATTACHMENT_PATTERN
19- from allure_commons .utils import now
203from allure_commons ._core import plugin_manager
4+ from allure_commons .model2 import (ATTACHMENT_PATTERN , Attachment ,
5+ ExecutableItem , TestResult )
6+ from allure_commons .types import AttachmentType
7+ from allure_commons .utils import now , thread_tag_detail
218
229
2310class AllureReporter (object ):
@@ -38,7 +25,10 @@ def _update_item(self, uuid, **kwargs):
3825 def _last_executable (self ):
3926 copy_items = self ._items .copy ()
4027 for _uuid in reversed (copy_items ):
41- if hasattr (self ._items [_uuid ], "thrd" ) and self ._items [_uuid ].thrd != thread_tag_detail ():
28+ if (
29+ hasattr (self ._items [_uuid ], "thrd" )
30+ and self ._items [_uuid ].thrd != thread_tag_detail ()
31+ ):
4232 continue
4333 if isinstance (self ._items [_uuid ], ExecutableItem ):
4434 return _uuid
0 commit comments