Skip to content

Commit 4b5f545

Browse files
author
Glazov Nikolay
committed
Delete comments and unused imports
1 parent 3e46662 commit 4b5f545

File tree

3 files changed

+8
-21
lines changed

3 files changed

+8
-21
lines changed

allure-python-commons/src/_core.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
import threading
21
import multiprocessing
32
from six import with_metaclass
43
from pluggy import PluginManager
54
from allure_commons import _hooks
65

76

87
class MetaPluginManager(type):
9-
# _storage = threading.local()
108
_storage = multiprocessing.Process
119

1210
@staticmethod

allure-python-commons/src/lifecycle.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def write_test_case(self, uuid=None):
5353
@contextmanager
5454
def start_step(self, parent_uuid=None, uuid=None):
5555
parent = self._get_item(uuid=parent_uuid, item_type=ExecutableItem)
56-
# step = TestStepResult()
5756
step = TestStepResult(thrd=threading.current_thread().name)
5857
step.start = now()
5958
parent.steps.append(step)

allure-python-commons/src/reporter.py

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
11
from 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
203
from 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

2310
class 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

Comments
 (0)