o
    ic                     @  s   d dl mZ d dlZd dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZmZ d dlmZ eed	ZdddZdddZdS )    )annotationsN)Sequence)Any)urlsplit)settings)CheckMessageError)conf kwargsr   returnlist[CheckMessage]c            	      K  st  g }t tjts|tddd t tjts |tddd ttjt	s/|tddd ttj
t	s>|tdd	d ttjtrItjd
k rR|tddd ttjt	snttdr`d}nd}|t| ddd ttdrvd}nd}t tjts|t| ddd nOd}tjD ]I}||v rqt|}|jdks|jdkr|tdt| d| dddd qdD ]}t||dkr|tdt| d| d| dd qqttd rd }nd!}t tjttfs|t| d"d#d t tjts|td$d%d ttjttfs|td&d'd ttd(r)|td)d*d ttd+r8|td,dd |S )-Nz3CORS_ALLOW_HEADERS should be a sequence of strings.zcorsheaders.E001)idz3CORS_ALLOW_METHODS should be a sequence of strings.zcorsheaders.E002z(CORS_ALLOW_CREDENTIALS should be a bool.zcorsheaders.E003z,CORS_ALLOW_PRIVATE_NETWORK should be a bool.zcorsheaders.E015r   zJCORS_PREFLIGHT_MAX_AGE should be an integer greater than or equal to zero.zcorsheaders.E004CORS_ALLOW_ALL_ORIGINSCORS_ORIGIN_ALLOW_ALLz should be a bool.zcorsheaders.E005CORS_ALLOWED_ORIGINSCORS_ORIGIN_WHITELISTz! should be a sequence of strings.zcorsheaders.E006)nullzfile://r
   zOrigin z in z is missing scheme or netloczcorsheaders.E013z:Add a scheme (e.g. https://) or netloc (e.g. example.com).)r   hint)pathqueryfragmentz should not have zcorsheaders.E014CORS_ALLOWED_ORIGIN_REGEXESCORS_ORIGIN_REGEX_WHITELISTz9 should be a sequence of strings and/or compiled regexes.zcorsheaders.E007z)CORS_EXPOSE_HEADERS should be a sequence.zcorsheaders.E008z,CORS_URLS_REGEX should be a string or regex.zcorsheaders.E009
CORS_MODELzKThe CORS_MODEL setting has been removed - see django-cors-headers' HISTORY.zcorsheaders.E012CORS_REPLACE_HTTPS_REFERERz]The CORS_REPLACE_HTTPS_REFERER setting has been removed - see django-cors-headers' CHANGELOG.)is_sequencer	   CORS_ALLOW_HEADERSstrappendr   CORS_ALLOW_METHODS
isinstanceCORS_ALLOW_CREDENTIALSboolCORS_ALLOW_PRIVATE_NETWORKCORS_PREFLIGHT_MAX_AGEintr   hasattrr   r   r   schemenetlocreprgetattrr   re_typeCORS_EXPOSE_HEADERSCORS_URLS_REGEX)	r   errorsallow_all_aliasallowed_origins_aliasspecial_origin_valuesoriginparsedpartallowed_regexes_alias r7   r/var/www/snowflake_co_dev_github/snow_flake_back_end_deploy/env/lib/python3.10/site-packages/corsheaders/checks.pycheck_settings   s   







	



r9   thingtype_or_types!type[Any] | tuple[type[Any], ...]r#   c                   s    t | tot fdd| D S )Nc                 3  s    | ]}t | V  qd S )N)r!   ).0xr;   r7   r8   	<genexpr>   s    

zis_sequence.<locals>.<genexpr>)r!   r   all)r:   r;   r7   r?   r8   r      s   r   )r   r   r   r   )r:   r   r;   r<   r   r#   )
__future__r   recollections.abcr   typingr   urllib.parser   django.confr   django.core.checksr   r   corsheaders.confr	   typecompiler,   r9   r   r7   r7   r7   r8   <module>   s    
 