diff options
| author | robot-piglet <[email protected]> | 2025-04-18 10:01:23 +0300 |
|---|---|---|
| committer | robot-piglet <[email protected]> | 2025-04-18 10:11:30 +0300 |
| commit | 29fdf8a9f783e2c0606a9bd4a3af8f8fc9744c51 (patch) | |
| tree | d49dc239da0da3011f724e57ef19b34eb0ab4105 /contrib/python/allure-python-commons | |
| parent | a7a5bcf29159ffaaaeda629263134d5b43df082f (diff) | |
Intermediate changes
commit_hash:f57d2c87e0eaaab821faa70c3864ec0e7320355d
Diffstat (limited to 'contrib/python/allure-python-commons')
| -rw-r--r-- | contrib/python/allure-python-commons/.dist-info/METADATA | 24 | ||||
| -rw-r--r-- | contrib/python/allure-python-commons/allure/__init__.py (renamed from contrib/python/allure-python-commons/allure.py) | 2 | ||||
| -rw-r--r-- | contrib/python/allure-python-commons/allure/py.typed | 0 | ||||
| -rw-r--r-- | contrib/python/allure-python-commons/allure_commons/_allure.py | 16 | ||||
| -rw-r--r-- | contrib/python/allure-python-commons/allure_commons/logger.py | 2 | ||||
| -rw-r--r-- | contrib/python/allure-python-commons/allure_commons/model2.py | 6 | ||||
| -rw-r--r-- | contrib/python/allure-python-commons/allure_commons/py.typed | 0 | ||||
| -rw-r--r-- | contrib/python/allure-python-commons/allure_commons/types.py | 2 | ||||
| -rw-r--r-- | contrib/python/allure-python-commons/ya.make | 6 |
9 files changed, 41 insertions, 17 deletions
diff --git a/contrib/python/allure-python-commons/.dist-info/METADATA b/contrib/python/allure-python-commons/.dist-info/METADATA index 94cd97681a8..b79879133e7 100644 --- a/contrib/python/allure-python-commons/.dist-info/METADATA +++ b/contrib/python/allure-python-commons/.dist-info/METADATA @@ -1,7 +1,7 @@ -Metadata-Version: 2.1 +Metadata-Version: 2.4 Name: allure-python-commons -Version: 2.13.5 -Summary: ('Contains the API for end users as well as helper functions and classes to build Allure adapters for Python test frameworks',) +Version: 2.14.0 +Summary: Contains the API for end users as well as helper functions and classes to build Allure adapters for Python test frameworks Home-page: https://allurereport.org/ Author: Qameta Software Inc., Stanislav Seliverstov Author-email: [email protected] @@ -15,16 +15,28 @@ Classifier: Topic :: Software Development :: Quality Assurance Classifier: Topic :: Software Development :: Testing Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3 :: Only -Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 Requires-Python: >=3.6 Description-Content-Type: text/markdown -Requires-Dist: attrs >=16.0.0 -Requires-Dist: pluggy >=0.4.0 +Requires-Dist: attrs>=16.0.0 +Requires-Dist: pluggy>=0.4.0 +Dynamic: author +Dynamic: author-email +Dynamic: classifier +Dynamic: description +Dynamic: description-content-type +Dynamic: home-page +Dynamic: keywords +Dynamic: license +Dynamic: project-url +Dynamic: requires-dist +Dynamic: requires-python +Dynamic: summary ## Allure Common API diff --git a/contrib/python/allure-python-commons/allure.py b/contrib/python/allure-python-commons/allure/__init__.py index 4acb83e37a3..c30329a6e8a 100644 --- a/contrib/python/allure-python-commons/allure.py +++ b/contrib/python/allure-python-commons/allure/__init__.py @@ -3,7 +3,7 @@ from allure_commons._allure import description, description_html from allure_commons._allure import label from allure_commons._allure import severity from allure_commons._allure import tag -from allure_commons._allure import id +from allure_commons._allure import id # noqa: A004 from allure_commons._allure import suite, parent_suite, sub_suite from allure_commons._allure import epic, feature, story from allure_commons._allure import link, issue, testcase diff --git a/contrib/python/allure-python-commons/allure/py.typed b/contrib/python/allure-python-commons/allure/py.typed new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/contrib/python/allure-python-commons/allure/py.typed diff --git a/contrib/python/allure-python-commons/allure_commons/_allure.py b/contrib/python/allure-python-commons/allure_commons/_allure.py index 05e01dbd4be..b7bbe2a5e07 100644 --- a/contrib/python/allure-python-commons/allure_commons/_allure.py +++ b/contrib/python/allure-python-commons/allure_commons/_allure.py @@ -1,5 +1,5 @@ from functools import wraps -from typing import Any, Callable, TypeVar +from typing import Any, Callable, TypeVar, Union, overload from allure_commons._core import plugin_manager from allure_commons.types import LabelType, LinkType, ParameterMode @@ -133,7 +133,7 @@ class Dynamic: plugin_manager.hook.add_link(url=url, link_type=link_type, name=name) @staticmethod - def parameter(name, value, excluded=None, mode: ParameterMode = None): + def parameter(name, value, excluded=None, mode: Union[ParameterMode, None] = None): plugin_manager.hook.add_parameter(name=name, value=value, excluded=excluded, mode=mode) @staticmethod @@ -161,6 +161,16 @@ class Dynamic: return Dynamic.label(LabelType.MANUAL, True) +@overload +def step(title: str) -> "StepContext": + ... + + +@overload +def step(title: _TFunc) -> _TFunc: + ... + + def step(title): if callable(title): return StepContext(title.__name__, {})(title) @@ -191,7 +201,7 @@ class StepContext: with StepContext(self.title.format(*args, **params), params): return func(*a, **kw) - return impl + return impl # type: ignore class Attach: diff --git a/contrib/python/allure-python-commons/allure_commons/logger.py b/contrib/python/allure-python-commons/allure_commons/logger.py index d0ac1e2491b..55f956f2507 100644 --- a/contrib/python/allure-python-commons/allure_commons/logger.py +++ b/contrib/python/allure-python-commons/allure_commons/logger.py @@ -15,7 +15,7 @@ class AllureFileLogger: def __init__(self, report_dir, clean=False): self._report_dir = Path(report_dir).absolute() if self._report_dir.is_dir() and clean: - shutil.rmtree(self._report_dir) + shutil.rmtree(self._report_dir, ignore_errors=True) self._report_dir.mkdir(parents=True, exist_ok=True) def _report_item(self, item): diff --git a/contrib/python/allure-python-commons/allure_commons/model2.py b/contrib/python/allure-python-commons/allure_commons/model2.py index e8fd330a0b0..ccaf4459d6a 100644 --- a/contrib/python/allure-python-commons/allure_commons/model2.py +++ b/contrib/python/allure-python-commons/allure_commons/model2.py @@ -53,7 +53,7 @@ class TestResult(ExecutableItem): @attrs class TestStepResult(ExecutableItem): - id = attrib(default=None) + id = attrib(default=None) # noqa: A003 @attrs @@ -82,7 +82,7 @@ class Label: @attrs class Link: - type = attrib(default=None) + type = attrib(default=None) # noqa: A003 url = attrib(default=None) name = attrib(default=None) @@ -99,7 +99,7 @@ class StatusDetails: class Attachment: name = attrib(default=None) source = attrib(default=None) - type = attrib(default=None) + type = attrib(default=None) # noqa: A003 class Status: diff --git a/contrib/python/allure-python-commons/allure_commons/py.typed b/contrib/python/allure-python-commons/allure_commons/py.typed new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/contrib/python/allure-python-commons/allure_commons/py.typed diff --git a/contrib/python/allure-python-commons/allure_commons/types.py b/contrib/python/allure-python-commons/allure_commons/types.py index 06b77dfa151..e631e427c60 100644 --- a/contrib/python/allure-python-commons/allure_commons/types.py +++ b/contrib/python/allure-python-commons/allure_commons/types.py @@ -53,7 +53,7 @@ class AttachmentType(Enum): PNG = ("image/png", "png") JPG = ("image/jpg", "jpg") - SVG = ("image/svg-xml", "svg") + SVG = ("image/svg+xml", "svg") GIF = ("image/gif", "gif") BMP = ("image/bmp", "bmp") TIFF = ("image/tiff", "tiff") diff --git a/contrib/python/allure-python-commons/ya.make b/contrib/python/allure-python-commons/ya.make index 7f3ae9bda73..65be7572db6 100644 --- a/contrib/python/allure-python-commons/ya.make +++ b/contrib/python/allure-python-commons/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(2.13.5) +VERSION(2.14.0) LICENSE(Apache-2.0) @@ -15,7 +15,7 @@ NO_LINT() PY_SRCS( TOP_LEVEL - allure.py + allure/__init__.py allure_commons/__init__.py allure_commons/_allure.py allure_commons/_core.py @@ -33,6 +33,8 @@ RESOURCE_FILES( PREFIX contrib/python/allure-python-commons/ .dist-info/METADATA .dist-info/top_level.txt + allure/py.typed + allure_commons/py.typed ) END() |
