U
    -c                     @   sV   d Z ddlmZmZ ddlmZ ededZG dd deZeed	d
dZefZ	dS )zThe purpose of this module is implement PEP 621 validations that are
difficult to express as a JSON Schema (or that are not supported by the current
JSON Schema library).
    )MappingTypeVar   )ValidationErrorT)boundc                   @   s   e Zd ZdZdS )RedefiningStaticFieldAsDynamiczAccording to PEP 621:

    Build back-ends MUST raise an error if the metadata specifies a field
    statically as well as being listed in dynamic.
    N)__name__
__module____qualname____doc__ r   r   [/tmp/pip-unpacked-wheel-izj_87as/setuptools/config/_validate_pyproject/extra_validations.pyr      s   r   )	pyprojectreturnc                 C   sp   |  di }| dg }|D ]N}||krd| d}|d7 }d| }||| ddd|i}t|||d	d
q| S )Nprojectdynamicz(You cannot provide a value for `project.z` and z0list it under `project.dynamic` at the same timezdata.project.z...z # ...zPEP 621)Zrule)getr   )r   Zproject_tabler   fieldmsgnamevaluer   r   r   validate_project_dynamic   s    
r   N)
r   typingr   r   Zerror_reportingr   r   r   r   ZEXTRA_VALIDATIONSr   r   r   r   <module>   s   