Skip to content

Commit 571d0dd

Browse files
committed
docs
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent b0cf217 commit 571d0dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cyclonedx_py/_internal/utils/packaging.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ def metadata2licenses(metadata: 'PackageMetadata', lfac: 'LicenseFactory',
3838
) -> Generator['License', None, None]:
3939
lack = LicenseAcknowledgement.DECLARED
4040
if (lexp := metadata.get('License-Expression')) is not None:
41+
# see https://packaging.python.org/en/latest/specifications/license-expression/
4142
# see spec: https://peps.python.org/pep-0639/#add-license-expression-field
4243
yield lfac.make_from_string(lexp,
4344
license_acknowledgement=lack)
44-
else: # per PEP630, if License-Expression exists, the deprecated declarations MUST be ignored
45+
# Per PEP 639: if License-Expression exists, the deprecated declarations MUST be ignored
46+
else:
4547
if 'Classifier' in metadata:
4648
# see spec: https://packaging.python.org/en/latest/specifications/core-metadata/#classifier-multiple-use
4749
classifiers: list[str] = metadata.get_all('Classifier') # type:ignore[assignment]

0 commit comments

Comments
 (0)