Skip to content

Commit 5db6771

Browse files
committed
helpers and pythonic
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
1 parent 63dc58c commit 5db6771

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

cyclonedx/model/tool.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from collections.abc import Iterable
2020
from itertools import chain
2121
from typing import TYPE_CHECKING, Any, Optional, Union
22-
from warnings import warn
2322
from xml.etree.ElementTree import Element # nosec B405
2423

2524
import py_serializable as serializable

cyclonedx/schema/deprecation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def _warn(cls, deprecated: str, instead: Optional[str] = None,
4343
msg = f'`{deprecated}` is deprecated from CycloneDX v{cls.SCHEMA_VERSION.to_version()} onwards.'
4444
if instead:
4545
msg += f' Please use `{instead}` instead.'
46-
warn(msg, cls, stacklevel=stacklevel + 1)
46+
warn(msg, category=cls, stacklevel=stacklevel + 1)
4747

4848

4949
class DeprecationWarning1Dot7(SchemaDeprecationWarning):

0 commit comments

Comments
 (0)