Skip to content

Commit bd37a9e

Browse files
committed
feat: prepare "contrib" area
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 885d47e commit bd37a9e

File tree

6 files changed

+50
-18
lines changed

6 files changed

+50
-18
lines changed

cyclonedx/builder/this.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
else:
2828
from typing_extensions import deprecated
2929

30-
from ..contrib.this import this_component as _this_component, this_tool as _this_tool
30+
from ..contrib.this.builders import this_component as _this_component, this_tool as _this_tool
3131

3232
# region deprecated re-export
3333

@@ -38,23 +38,23 @@
3838

3939
@deprecated('Deprecated re-export location - see docstring of "this_component" for details.')
4040
def this_component() -> 'Component':
41-
"""Deprecated — alias of :func:`~cyclonedx.contrib.this.this_component`.
41+
"""Deprecated — Alias of :func:`cyclonedx.contrib.this.builders.this_component`.
4242
4343
.. deprecated:: next
4444
This re-export location is deprecated.
45-
Use ``from cyclonedx.contrib.this import this_component`` instead.
45+
Use ``from cyclonedx.contrib.this.builders import this_component`` instead.
4646
The exported symbol itself is NOT deprecated — only this import path.
4747
"""
4848
return _this_component()
4949

5050

5151
@deprecated('Deprecated re-export location - see docstring of "this_tool" for details.')
5252
def this_tool() -> 'Tool':
53-
"""Deprecated — alias of :func:`~cyclonedx.contrib.this.this_tool`.
53+
"""Deprecated — Alias of :func:`cyclonedx.contrib.this.builders.this_tool`.
5454
5555
.. deprecated:: next
5656
This re-export location is deprecated.
57-
Use ``from cyclonedx.contrib.this import this_tool`` instead.
57+
Use ``from cyclonedx.contrib.this.builders import this_tool`` instead.
5858
The exported symbol itself is NOT deprecated — only this import path.
5959
"""
6060
return _this_tool()
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file is part of CycloneDX Python Library
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# SPDX-License-Identifier: Apache-2.0
16+
# Copyright (c) OWASP Foundation. All Rights Reserved.

cyclonedx/contrib/license.py renamed to cyclonedx/contrib/license/factories.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919

2020
from typing import TYPE_CHECKING, Optional
2121

22-
from ..exception.factory import InvalidLicenseExpressionException, InvalidSpdxLicenseException
23-
from ..model.license import DisjunctiveLicense, LicenseExpression
24-
from ..spdx import fixup_id as spdx_fixup, is_expression as is_spdx_expression
22+
from ...exception.factory import InvalidLicenseExpressionException, InvalidSpdxLicenseException
23+
from ...model.license import DisjunctiveLicense, LicenseExpression
24+
from ...spdx import fixup_id as spdx_fixup, is_expression as is_spdx_expression
2525

2626
if TYPE_CHECKING: # pragma: no cover
27-
from ..model import AttachedText, XsUri
28-
from ..model.license import License, LicenseAcknowledgement
27+
from ...model import AttachedText, XsUri
28+
from ...model.license import License, LicenseAcknowledgement
2929

3030

3131
class LicenseFactory:

cyclonedx/contrib/this/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file is part of CycloneDX Python Library
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# SPDX-License-Identifier: Apache-2.0
16+
# Copyright (c) OWASP Foundation. All Rights Reserved.

cyclonedx/contrib/this.py renamed to cyclonedx/contrib/this/builders.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919

2020
__all__ = ['this_component', 'this_tool', ]
2121

22-
from .. import __version__ as __ThisVersion # noqa: N812
23-
from ..model import ExternalReference, ExternalReferenceType, XsUri
24-
from ..model.component import Component, ComponentType
25-
from ..model.license import DisjunctiveLicense, LicenseAcknowledgement
26-
from ..model.tool import Tool
22+
from ... import __version__ as __ThisVersion # noqa: N812
23+
from ...model import ExternalReference, ExternalReferenceType, XsUri
24+
from ...model.component import Component, ComponentType
25+
from ...model.license import DisjunctiveLicense, LicenseAcknowledgement
26+
from ...model.tool import Tool
2727

2828
# !!! keep this file in sync with `pyproject.toml`
2929

cyclonedx/factory/license.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@
2424
else:
2525
from typing_extensions import deprecated
2626

27-
from ..contrib.license import LicenseFactory as _LicenseFactory
27+
from ..contrib.license.factories import LicenseFactory as _LicenseFactory
2828

2929
# region deprecated re-export
3030

3131

3232
@deprecated('Deprecated re-export location - see docstring of "LicenseFactory" for details.')
3333
class LicenseFactory(_LicenseFactory):
34-
"""Deprecated — Alias of :class:`cyclonedx.contrib.license.LicenseFactory`.
34+
"""Deprecated — Alias of :class:`cyclonedx.contrib.license.factories.LicenseFactory`.
3535
3636
.. deprecated:: next
3737
This re-export location is deprecated.
38-
Use ``from cyclonedx.contrib.license import LicenseFactory`` instead.
38+
Use ``from cyclonedx.contrib.license.factories import LicenseFactory`` instead.
3939
The exported symbol itself is NOT deprecated - only this import path.
4040
"""
4141

0 commit comments

Comments
 (0)