Skip to content

Commit 3947eb7

Browse files
committed
feat: prepare "contrib" area
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
1 parent 3c2ad7d commit 3947eb7

4 files changed

Lines changed: 22 additions & 20 deletions

File tree

cyclonedx/__test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from .builder.this import this_tool as o
2+
from .contrib.this import this_tool as n
3+
4+
a = o()
5+
b = n()

cyclonedx/builder/this.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,28 @@
1717

1818
"""Representation of this very python library."""
1919

20-
from ..contrib.this import this_tool as _this_tool, this_component as _this_component
20+
__all__ = ['this_component', 'this_tool', ]
21+
22+
from ..contrib.this import this_component as _this_component, this_tool as _this_tool
2123

2224
# endregion deprecated re-export
2325

2426
this_component = _this_component
25-
"""
26-
Alias of :func:`cyclonedx..contrib.this.this_component`.
27-
28-
This re-export location is deprecated.
29-
Use ``from ...contrib.this import this_component`` instead.
30-
The exported symbol itself is NOT deprecated - only this import path.
27+
"""Deprecated — Alias of :func:`cyclonedx.contrib.this.this_component`.
3128
3229
.. deprecated:: next
30+
This re-export location is deprecated.
31+
Use ``from cyclonedx.contrib.this import this_component`` instead.
32+
The exported symbol itself is NOT deprecated - only this import path.
3333
"""
3434

3535
this_tool = _this_tool
36-
"""
37-
Alias of :func:`cyclonedx..contrib.this.this_tool`.
38-
39-
This re-export location is deprecated.
40-
Use ``from ...contrib.this import this_tool`` instead.
41-
The exported symbol itself is NOT deprecated - only this import path.
36+
"""Deprecated — Alias of :func:`cyclonedx.contrib.this.this_tool`.
4237
4338
.. deprecated:: next
39+
This re-export location is deprecated.
40+
Use ``from cyclonedx.contrib.this import this_tool`` instead.
41+
The exported symbol itself is NOT deprecated - only this import path.
4442
"""
4543

4644
# endregion deprecated re-export

cyclonedx/contrib/this.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# This file is part of CycloneDX Python Library
32
#
43
# Licensed under the Apache License, Version 2.0 (the "License");

cyclonedx/factory/license.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@
1515
# SPDX-License-Identifier: Apache-2.0
1616
# Copyright (c) OWASP Foundation. All Rights Reserved.
1717

18+
__all__ = ['LicenseFactory']
19+
1820
from ..contrib.license import LicenseFactory as _LicenseFactory
1921

2022
# region deprecated re-export
2123

2224
LicenseFactory = _LicenseFactory
23-
"""
24-
Alias of :class:`cyclonedx.contrib.license.LicenseFactory`.
25-
26-
This re-export location is deprecated.
27-
Use ``from ...contrib.license import LicenseFactory`` instead.
28-
The exported symbol itself is NOT deprecated - only this import path.
25+
"""Deprecated — Alias of :class:`cyclonedx.contrib.license.LicenseFactory`.
2926
3027
.. deprecated:: next
28+
This re-export location is deprecated.
29+
Use ``from cyclonedx.contrib.license import LicenseFactory`` instead.
30+
The exported symbol itself is NOT deprecated - only this import path.
3131
"""
3232

3333
# endregion deprecated re-export

0 commit comments

Comments
 (0)