Skip to content

Commit 06a22c7

Browse files
committed
Added missing docs
Signed-off-by: Manav Gupta <[email protected]>
1 parent 0faa6da commit 06a22c7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cyclonedx_py/_internal/utils/pep621.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ def project2licenses(project: dict[str, Any], lfac: 'LicenseFactory', *,
6262
yield from classifiers2licenses(classifiers, lfac, lack)
6363
if isinstance(plicense := project.get('license'), dict):
6464
# https://packaging.python.org/en/latest/specifications/pyproject-toml/#license
65+
# https://peps.python.org/pep-0621/#license
66+
# https://packaging.python.org/en/latest/specifications/core-metadata/#license
6567
if 'file' in plicense and 'text' in plicense:
68+
# per spec:
69+
# > If both a file and text are provided, tools MUST raise an error.
70+
# > Tools MUST NOT assume that the file and text are the same.
6671
raise ValueError('`license.file` and `license.text` are mutually exclusive,')
6772
if 'file' in plicense:
6873
# per spec:

0 commit comments

Comments
 (0)