Skip to content

Commit a6998f9

Browse files
committed
refactor!: rename spdx.is_compound_expression -> spdx.is_expression
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 8ef7e45 commit a6998f9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cyclonedx/spdx.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
__all__ = [
2020
'is_supported_id', 'fixup_id',
21-
'is_compound_expression'
21+
'is_expression'
2222
]
2323

2424
from json import load as json_load
@@ -47,26 +47,26 @@
4747

4848

4949
def is_supported_id(value: str) -> bool:
50-
"""Validate a SPDX-ID according to current spec."""
50+
"""Validate SPDX-ID according to current spec."""
5151
return value in __IDS
5252

5353

5454
def fixup_id(value: str) -> Optional[str]:
55-
"""Fixup a SPDX-ID.
55+
"""Fixup SPDX-ID.
5656
5757
:returns: repaired value string, or `None` if fixup was unable to help.
5858
"""
5959
return __IDS_LOWER_MAP.get(value.lower())
6060

6161

62-
def is_compound_expression(value: str) -> bool:
63-
"""Validate compound expression.
62+
def is_expression(value: str) -> bool:
63+
"""Validate SPDX license expression.
6464
6565
.. note::
6666
Utilizes `license-expression library`_ to
6767
validate SPDX compound expression according to `SPDX license expression spec`_.
6868
69-
.. _SPDX license expression spec: https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/
69+
.. _SPDX license expression spec: https://spdx.github.io/spdx-spec/v3.0.1/annexes/spdx-license-expressions/
7070
.. _license-expression library: https://github.com/nexB/license-expression
7171
"""
7272
try:

0 commit comments

Comments
 (0)