\?b d Z ddlZddlmZ ej d Z ej dej ej z ej z Z ej dej ej z ej z Z ej dej Z G d d e Z G d de Zd"d Zd#dZd#dZd#dZd Zd Zd Zd Zd Zi Zd Zd Zd$dZd%dZ G d d Z d Z!d Z"d Z# G d d!e Z$dS )&z pygments.util ~~~~~~~~~~~~~ Utility functions. :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. N) TextIOWrapperz[/\\ ]z ]*> z<(.+?)(\s.*?)?>.*?z\s*<\?xml[^>]*\?>c e Zd ZdZdS ) ClassNotFoundzCRaised if one of the lookup functions didn't find a matching class.N__name__ __module____qualname____doc__ y/builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib/python3.11/site-packages/pip/_vendor/pygments/util.pyr r s MMMMr r c e Zd ZdZdS )OptionErrorz This exception will be raised by all option processing functions if the type or value of the argument is not correct. Nr r r r r r " s r r Fc | || }|r| }||vrIt d |d t t | |S )z} If the key `optname` from the dictionary is not in the sequence `allowed`, raise an error, otherwise return it. z%Value for option {} must be one of {}z, )getlowerr formatjoinmapstr)optionsoptnamealloweddefaultnormcasestrings r get_choice_optr ( sw [[' * *F WAHHRVR[R[\_`cel\m\mRnRnoopppMr c | || }t |t r|S t |t rt | S t |t st d|d| d | dv rdS | dv rdS t d|d| d ) a@ Intuitively, this is `options.get(optname, default)`, but restricted to Boolean value. The Booleans can be represented as string, in order to accept Boolean value from the command line arguments. If the key `optname` is present in the dictionary `options` and is not associated with a Boolean, raise an `OptionError`. If it is absent, `default` is returned instead. The valid string values for ``True`` are ``1``, ``yes``, ``true`` and ``on``, the ones for ``False`` are ``0``, ``no``, ``false`` and ``off`` (matched case-insensitively). Invalid type for option z%; use 1/0, yes/no, true/false, on/off)1yestrueonT)0nofalseoffFInvalid value )r isinstanceboolintr r r r r r r s r get_bool_optr. 5 s [[' * *F&$ = FC =F|| $ $ = <&