
    ܖi	                        U g d Z ddlmZ ddlmZmZ ddlmZ ddl	m
Z erddlmZ  ee      5 Z e ee      j!                  dg             Zee   ed	<   d
d
d
        ee      dkD  sJ d       eD  ci c]  } | j+                         |  c} Zeeef   ed<    e       Zded<   dedefdZdedee   fdZdedefdZy
# 1 sw Y   lxY wc c} w ))is_supported_idfixup_idis_expression    )load)TYPE_CHECKINGOptional)get_spdx_licensing   )	SPDX_JSON)	Licensingenum__IDSNz&known SPDX-IDs should be non-empty set__IDS_LOWER_MAPr   __SPDX_EXPRESSION_LICENSINGvaluereturnc                     | t         v S )z+Validate SPDX-ID according to current spec.)r   r   s    R/var/www/html/content-pipeline/venv/lib/python3.12/site-packages/cyclonedx/spdx.pyr   r   1   s    E>    c                 H    t         j                  | j                               S )z`Fixup SPDX-ID.

    :returns: repaired value string, or `None` if fixup was unable to help.
    )r   getlowerr   s    r   r   r   6   s    
 u{{}--r   c                 |    	 t         j                  |       }dt        |j                        k(  S # t        $ r Y yw xY w)a  Validate SPDX license expression.

    .. note::
        Utilizes `license-expression library`_ to
        validate SPDX compound expression according to `SPDX license expression spec`_.

    .. _SPDX license expression spec: https://spdx.github.io/spdx-spec/v3.0.1/annexes/spdx-license-expressions/
    .. _license-expression library: https://github.com/nexB/license-expression
    Fr   )r   validate	Exceptionlenerrors)r   ress     r   r   r   >   s@    )2259 CJJ  s   / 	;;)__all__jsonr   	json_loadtypingr   r   license_expressionr	   schema._resr   __SPDX_JSON_SCHEMAr   openschemasetr   r   str__annotations__r   r   r   dictr   boolr   r   r   )id_s   0r   <module>r/      s   & 
 # * 1 8, 

 =)F+//;<E3s8<=
5zA~ ?? ?~?D"E399;#3"Ec3h E+=+? [ ?
3 4 
.C .HSM .     1= = #Fs   'C5CC