Merge pull request #24 from pkgw/custom-licenserefs

Declare some custom LicenseRefs for SPDX validation
This commit is contained in:
Peter Williams 2023-06-29 23:09:40 -04:00 коммит произвёл GitHub
Родитель 8db90ff2dd beecbc0573
Коммит d3849be4d6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 15 добавлений и 3 удалений

Просмотреть файл

@ -11,7 +11,12 @@ from dataclasses import dataclass, field
from dataclasses_json import config, dataclass_json
from html_sanitizer.sanitizer import Sanitizer, DEFAULT_SETTINGS
from license_expression import get_spdx_licensing, ExpressionError
from license_expression import (
build_spdx_licensing,
get_license_index,
vendored_scancode_licensedb_index_location,
ExpressionError,
)
__all__ = """
HandleImageStats
@ -41,10 +46,17 @@ SceneUpdate
""".split()
CX_LICENSING = get_spdx_licensing()
def _make_constellations_licensing():
index = get_license_index(vendored_scancode_licensedb_index_location)
index.append({"spdx_license_key": "LicenseRef-None"})
index.append({"spdx_license_key": "LicenseRef-WWT"})
return build_spdx_licensing(index)
CX_LICENSING = _make_constellations_licensing()
CX_SANITIZER_SETTINGS = DEFAULT_SETTINGS.copy()
CX_SANITIZER_SETTINGS.update(
tags={"b", "strong", "i", "em", "a", "br"}, empty={}, separate={}
tags={"b", "strong", "i", "em", "a", "br"}, empty=set(), separate=set()
)
CX_SANITIZER = Sanitizer(settings=CX_SANITIZER_SETTINGS)