§ 1jЂãój—dZddlZddlZddlZddlZddlZddlmZddlm Z ddl m Z m Z m Z ddlmZddlmZdd lmZdd lmZdd lmZmZejd krddlZn ddlZn #e$rdZYnwxYwd „ZGd„d¦«ZGd„d¦«Zedd¦«Z Gd„de!¦«Z"edd¦«Z#dS)z)Configuration file parsing and utilities.éN)Ú namedtuple)ÚSet)Ú NoOptionErrorÚNoSectionErrorÚRawConfigParser)Úreduce)Úcompileé)Ú __version__)Úlog)Ú ErrorRegistryÚ conventions)éé có‡—ˆfd„}|S)z4Check that the configuration object was initialized.cóV•—|j�|j€td¦«‚‰|g|¢Ri|¤ŽS)Nz$using an uninitialized configuration)Ú _argumentsÚ_optionsÚ RuntimeError)ÚselfÚargsÚkwargsÚmethods €úc/builddir/build/BUILD/cloudlinux-venv-1.0.11/venv/lib/python3.11/site-packages/pydocstyle/config.pyÚ _decoratorz%check_initialized.._decoratorsAø€Ø Œ?Ð " d¤mÐ&;ÝÐEÑFÔFÐ F؈v�dÐ,˜TÐ,Ð,Ð, VÐ,Ð,Ð,ó©)rrs` rÚcheck_initializedrs$ø€ð-ð-ð-ð-ð-ð ÐrcóL—eZdZdZd„Zd d„Zdd„Zd„Zd„Zdd œd „Z d „Z d „Z dS)Ú TomlParseraConfigParser that partially mimics RawConfigParser but for toml files. See RawConfigParser for more info. Also, please note that not all RawConfigParser functionality is implemented, but only the subset that is currently used by pydocstyle. có—i|_dS)zCreate a toml parser.N)Ú_config©rs rÚ__init__zTomlParser.__init__.s €àˆŒ ˆ ˆ rNcó —t|tttjf¦«r|g}g}|D]Ô} t |d¦«5}t s"tjd|¦« ddd¦«Œ=|j   t j |¦«¦«ddd¦«n #1swxYwYn#t$rYŒ�wxYwt|tj¦«rtj |¦«}| |¦«ŒÕ|S)aâRead and parse a filename or an iterable of filenames. Files that cannot be opened are silently ignored; this is designed so that you can specify an iterable of potential configuration file locations (e.g. current directory, user's home directory, systemwide directory), and all existing configuration files in the iterable will be read. A single filename may also be given. Return list of successfully read files. ÚrbzTThe %s configuration file was ignored, because the `tomli` package is not installed.N)Ú isinstanceÚstrÚbytesÚosÚPathLikeÚopenÚtomllibr Úwarningr"ÚupdateÚloadÚOSErrorÚfspathÚappend)rÚ filenamesÚencodingÚread_okÚfilenameÚfps rÚreadzTomlParser.read2sp€õ �i¥#¥u­b¬kÐ!:Ñ ;Ô ;ð $Ø"˜ ˆI؈Ø!ð %ð %ˆHð ݘ( DÑ)Ô)ð:¨RÝ"ð!Ýœ ðLà$ñôðð !ð:ð:ð:ñ:ô:ð:ð:ð”L×'Ò'­¬ °RÑ(8Ô(8Ñ9Ô9Ð9ð:ð:ð:ñ:ô:ð:ð:ð:ð:ð:ð:øøøð:ð:ð:ð:øøõð ð ð Ø�ð øøøå˜(¥B¤KÑ0Ô0ð /Ýœ9 XÑ.Ô.�Ø �NŠN˜8Ñ $Ô $Ð $Ð $؈sA²B0ÁB$Á B0Á,,B$ B0Â$B( Â(B0Â+B( Â,B0Â0 B=Â<B=Fcóð— ttj| d¦«|jd¦«}n#t $rd}YnwxYwt |t¦«r|S|rdSt|¦«‚)Nú.Útool) rÚoperatorÚgetitemÚsplitr"ÚKeyErrorr'Údictr)rÚsectionÚ allow_noneÚcurrents rÚ _get_sectionzTomlParser._get_sectionSs‘€ð ÝÝÔ Ø— ’ ˜cÑ"Ô"Ø” ˜VÔ$ñôˆGˆGøõ ð ð ð ØˆGˆGˆGð øøøõ �g�tÑ $Ô $ð *؈NØ ð *Ø�4å  Ñ)Ô)Ð )s‚9<¼ A Á A có4—| |d¬¦«duS)zCIndicate whether the named section is present in the configuration.T)rCN)rE)rrBs rÚ has_sectionzTomlParser.has_sectionds €à× Ò  °TÐ Ñ:Ô:À$ÐFÐFrcón—| |¦«}t| ¦«¦«S)z9Return a list of option names for the given section name.)rEÚlistÚkeys)rrBrDs rÚoptionszTomlParser.optionshs+€à×#Ò# GÑ,Ô,ˆÝ�G—L’L‘N”NÑ#Ô#Ð#r©Ú_convcóR—| |¦«}| ¦«} ||}n#t$rt||¦«‚wxYwt |t ¦«rt d|›d|›d�¦«‚|�(t ||¦«st d|›d|›d|›�¦«‚|S)z(Get an option value for a given section.z Expected r;z to be an option, not a section.Nz The type of z should be )rEÚlowerr@rr'rAÚ TypeError)rrBÚoptionrMÚdÚvalues rÚgetzTomlParser.getmsä€à × Ò ˜gÑ &Ô &ˆØ—’‘”ˆð 1Ø�f”IˆEˆEøÝð 1ð 1ð 1Ý ¨Ñ0Ô0Ð 0ð 1øøøõ �e�TÑ "Ô "ð ÝØN˜GÐNÐN fÐNÐNÐNñôð ð Ð ¥Z°°uÑ%=Ô%=Ð ÝØC˜wÐCÐC¨ÐCÐC¸EÐCÐCñôð ðˆ s «4´Acó<—| ||t¬¦«S)z/Get a boolean option value for a given section.rL)rTÚbool©rrBrQs rÚ getbooleanzTomlParser.getboolean„s€à�xŠx˜ ­tˆxÑ4Ô4Ð4rcó<—| ||t¬¦«S)z0Get an integer option value for a given section.rL)rTÚintrWs rÚgetintzTomlParser.getintˆs€à�xŠx˜ ­sˆxÑ3Ô3Ð3r©N)F) Ú__name__Ú __module__Ú __qualname__Ú__doc__r$r9rErGrKrTrXr[rrrr r &s³€€€€€ððððððððððB*ð*ð*ð*ð"GðGðGð$ð$ð$ð -1ðððððð.5ð5ð5ð4ð4ð4ð4ð4rr có—eZdZdZdZdZdZdZdZdZ e j Z dZ d Zd Zd „Zd „Zd „Zed„¦«Zed„¦«Zd„Zd„Zed„¦«Zd„Zd„Zd$d„Zed„¦«Zed%d„¦«Zed„¦«Z ed„¦«Z!ed„¦«Z"ed„¦«Z#ed„¦«Z$ed„¦«Z%ed „¦«Z&ed!„¦«Z'ed"„¦«Z(ed#„¦«Z)dS)&ÚConfigurationParseraResponsible for parsing configuration from files and CLI. There are 2 types of configurations: Run configurations and Check configurations. Run Configurations: ------------------ Responsible for deciding things that are related to the user interface and configuration discovery, e.g. verbosity, debug options, etc. All run configurations default to `False` or `None` and are decided only by CLI. Check Configurations: -------------------- Configurations that are related to which files and errors will be checked. These are configurable in 2 ways: using the CLI, and using configuration files. Configuration files are nested within the file system, meaning that the closer a configuration file is to a checked file, the more relevant it will be. For instance, imagine this directory structure: A +-- tox.ini: sets `select=D100` +-- B +-- foo.py +-- tox.ini: sets `add-ignore=D100` Then `foo.py` will not be checked for `D100`. The configuration build algorithm is described in `self._get_config`. Note: If any of `BASE_ERROR_SELECTION_OPTIONS` was selected in the CLI, all configuration files will be ignored and each file will be checked for the error codes supplied in the CLI. ) Ú conventionÚselectÚignorez add-selectz add-ignoreÚmatchz match-dirzignore-decoratorszignore-self-only-init)rerdrcz(?!test_).*\.pyz[^\.].*Úz2property,cached_property,functools.cached_propertyF)z setup.cfgztox.iniz .pydocstylez.pydocstyle.iniz .pydocstylercz.pydocstylerc.inizpyproject.tomlz.pep257)Ú pydocstyleÚpep257có~—i|_d|_dx|_x|_|_| ¦«|_dS)zCreate a configuration parser.N)Ú_cacheÚ_override_by_clirrÚ _run_confÚ_create_option_parserÚ_parserr#s rr$zConfigurationParser.__init__×s=€àˆŒ Ø $ˆÔØ;?Ð?ˆŒ Ð?˜œ¨$¬.Ø×1Ò1Ñ3Ô3ˆŒ ˆ ˆ rcó\—| g¦«\}}| |¦«S)z;Return a `RunConfiguration` object set with default values.)Ú _parse_argsÚ_create_run_config)rrKÚ_s rÚget_default_run_configurationz1ConfigurationParser.get_default_run_configurationàs-€à×%Ò% bÑ)Ô)‰ ˆ�Ø×&Ò& wÑ/Ô/Ð/rcó:—| ¦«\|_|_|jpdg|_| |j¦«st ¦«‚| |j¦«|_| |jd¬¦«}||_dS)zèParse the configuration. If one of `BASE_ERROR_SELECTION_OPTIONS` was selected, overrides all error codes to check and disregards any error code related configurations from the configuration files. r;F)Ú use_defaultsN) rqrrÚ_validate_optionsÚIllegalConfigurationrrrmÚ_create_check_configrl)rÚconfigs rÚparsezConfigurationParser.parseås‘€ð*.×)9Ò)9Ñ);Ô);Ñ&ˆŒ �t”Øœ/Ð2¨c¨UˆŒà×%Ò% d¤mÑ4Ô4ð )Ý&Ñ(Ô(Ð (à×0Ò0°´Ñ?Ô?ˆŒà×*Ò*¨4¬=ÀuÐ*ÑMÔMˆØ &ˆÔÐÐrcó—|jS)z,Return the run configuration for the script.)rmr#s rÚget_user_run_configurationz.ConfigurationParser.get_user_run_configurationøs €ðŒ~Ðrc#ó–‡K—d„}d„}d„}|jD�]³}tj |¦«rótj|¦«D]Ü\}}}| tj |¦«¦«}||¦«\} Š||¦«} ||¦«} ˆfd„|D¦«|dd…<ttjj|¦«D]M} | | ¦«r@tj  || ¦«} | t|j ¦«| | |j fV—ŒNŒÝ�Œ| tj |¦«¦«}||¦«\} }||¦«} ||¦«} | tj |¦«¦«r |t|j ¦«| | |j fV—�ŒµdS)a¢Generate files and error codes to check on each one. Walk dir trees under `self._arguments` and yield file names that `match` under each directory that `match_dir`. The method locates the configuration for each file name and yields a tuple of (filename, [error_codes]). With every discovery of a new configuration file `IllegalConfiguration` might be raised. cóz—t|jdz¦«j}t|jdz¦«j}||fS)z:Return the `match` and `match_dir` functions for `config`.ú$)ÚrerfÚ match_dir)ÚconfÚ match_funcÚmatch_dir_funcs rÚ _get_matchesz._get_matches s;€å˜DœJ¨Ñ,Ñ-Ô-Ô3ˆJÝ ¤°Ñ 4Ñ5Ô5Ô;ˆNؘ~Ð-Ð -rcó<—|jrt|j¦«ndS)z0Return the `ignore_decorators` as None or regex.N)Úignore_decoratorsr�©rƒs rÚ_get_ignore_decoratorszFConfigurationParser.get_files_to_check.._get_ignore_decoratorss$€ð/3Ô.DÐN•�4Ô)Ñ*Ô*Ð*È$ð rcób—|jr't|j d¦«¦«ndS)z0Return the `property_decorators` as None or set.ú,N)Úproperty_decoratorsÚsetr?r‰s rÚ_get_property_decoratorszHConfigurationParser.get_files_to_check.._get_property_decoratorss5€ðÔ+ð•�DÔ,×2Ò2°3Ñ7Ô7Ñ8Ô8Ð8àð rcó*•—g|]}‰|¦«¯ |‘ŒSrr)Ú.0rRr‚s €rú z:ConfigurationParser.get_files_to_check..(s&ø€Ð?Ð?Ð? Q°)°)¸A±,´,Ð?˜qÐ?Ð?Ð?rN) rr*ÚpathÚisdirÚwalkÚ _get_configÚabspathÚmapÚbasenameÚjoinrIÚ checked_codesÚignore_self_only_init)rr†rŠr�ÚnameÚrootÚdirsr4rzrfrˆr�r7Ú full_pathrsr‚s @rÚget_files_to_checkz&ConfigurationParser.get_files_to_checkýs+øèè€ð .ð .ð .ð  ð ð ð  ð ð ð”Oð! ñ! ˆDÝŒw�}Š}˜TÑ"Ô"ð Ý-/¬W°T©]¬]ððÑ)�D˜$  Ø!×-Ò-­b¬g¯oªo¸dÑ.CÔ.CÑDÔD�FØ'3 |°FÑ';Ô';Ñ$�E˜9Ø(>Ð(>¸vÑ(FÔ(FÐ%Ø*BÐ*BÀ6Ñ*JÔ*JÐ'ð@Ð?Ð?Ð?¨$Ð?Ñ?Ô?�D˜˜˜‘Gå$'­¬Ô(8¸)Ñ$DÔ$Dð ð ˜Ø ˜5 ™?œ?ðÝ(*¬¯ ª °T¸8Ñ(DÔ(D˜Ià )Ý $ VÔ%9Ñ :Ô :Ø 1Ø 3Ø &Ô <ð #ðððøð ñð(×)Ò)­"¬'¯/ª/¸$Ñ*?Ô*?Ñ@Ô@�Ø'˜<¨Ñ/Ô/‘��qØ$:Ð$:¸6Ñ$BÔ$BÐ!Ø&>Ð&>¸vÑ&FÔ&FÐ#Ø�5�œ×)Ò)¨$Ñ/Ô/Ñ0Ô0ðàݘVÔ1Ñ2Ô2Ø)Ø+ØÔ4ð ðððùð7! ð! rcó2—| |¦«}||jvr |j|S| |¦«}|€Utj |¦«\}}|r| |¦«}nš| |j¦«}n|  |¦«\}}tj |¦«\}}|r.|r,| |¦«} |  | |¦«}n| |¦«}|S)awGet a configuration for checking `node` by config discovery. Config discovery happens when no explicit config file is specified. The file system is searched for config files starting from the directory containing the file being checked, and up until the root directory of the project. See `_get_config` for further details. ) Ú _get_node_dirrkÚ_get_config_file_in_folderr*r“r?r–ryrÚ_read_configuration_fileÚ_merge_configuration) rÚnoder“Ú config_fileÚ parent_dirÚtailrzrKÚinheritÚ parent_configs rÚ_get_config_by_discoveryz,ConfigurationParser._get_config_by_discoveryDs€ð×!Ò! $Ñ'Ô'ˆà �4”;Ð Ð Ø”;˜tÔ$Ð $à×5Ò5°dÑ;Ô;ˆ à Ð Ý!œwŸ}š}¨TÑ2Ô2Ñ ˆJ˜Øð Bà×)Ò)¨*Ñ5Ô5��ð×2Ò2°4´=ÑAÔA��ð $×<Ò<¸[ÑIÔIÑ ˆG�Wå!œwŸ}š}¨TÑ2Ô2Ñ ˆJ˜Øð <˜ð <à $× 0Ò 0°Ñ <Ô <� Ø×2Ò2°=À'ÑJÔJ��ð×2Ò2°7Ñ;Ô;�àˆ rcó”—|jj€*tjd¦«| |¦«}nòtjd|jj¦«t j |jj¦«s,td  |jj¦«¦«‚d|j vr |j dS|  |jj¦«\}}|€/tj d¦«|  |j¦«}n|  |¦«}i}tjD]0}t#|j|¦«}t#||¦«}|�|n|||<Œ1tdi|¤Ž}| |j|j¦«|jj� ||j d<n||j | |¦«<|S)aÃGet and cache the run configuration for `node`. If no configuration exists (not local and not for the parent node), returns and caches a default configuration. The algorithm: ------------- * If the current directory's configuration exists in `self._cache` - return it. * If a configuration file does not exist in this directory: * If the directory is not a root directory: * Cache its configuration as this directory's and return it. * Else: * Cache a default configuration and return it. * Else: * Read the configuration file. * If a parent directory exists AND the configuration file allows inheritance: * Read the parent configuration by calling this function with the parent directory as `node`. * Merge the parent configuration with the current one and cache it. * If the user has specified one of `BASE_ERROR_SELECTION_OPTIONS` in the CLI - return the CLI configuration with the configuration match clauses * Set the `--add-select` and `--add-ignore` CLI configurations. Nz&No config file specified, discovering.zUsing config file %rz=Configuration file {!r} specified via --config was not found.zVConfiguration file does not contain a pydocstyle section. Using default configuration.r)rmrzr Údebugr­r*r“ÚexistsrxÚformatrkr¥r.ryrÚCheckConfigurationÚ_fieldsÚgetattrrlÚ_set_add_optionsr›r£) rr§rzrKrsÚ final_configÚattrÚcli_valÚconf_vals rr–zConfigurationParser._get_confignsÏ€ð: Œ>Ô Ð (Ý ŒIÐ>Ñ ?Ô ?Ð ?Ø×2Ò2°4Ñ8Ô8ˆFˆFå ŒIÐ,¨d¬nÔ.CÑ DÔ DÐ DÝ”7—>’> $¤.Ô"7Ñ8Ô8ð Ý*ð2ß28²&¸¼Ô9NÑ2OÔ2Oñôðð �t”{Ð"Ð"Ø”{ 4Ô(Ð(Ø×6Ò6°t´~Ô7LÑMÔM‰JˆG�QàˆÝ” ðGñôðð×2Ò2°4´=ÑAÔA��à×2Ò2°7Ñ;Ô;�ðˆ Ý&Ô.ð Nð NˆDݘdÔ3°TÑ:Ô:ˆGݘv tÑ,Ô,ˆHØ,3Ð,?  ÀXˆL˜Ñ Ð å#Ð3Ð3 lÐ3Ð3ˆà ×Ò˜fÔ2°D´MÑBÔBÐBð Œ>Ô Ð ,Ø &ˆDŒK˜Ñ Ð à4:ˆDŒK˜×*Ò*¨4Ñ0Ô0Ñ 1؈ rcóÀ—tj |¦«}tj |¦«r|ntj |¦«S)z?Return the absolute path of the directory of a filesystem node.)r*r“r—r”Údirname)r§r“s rr£z!ConfigurationParser._get_node_dirµsB€õŒw�Š˜tÑ$Ô$ˆÝ”w—}’} TÑ*Ô*ÐEˆtˆtµ´·²ÀÑ0EÔ0EÐErcó—| d¦«rt¦«}ntd¬¦«}d}d}| |¦«�r�| |¦«�ry|jjdd…}|jjD]}| |j¦«Œd„|D¦«}|  g¦«\}} | |¦«} |  | ¦«D]Ø} | dkr|  | | ¦«}Œ|   dd ¦«|j vrtjd | ›d �¦«ŒU|   d d¦«} || } | d vr| | | ¦«}n9| d kr| | | ¦«}n| dvsJ‚|  | | ¦«}t%|| |¦«ŒÙ| |¦«}|�'| |¦«st+d|›�¦«‚||fS)zçTry to read and parse `path` as a configuration file. If the configurations were illegal (checked with `self._validate_options`), raises `IllegalConfiguration`. Returns (options, should_inherit). ú.toml©ú#ú;©Úinline_comment_prefixesNTcó6—i|]}|j|jp|j“ŒSr)ÚdestÚtypeÚaction)r‘Úos rú z@ConfigurationParser._read_configuration_file..Ðs%€ÐKÐKÐK¸!˜1œ6 1¤6Ð#5¨Q¬XÐKÐKÐKrr«rsú-zUnknown option 'z ' ignored)rZÚcountÚstring)Ú store_trueÚ store_falsez in file: )Úendswithr rr9Ú_get_section_nameroÚ option_listÚ option_groupsÚextendrqrKrXÚreplaceÚCONFIG_FILE_OPTIONSr r.r[rTÚsetattrÚ_fix_set_optionsrwrx)rr“ÚparserrKÚshould_inheritÚ all_optionsÚgrouprÐÚ new_optionsrsÚ section_nameÚoptÚnormalized_optÚopt_typerSs rr¥z,ConfigurationParser._read_configuration_file»sO€ð �=Š=˜Ñ !Ô !ð IÝ‘\”\ˆFˆFå$¸ZÐHÑHÔHˆF؈؈à �;Š;�tÑ Ô ñ! 9 ×!7Ò!7¸Ñ!?Ô!?ñ! 9Øœ,Ô2°1°1°1Ô5ˆKØœÔ3ð 6ð 6�Ø×"Ò" 5Ô#4Ñ5Ô5Ð5Ð5àKÐK¸{ÐKÑKÔKˆKð"×-Ò-¨bÑ1Ô1‰NˆK˜ð ×1Ò1°&Ñ9Ô9ˆLØ—~’~ lÑ3Ô3ð <ð <�ؘ)Ò#Ð#Ø%+×%6Ò%6°|ÀSÑ%IÔ%I�NØà—;’;˜s CÑ(Ô(°Ô0HÐHÐHÝ”KÐ A°3Ð AÐ AÐ AÑBÔBÐBØà!$§¢¨S°#Ñ!6Ô!6�Ø& ~Ô6�ØÐ/Ð/Ð/Ø"ŸMšM¨,¸Ñ<Ô<�E�EØ Ò)Ð)Ø"ŸJšJ |°SÑ9Ô9�E�Eà#Ð'DÐDÐDÐDÐDØ"×-Ò-¨l¸CÑ@Ô@�Eݘ  ^°UÑ;Ô;Ð;Ð;ð×+Ò+¨KÑ8Ô8ˆGà Ð Ø×)Ò)¨'Ñ2Ô2ð ?Ý*Ð+=°tÐ+=Ð+=Ñ>Ô>Ð>à˜Ð&Ð&rcóD—tj|j¦«}| |¦«r| |¦«}| ||¦«t |¬¦«}dD])}t||¦«}|�|nt||¦«||<Œ*tdi|¤ŽS)zðMerge parent config into the child options. The migration process requires an `options` object for the child in order to distinguish between mutually exclusive codes, add-select and add-ignore error codes. ©r›©rfr‚rˆr�rœNr) ÚcopyÚdeepcopyr›Ú_has_exclusive_optionÚ_get_exclusive_error_codesrµrAr´r²)rr¬Ú child_optionsÚ error_codesrÚkeyÚ child_values rr¦z(ConfigurationParser._merge_configurationôsÅ€õ”m MÔ$?Ñ@Ô@ˆ Ø × %Ò % mÑ 4Ô 4ð IØ×9Ò9¸-ÑHÔHˆKà ×Ò˜k¨=Ñ9Ô9Ð9å KÐ0Ñ0Ô0ˆð ð ð ˆCõ" -°Ñ5Ô5ˆKðÐ*ð� å˜]¨CÑ0Ô0ð �3‰KˆKõ "Ð+Ð+ FÐ+Ð+Ð+rNcól—|j ||¦«\}}| |¦«|fS)z@Parse the options using `self._parser` and reformat the options.)roÚ parse_argsrÖ)rrÚvaluesrKÚ argumentss rrqzConfigurationParser._parse_argss7€à!œ\×4Ò4°T¸6ÑBÔBш�Ø×$Ò$ WÑ-Ô-¨yÐ8Ð8rcóL‡—ˆfd„tjD¦«}tdi|¤ŽS)z2Create a `RunConfiguration` object from `options`.có2•—i|]}|t‰|¦«“ŒSr©r´©r‘rÝrKs €rrÈz:ConfigurationParser._create_run_config..s2ø€ð ð ð Ø+.ˆC•˜ #Ñ&Ô&ð ð ð rr)ÚRunConfigurationr³)rKrís` rrrz&ConfigurationParser._create_run_configsDø€ð ð ð ð Ý2BÔ2Jð ñ ô ˆõ Ð)Ð) &Ð)Ð)Ð)rTcóJ—d}| |¦«s|r| |¦«}t|¬¦«}ddddddœ}| ¦«D]=\}}t ||¦«€|rt |d |›�¦«nt ||¦«||<Œ>t d i|¤ŽS) zûCreate a `CheckConfiguration` object from `options`. If `use_defaults`, any of the match options that are `None` will be replaced with their default value and the default convention will be set for the checked codes. NráÚMATCH_REÚ MATCH_DIR_REÚIGNORE_DECORATORS_REÚPROPERTY_DECORATORSÚIGNORE_SELF_ONLY_INITrâÚDEFAULT_r)råÚ_get_checked_errorsrAÚitemsr´r²)ÚclsrKrvr›rÚdefaultsréÚdefaults rryz(ConfigurationParser._create_check_config sã€ðˆ à × $Ò $ WÑ -Ô -ð =°ð =Ø×3Ò3°GÑ<Ô<ˆMå MÐ2Ñ2Ô2ˆàØ'Ø!7Ø#8Ø%<ð  ð ˆð%ŸNšNÑ,Ô,ð ð ‰LˆC�õ˜7 CÑ(Ô(Ð0°\Ð0õ˜Ð1¨Ð1Ð1Ñ2Ô2Ð2å˜W cÑ*Ô*ð �3‰KˆKõ "Ð+Ð+ FÐ+Ð+Ð+rcóL—|jD]}| |¦«r|cSŒdS)z$Parse options from relevant section.N)ÚPOSSIBLE_SECTION_NAMESrG)rýr×rÜs rrÏz%ConfigurationParser._get_section_name>sD€ð Ô6ð $ð $ˆLØ×!Ò! ,Ñ/Ô/ð $Ø#Ð#Ð#Ð#ð $ðˆtrcóš—tj |¦«rtj |¦«}|jD]„}| d¦«rt ¦«}ntd¬¦«}tj ||¦«}|  |¦«r|  |¦«r|cSŒ…dS)zkLook for a configuration file in `path`. If exists return its full path, otherwise None. r½r¾rÁN) r*r“Úisfiler»ÚPROJECT_CONFIG_FILESrÎr rršr9rÏ)rýr“Úfnrzr s rr¤z.ConfigurationParser._get_config_file_in_folderGsÄ€õ Œ7�>Š>˜$Ñ Ô ð )Ý”7—?’? 4Ñ(Ô(ˆDàÔ*ð !ð !ˆBØ�{Š{˜7Ñ#Ô#ð MÝ#™œ��å(ÀÐLÑLÔL�ÝœŸ š  T¨2Ñ.Ô.ˆIØ�{Š{˜9Ñ%Ô%ð !¨#×*?Ò*?ÀÑ*GÔ*Gð !Ø Ð Ð Ð øð !ð !rcóB—ttj¦«¦«}d}|j� | |j¦«}||z }nC|j�| |j¦«}n!|j�tt|j¦«}tj |¦«S)z;Extract the error codes from the selected exclusive option.N) rŽr Úget_error_codesreÚ_expand_error_codesrdrcr´rrãrä)rýrKÚcodesr›Úignoreds rræz.ConfigurationParser._get_exclusive_error_codesZs“€õ•MÔ1Ñ3Ô3Ñ4Ô4ˆØˆ à Œ>Ð %Ø×-Ò-¨g¬nÑ=Ô=ˆGØ! G™OˆMˆMØ Œ^Ð 'Ø×3Ò3°G´NÑCÔCˆMˆMØ Ô Ð +Ý#¥K°Ô1CÑDÔDˆMõŒ}˜]Ñ+Ô+Ð+rcóz—|| |j¦«z}|| |j¦«z}dS)z@Set `checked_codes` by the `add_ignore` or `add_select` options.N)rÚ add_selectÚ add_ignore)rýr›rKs rrµz$ConfigurationParser._set_add_optionsks>€ð ˜×0Ò0°Ô1CÑDÔDÑDˆ ؘ×0Ò0°Ô1CÑDÔDÑDˆ ˆ ˆ rcóX‡—ttj¦«¦«}t¦«} |D]SЉ ¦«Š‰sŒˆfd„|D¦«}|st jd‰¦«| |¦«ŒTn"#t$r}t|¦«|‚d}~wwxYw|S)z0Return an expanded set of error codes to ignore.có>•—h|]}| ‰¦«¯|’ŒSr)Ú startswith)r‘ÚcodeÚparts €rú z:ConfigurationParser._expand_error_codes..s:ø€ð ð ð Ø!¨d¯oªo¸dÑ.CÔ.Cð Øð ð ð rz9Error code passed is not a prefix of any known errors: %sN) rŽr rÚstripr r.r/rPrx)Ú code_partsr Úexpanded_codesÚ codes_to_addÚers @rrz'ConfigurationParser._expand_error_codesqs÷ø€õ•MÔ1Ñ3Ô3Ñ4Ô4ˆÝ™œˆð 1Ø"ð 4ð 4�ð—z’z‘|”|�ØðØð ð ð ð Ø%*ð ñ ô � ð$ðÝ”Kð+àñôðð ×%Ò% lÑ3Ô3Ð3Ð3ð! 4øõ"ð 1ð 1ð 1Ý& qÑ)Ô)¨qÐ 0øøøøð 1øøøðÐs±AB B'ÂB"Â"B'cón—| |¦«}|€|j}| ||¦«|S)z6Extract the codes needed to be checked from `options`.)ræÚDEFAULT_CONVENTIONrµ)rýrKr›s rrûz'ConfigurationParser._get_checked_errorsŽsA€ð×6Ò6°wÑ?Ô?ˆ Ø Ð ØÔ2ˆMà ×Ò˜]¨GÑ4Ô4Ð4àÐrc ó¬—tj|jd¦«D]P\}}t||¦«r;t||¦«r+t jd ||¦«¦«dSŒQ|jra|jtvrSt jd |jd  tj ¦«¦«¦«¦«dSdS)z–Validate the mutually exclusive options. Return `True` iff only zero or one of `BASE_ERROR_SELECTION_OPTIONS` was selected. éz8Cannot pass both {} and {}. They are mutually exclusive.Fz1Illegal convention '{}'. Possible conventions: {}ú, T) Ú itertoolsÚ permutationsÚBASE_ERROR_SELECTION_OPTIONSr´r Úerrorr±rcrršrJ)rýrKÚopt1Úopt2s rrwz%ConfigurationParser._validate_options™së€õ$Ô0Ø Ô ,¨añ ô ð ð ‰JˆD�$õ�w Ñ%Ô%ð ­'°'¸4Ñ*@Ô*@ð Ý” ð*ß*0ª&°°tÑ*<Ô*<ñôðð�u�uøà Ô ð  'Ô"4½KÐ"GÐ"GÝ ŒIØC×JÒJØÔ&¨¯ ª µ+Ô2BÑ2DÔ2DÑ(EÔ(Eñôñ ô ð ð �5؈trcóD‡—tˆfd„|jD¦«¦«S)z>Return `True` iff one or more exclusive options were selected.có4•—g|]}t‰|¦«du‘ŒSr\rñròs €rr’z=ConfigurationParser._has_exclusive_option..¸s8ø€ð ð ð àõ˜ Ñ%Ô%¨TÐ1ð ð ð r)Úanyr )rýrKs `rråz)ConfigurationParser._has_exclusive_option´s@ø€õð ð ð ð àÔ;ð ñ ô ñ ô ð rcó‡—d}d}ˆfd„}|D].}t||¦«}|�t||||¦«¦«Œ/|D]G}t||¦«}|€d}t|t¦«s ||¦«}t|||¦«ŒH|S)z9Alter the set options from None/strings to sets in place.)rerd)r r cóž•—t|t¦«r| d¦«}‰ d„|D¦«dhz ¦«S)zâSplit `value_str` by the delimiter `,` and return a set. Removes empty values ('') and strips whitespace. Also expands error code prefixes, to avoid doing this for every file. rŒcó6—h|]}| ¦«’ŒSr)r)r‘Úxs rrzIConfigurationParser._fix_set_options.._get_set..Ïs €Ð.Ð.Ð.˜q�—’‘”Ð.Ð.Ð.rrg)r'r(r?r)Ú value_strrýs €rÚ_get_setz6ConfigurationParser._fix_set_options.._get_setÄsXø€õ˜)¥SÑ)Ô)ð 1Ø%ŸOšO¨CÑ0Ô0� Ø×*Ò*Ø.Ð. IÐ.Ñ.Ô.°"°Ñ5ñôð rNrg)r´rÕr'r)rýrKÚoptional_set_optionsÚmandatory_set_optionsr,rÝrSs` rrÖz$ConfigurationParser._fix_set_options¾sÌø€ð 4ÐØ <Ðð ð ð ð ð ð(ð 7ð 7ˆCݘG SÑ)Ô)ˆEØÐ ݘ  h h¨u¡o¤oÑ6Ô6Ð6øà(ð )ð )ˆCݘG SÑ)Ô)ˆE؈}Ø�å˜e¥SÑ)Ô)ð (Ø ˜ ™œ�å �G˜S %Ñ (Ô (Ð (Ð (àˆrc óØ—ddlm}m}|td¬¦«}|j}|ddddd ¬ ¦«|d d ddd ¬ ¦«|ddddd¬ ¦«|ddddd¬ ¦«|dddd¬ ¦«|dddd¬¦«| ||dd¦«¦«||dd¦«}|j}|dd dd!¬¦«|d"d dd#¬¦«|d$d%dd& d' t¦«¦«¬¦«|d(d dd)¬¦«|d*d dd+¬¦«|d,ddd-¬.¦«| |¦«|d/d0dd1 |j ¦«¬¦«|d2d0dd3 |j ¦«¬¦«|d4d5dd6 |j ¦«¬¦«|d7d8dd9 |j ¦«¬¦«|S):z...])ÚversionÚusagez-ez --explainrÌFzshow explanation of each error)rÆrÿÚhelpz-sz--sourcezshow source for each errorz-dz--debugzprint debug informationz-vz --verbosezprint status informationz--countz&print total number of errors to stdoutz--configzNz2use given config file and disable config discovery)Úmetavarrÿr4ÚNotez¢When using --match, --match-dir or --ignore-decorators consider whether you should use a single quote (') or a double quote ("), depending on your OS, Shell, etc.zError Check Optionsa„Only one of --select, --ignore or --convention can be specified. If none is specified, defaults to `--convention=pep257`. These three options select the "basic list" of error codes to check. If you wish to change that list (for example, if you selected a known convention but wish to ignore a specific error from it or add a new one) you can use `--add-[ignore/select]` in order to do so.z--selectzz§choose the basic list of checked errors by specifying which errors to check for (with a list of comma-separated error codes or prefixes). for example: --select=D101,D2z--ignorezÌchoose the basic list of checked errors by specifying which errors to ignore out of all of the available error codes (with a list of comma-separated error codes or prefixes). for example: --ignore=D101,D2z --conventionzzgchoose the basic list of checked errors by specifying an existing convention. Possible conventions: {}.rz --add-selectzpadd extra error codes to check to the basic list of errors previously set by --select, --ignore or --convention.z --add-ignorezsignore extra error codes by removing them from the basic list previously set by --select, --ignore or --convention.z--ignore-self-only-initz5ignore __init__ methods which only have a self param.)rÿrÆr4z--matchz zžcheck only files that exactly match regular expression; default is --match='{}' which matches files that don't start with 'test_' but end with '.py'z --match-dirz‘search only dirs that exactly match regular expression; default is --match-dir='{}', which matches all dirs that don't start with a dotz--ignore-decoratorsz zÌignore any functions or methods that are decorated by a function with a name fitting the regular expression; default is --ignore-decorators='{}' which does not ignore any decorated functions.z--property-decoratorszz³consider any method decorated with one of these decorators as a property, and consequently allow a docstring which is not in imperative mood; default is --property-decorators='{}') Úoptparser0r1r Ú add_optionÚadd_option_groupr±ršrÚDEFAULT_MATCH_REÚDEFAULT_MATCH_DIR_REÚDEFAULT_IGNORE_DECORATORS_REÚDEFAULT_PROPERTY_DECORATORS)rýr0r1r×rQÚ check_groupÚ add_checks rrnz)ConfigurationParser._create_option_parserãsÁ€ð 7Ð6Ð6Ð6Ð6Ð6Ð6Ð6à�ÝØ?ð ñ ô ˆð Ô"ˆð ˆØ Ø ØØØ1ð  ñ ô ð ð ˆØ Ø ØØØ-ð  ñ ô ð ð ˆØ Ø ØØØ*ð  ñ ô ð ð ˆØ Ø ØØØ+ð  ñ ô ð ð ˆØ ØØØ9ð  ñ ô ð ð ˆØ ØØØEð  ñ ô ð ð ×ÒØ ˆKØØð4ñ ô ñ ô ð ð"�kØ Ø !ð =ñ  ô  ˆ ð Ô*ˆ ð ˆ Ø ØØð,ð  ñ ô ð ð ˆ Ø ØØð,ð ñ ô ð ð ˆ Ø ØØð@ß@FÂØ— ’ �+Ñ&Ô&ñAôAð  ñ ô ð ð ˆ Ø ØØðð  ñ ô ð ð ˆ Ø ØØðð  ñ ô ð ð ˆ Ø %ØØØHð  ñ ô ð ð ×Ò  Ñ,Ô,Ð,ð ˆØ ØØð÷Šf�SÔ)Ñ*Ô*ð ñ ô ð ð ˆØ ØØð÷Šf�SÔ-Ñ.Ô.ð ñ ô ð ð ˆØ !Ø"ØðB÷CIÂ&ØÔ4ñCôCð ñ ô ð ð ˆØ #Ø+Øð0÷17²ØÔ3ñ1ô1ð ñ ô ð ðˆ r)NN)T)*r]r^r_r`rÔr r:r;r<r=rrirÚDEFAULT_IGNORE_SELF_ONLY_INITrrr$rtr{rr}r¡r­r–Ú staticmethodr£r¥r¦rqrrÚ classmethodryrÏr¤rærµrrûrwrårÖrnrrrrbrb�sš€€€€€ð#ð#ðJ Ðð$FÐ à)ÐØ%ÐØ#%Ð à<ð ð%Ô+ÐØ$)Ð!ð Ðð6Ðð4ð4ð4ð0ð0ð0ð 'ð'ð'ð&ððñÔðððBðBñÔðBðL(ð(ð(ðTEðEðEðNðFðFñ„\ðFð 7'ð7'ð7'ðr,ð,ð,ð>9ð9ð9ð9ð ð*ð*ñ„\ð*ðð,ð,ð,ñ„[ð,ð:ððñ„[ððð!ð!ñ„[ð!ð$ð,ð,ñ„[ð,ð ðEðEñ„[ðEð ððñ„\ðð8ððñ„[ððððñ„[ðð4ð ð ñ„[ð ðð"ð"ñ„[ð"ðHðvðvñ„[ðvðvðvrrbr²)r›rfr‚rˆr�rœcó—eZdZdZdS)rxz(An exception for illegal configurations.N)r]r^r_r`rrrrxrx«s€€€€€Ø2Ð2à€Drrxró)ÚexplainÚsourcer¯ÚverboserÊrz)$r`rãrr=r*ÚsysÚ collectionsrÚcollections.abcrÚ configparserrrrÚ functoolsrr�r Ú_versionr Úutilsr Ú violationsr rÚ version_infor-ÚtomliÚ ImportErrorrr rbr²Ú ExceptionrxrórrrúrSsðØ/Ð/à € € € ØÐÐÐØ€€€Ø € € € Ø € € € Ø"Ð"Ð"Ð"Ð"Ð"ØÐÐÐÐÐØGÐGÐGÐGÐGÐGÐGÐGÐGÐGØÐÐÐÐÐØÐÐÐÐÐà!Ð!Ð!Ð!Ð!Ð!ØÐÐÐÐÐØ2Ð2Ð2Ð2Ð2Ð2Ð2Ð2àÔ�wÒÐØ€N€N€N€NðØÐÐÐÐøØ ðððØˆˆˆðøøøððððd4ðd4ðd4ðd4ðd4ñd4ôd4ðd4ðNM ðM ðM ðM ðM ñM ôM ðM ðb �ZØðñ ô Ðð ð ð ð ð ˜9ñ ô ð ð�:ØØ@ñôÐÐÐsÁA#Á#A-Á,A-