§
    +" h   ã                  óZ   — d Z ddlmZ ddlZddlZddlZddlZddlmZ 	 	 	 	 	 	 	 ddd„Z	dS )a  Config handler.

This module allows people to keep their jira server credentials outside their script,
in a configuration file that is not saved in the source control.

Also, this simplifies the scripts by not having to write the same initialization code for each script.
é    )ÚannotationsN)ÚJIRAúhttp://localhost:2990ÚadminFTÚprofileú
str | NoneÚurlÚstrÚusernameÚpasswordÚverifyú
bool | strc                óp  — d„ }t          |t          ¦  «        r|rdnd}n|}t          j        dd|||dœd¬¦  «        } |d¦  «        }	|	rt	          j        d	|	› d
�¦  «         | sD|	rB|                     |	¦  «         	 |                     dd¦  «        } n# t          j        $ r Y nw xY w| rÚ|	rÁ|                     |	¦  «         |                     | d¦  «        }|                     | d¦  «        }|                     | d¦  «        }|                     | d¦  «        }|                     | d¦  «        }	 | 	                    | d¦  «        }n=# t          $ r |                     | d¦  «        }Y nw xY wt          dt          z  ¦  «        ‚t          j        }
||
d<   ||
d<   ||
d<   ||
d<   t          |
||f¬¦  «        S )a|  Return a JIRA object by loading the connection details from the `config.ini` file.

    Args:
        profile (Optional[str]): The name of the section from config.ini file that stores server config url/username/password
        url (str): URL of the Jira server
        username (str): username to use for authentication
        password (str): password to use for authentication
        appid: appid
        autofix: autofix
        verify (Union[bool, str]): True to indicate whether SSL certificates should be verified or
            str path to a CA_BUNDLE file or directory with certificates of trusted CAs. (Default: ``True``)

    Returns:
        JIRA: an instance to a JIRA object.

    Raises:
        EnvironmentError

    Usage:

        >>> from jira.config import get_jira
        >>>
        >>> jira = get_jira(profile='jira')

    Also create a `config.ini` like this and put it in current directory, user home directory or PYTHONPATH.

    .. code-block:: none

        [jira]
        url=https://jira.atlassian.com
        # only the `url` is mandatory
        user=...
        pass=...
        appid=...
        verify=...

    c                óP  — dt           j                             d¦  «        g}|                     t          j        ¦  «         |D ]b}t           j                             t           j                             || ¦  «        ¦  «        }t           j                             |¦  «        r|c S ŒcdS )zrFind the file named path in the sys.path.

        Returns the full path name if found, None if not found
        ú.ú~N)ÚosÚpathÚ
expanduserÚextendÚsysÚabspathÚjoinÚisfile)r   ÚpathsÚdirnameÚpossibles       úEc:\xampp_lite_8_4\www\timesheet\venv\Lib\site-packages\jira/config.pyÚfindfilezget_jira.<locals>.findfileA   s�   € ð
 •b”g×(Ò(¨Ñ-Ô-Ð.ˆØ�Š•S”XÑÔÐØð 	 ð 	 ˆGÝ”w—’¥r¤w§|¢|°G¸TÑ'BÔ'BÑCÔCˆHÝŒw�~Š~˜hÑ'Ô'ð  Ø���ð àˆtó    ÚyesÚnoN)ÚuserÚpassÚappidÚautofixr   T)ÚdefaultsÚallow_no_valuez
config.inizFound z config fileÚgeneralzdefault-jira-profiler	   r#   r$   r%   r&   r   zf%s was not able to locate the config.ini file in current directory, user home directory or PYTHONPATH.Úserver)ÚoptionsÚ
basic_auth)Ú
isinstanceÚboolÚconfigparserÚConfigParserÚloggingÚdebugÚreadÚgetÚNoOptionErrorÚ
getbooleanÚ
ValueErrorÚOSErrorÚ__name__r   ÚDEFAULT_OPTIONS)r   r	   r   r   r%   r&   r   r   ÚconfigÚconfig_filer+   s              r   Úget_jirar=      s?  € ð^ð ð õ �&�$ÑÔð Ø Ð*�� dˆˆàˆåÔ&àØØØØð
ð 
ð ð	ñ 	ô 	€Fð �(˜<Ñ(Ô(€KØð :ÝŒÐ8˜{Ð8Ð8Ð8Ñ9Ô9Ð9àð Øð 	Ø�KŠK˜Ñ$Ô$Ð$ðØ Ÿ*š* YÐ0FÑGÔG��øÝÔ-ð ð ð Ø�ðøøøð ð Øð 	Ø�KŠK˜Ñ$Ô$Ð$Ø—*’*˜W eÑ,Ô,ˆCØ—z’z '¨6Ñ2Ô2ˆHØ—z’z '¨6Ñ2Ô2ˆHØ—J’J˜w¨Ñ0Ô0ˆEØ—j’j ¨)Ñ4Ô4ˆGð7Ø×*Ò*¨7°HÑ=Ô=��øÝð 7ð 7ð 7ØŸš G¨XÑ6Ô6���ð7øøøõ ØxÝññô ð õ
 Ô"€GØ€GˆHÑØ €GˆIÑØ€GˆGÑØ€GˆHÑå˜¨X°xÐ,@ÐAÑAÔAÐAs$   Á=B ÂB&Â%B&Ä1E Å E+Å*E+)Nr   r   r   NFT)
r   r   r	   r
   r   r
   r   r
   r   r   )
Ú__doc__Ú
__future__r   r/   r1   r   r   Újira.clientr   r=   © r    r   ú<module>rB      s¤   ððð ð #Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ø €€€Ø 	€	€	€	Ø 
€
€
€
à Ð Ð Ð Ð Ð ð Ø&ØØØ
ØØðpBð pBð pBð pBð pBð pBð pBr    