Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
B

!¬¬/‘ú6?ã@sjdZddlZddlZddlZddlmZddlmZmZddl	Z	edƒZ
Gdd„deƒZGdd	„d	ƒZ
dS)
z*TOML configuration support for coverage.pyéN)ÚConfigError)Úimport_third_partyÚsubstitute_variablesÚtomlic@seZdZdZdS)ÚTomlDecodeErrorz>An exception class that exists even when toml isn't installed.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__©rrú’/build/wlanpi-profiler-7IIg1Q/wlanpi-profiler-1.0.11/debian/wlanpi-profiler/opt/wlanpi-profiler/lib/python3.7/site-packages/coverage/tomlconfig.pyrsrc@sˆeZdZdZdd„Zdd„Zdd„Zdd	„Zd
d„Zdd
„Z	dd„Z
dd„Zdd„Zdd„Z
dd„Zdd„Zdd„Zdd„Zdd„Zd S)!ÚTomlConfigParserz:TOML file reading with the interface of HandyConfigParser.cCs||_d|_dS)N)Úour_fileÚdata)ÚselfrrrrÚ__init__!szTomlConfigParser.__init__c
Csît|tttjfƒst‚t |¡}y$t|dd}| ¡}WdQRXWnt	k
rXgSXt
dk	r¸t|tjƒ}yt
 
|¡|_Wn2t
jk
r°}ztt|ƒƒ|‚Wdd}~XYnX|gStjd|tjd}|jsÔ|ræd}t| |¡ƒ‚gSdS)Nzutf-8)Úencodingz^\[tool\.coverage\.)Úflagsz?Can't read {!r} without TOML support. Install with [toml] extra)Ú
isinstanceÚbytesÚstrÚosÚPathLikeÚAssertionErrorÚfspathÚopenÚreadÚOSErrorrrÚenvironÚloadsrÚTOMLDecodeErrorrÚreÚsearchÚ	MULTILINErrÚformat)rÚ	filenamesÚfilenameÚfpZ	toml_textÚerrZhas_tomlÚmsgrrrr%s&
 
zTomlConfigParser.readc	CsŒdg}|jr| d¡xl|D]`}||}| d¡}y0|j|d}x|dd…D]}||}qPWWntk
rxwYnXPqWdS||fS)aCGet a section from the data.

        Arguments:
            section (str): A section name, which can be dotted.

        Returns:
            name (str): the actual name of the section that was found, if any,
                or None.
            data (str): the dict of data in the section, or None if not found.

        ztool.coverage.ÚÚ.réN)NN)rÚappendÚsplitrÚKeyError)rÚsectionÚprefixesÚprefixZreal_sectionÚpartsrÚpartrrrÚ_get_section?s


zTomlConfigParser._get_sectionc
Csb| |¡\}}|dkr t |¡‚y|||fStk
r\}zt ||¡|‚Wdd}~XYnXdS)z;Like .get, but returns the real section name and the value.N)r5ÚconfigparserÚNoSectionErrorr/Ú
NoOptionError)rr0ÚoptionÚnamerÚexcrrrÚ_get\s
zTomlConfigParser._getcCs"| |¡\}}|dkrdS||kS)NF)r5)rr0r9Ú_rrrrÚ
has_optionfszTomlConfigParser.has_optioncCs| |¡\}}|S)N)r5)rr0r:r=rrrÚhas_sectionlszTomlConfigParser.has_sectioncCs,| |¡\}}|dkr t |¡‚t| ¡ƒS)N)r5r6r7ÚlistÚkeys)rr0r=rrrrÚoptionsps
zTomlConfigParser.optionscCs| |¡\}}|S)N)r5)rr0r=rrrrÚget_sectionvszTomlConfigParser.get_sectioncCs| ||¡\}}|S)N)r<)rr0r9r=ÚvaluerrrÚgetzszTomlConfigParser.getcCs"t||ƒstd ||||¡ƒ‚dS)Nz+Option {!r} in section {!r} is not {}: {!r})rÚ
ValueErrorr$)rr0r9rDÚtype_Z	type_descrrrÚ_check_type~s
zTomlConfigParser._check_typecCs&| ||¡\}}| |||td¡|S)Nz	a boolean)r<rHÚbool)rr0r9r:rDrrrÚ
getboolean…szTomlConfigParser.getbooleancCs&| ||¡\}}| |||td¡|S)Nza list)r<rHr@)rr0r9r:ÚvaluesrrrÚgetlistŠszTomlConfigParser.getlistc
Cs’| ||¡\}}| |||td¡xj|D]b}| ¡}yt |¡Wq(tjk
rˆ}z&td|›d|›d|›d|›ƒ|‚Wdd}~XYq(Xq(W|S)Nza listz	Invalid [z].z value z: )r<rHr@Ústripr!ÚcompileÚerrorr)rr0r9r:rKrDÚerrrÚgetregexlists
8zTomlConfigParser.getregexlistcCs&| ||¡\}}| |||td¡|S)Nz
an integer)r<rHÚint)rr0r9r:rDrrrÚgetintšszTomlConfigParser.getintcCs8| ||¡\}}t|tƒr"t|ƒ}| |||td¡|S)Nza float)r<rrRÚfloatrH)rr0r9r:rDrrrÚgetfloatŸs

zTomlConfigParser.getfloatN)rrr	r
rrr5r<r>r?rBrCrErHrJrLrQrSrUrrrrr
s 
r
)r
r6rr!Zcoverage.exceptionsrZ
coverage.miscrrÚtypingrÚ	Exceptionrr
rrrrÚ<module>s