Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +7 -0
- Alina-SDXL-step00005555.safetensors +3 -0
- Alina-SDXL-step00007070.safetensors +3 -0
- Alina-SDXL-step00008080.safetensors +3 -0
- venv/bin/Activate.ps1 +247 -0
- venv/bin/activate +69 -0
- venv/bin/activate.csh +26 -0
- venv/bin/activate.fish +69 -0
- venv/bin/pip +8 -0
- venv/bin/pip3 +8 -0
- venv/bin/pip3.10 +8 -0
- venv/bin/python +3 -0
- venv/bin/python3 +3 -0
- venv/bin/python3.10 +3 -0
- venv/lib/python3.10/site-packages/pip-22.0.2.dist-info/INSTALLER +1 -0
- venv/lib/python3.10/site-packages/pip-22.0.2.dist-info/LICENSE.txt +20 -0
- venv/lib/python3.10/site-packages/pip-22.0.2.dist-info/METADATA +92 -0
- venv/lib/python3.10/site-packages/pip-22.0.2.dist-info/RECORD +1037 -0
- venv/lib/python3.10/site-packages/pip-22.0.2.dist-info/REQUESTED +0 -0
- venv/lib/python3.10/site-packages/pip-22.0.2.dist-info/WHEEL +5 -0
- venv/lib/python3.10/site-packages/pip-22.0.2.dist-info/entry_points.txt +5 -0
- venv/lib/python3.10/site-packages/pip-22.0.2.dist-info/top_level.txt +1 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py +0 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__pycache__/__init__.cpython-310.pyc +0 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__pycache__/py31compat.cpython-310.pyc +0 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pkg_resources/py31compat.py +23 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__init__.py +328 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/__init__.cpython-310.pyc +0 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/actions.cpython-310.pyc +0 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/common.cpython-310.pyc +0 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/core.cpython-310.pyc +3 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/exceptions.cpython-310.pyc +0 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/helpers.cpython-310.pyc +0 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/results.cpython-310.pyc +0 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/testing.cpython-310.pyc +0 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/unicode.cpython-310.pyc +0 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/util.cpython-310.pyc +0 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/actions.py +207 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/common.py +424 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/core.py +0 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/diagram/__init__.py +593 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/diagram/__pycache__/__init__.cpython-310.pyc +0 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/exceptions.py +267 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/helpers.py +1069 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/results.py +760 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/testing.py +331 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/unicode.py +332 -0
- venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/util.py +235 -0
- venv/lib/python3.10/site-packages/pip/_vendor/rich/__pycache__/__init__.cpython-310.pyc +0 -0
- venv/lib/python3.10/site-packages/pip/_vendor/rich/__pycache__/__main__.cpython-310.pyc +0 -0
.gitattributes
CHANGED
|
@@ -39,3 +39,10 @@ venv/lib/python3.10/site-packages/setuptools/_vendor/__pycache__/pyparsing.cpyth
|
|
| 39 |
venv/lib/python3.10/site-packages/setuptools/_vendor/more_itertools/__pycache__/more.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 40 |
venv/lib/python3.10/site-packages/pip/_vendor/idna/__pycache__/uts46data.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 41 |
venv/lib/python3.10/site-packages/pip/_vendor/html5lib/__pycache__/constants.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
venv/lib/python3.10/site-packages/setuptools/_vendor/more_itertools/__pycache__/more.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 40 |
venv/lib/python3.10/site-packages/pip/_vendor/idna/__pycache__/uts46data.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 41 |
venv/lib/python3.10/site-packages/pip/_vendor/html5lib/__pycache__/constants.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
venv/lib/python3.10/site-packages/pip/_vendor/rich/__pycache__/_emoji_codes.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/core.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
venv/lib/python3.10/site-packages/pkg_resources/__pycache__/__init__.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
venv/lib/python3.10/site-packages/pkg_resources/_vendor/__pycache__/pyparsing.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
venv/bin/python3 filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
venv/bin/python3.10 filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
venv/bin/python filter=lfs diff=lfs merge=lfs -text
|
Alina-SDXL-step00005555.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2471a320ffe383c1642b0644d893176fe634f7eef9e01c5a8f72dca95c3e619b
|
| 3 |
+
size 6938043304
|
Alina-SDXL-step00007070.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:268a2f1691bced1aefdfeefbc809ff3a9dfb5040db12f1d95ec52a292221b717
|
| 3 |
+
size 6938043304
|
Alina-SDXL-step00008080.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9427fa13607613b32a9f3808b10a4be67f9321bc6edf14360b86710f85232e9f
|
| 3 |
+
size 6938043304
|
venv/bin/Activate.ps1
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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Activate a Python virtual environment for the current PowerShell session.
|
| 4 |
+
|
| 5 |
+
.Description
|
| 6 |
+
Pushes the python executable for a virtual environment to the front of the
|
| 7 |
+
$Env:PATH environment variable and sets the prompt to signify that you are
|
| 8 |
+
in a Python virtual environment. Makes use of the command line switches as
|
| 9 |
+
well as the `pyvenv.cfg` file values present in the virtual environment.
|
| 10 |
+
|
| 11 |
+
.Parameter VenvDir
|
| 12 |
+
Path to the directory that contains the virtual environment to activate. The
|
| 13 |
+
default value for this is the parent of the directory that the Activate.ps1
|
| 14 |
+
script is located within.
|
| 15 |
+
|
| 16 |
+
.Parameter Prompt
|
| 17 |
+
The prompt prefix to display when this virtual environment is activated. By
|
| 18 |
+
default, this prompt is the name of the virtual environment folder (VenvDir)
|
| 19 |
+
surrounded by parentheses and followed by a single space (ie. '(.venv) ').
|
| 20 |
+
|
| 21 |
+
.Example
|
| 22 |
+
Activate.ps1
|
| 23 |
+
Activates the Python virtual environment that contains the Activate.ps1 script.
|
| 24 |
+
|
| 25 |
+
.Example
|
| 26 |
+
Activate.ps1 -Verbose
|
| 27 |
+
Activates the Python virtual environment that contains the Activate.ps1 script,
|
| 28 |
+
and shows extra information about the activation as it executes.
|
| 29 |
+
|
| 30 |
+
.Example
|
| 31 |
+
Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv
|
| 32 |
+
Activates the Python virtual environment located in the specified location.
|
| 33 |
+
|
| 34 |
+
.Example
|
| 35 |
+
Activate.ps1 -Prompt "MyPython"
|
| 36 |
+
Activates the Python virtual environment that contains the Activate.ps1 script,
|
| 37 |
+
and prefixes the current prompt with the specified string (surrounded in
|
| 38 |
+
parentheses) while the virtual environment is active.
|
| 39 |
+
|
| 40 |
+
.Notes
|
| 41 |
+
On Windows, it may be required to enable this Activate.ps1 script by setting the
|
| 42 |
+
execution policy for the user. You can do this by issuing the following PowerShell
|
| 43 |
+
command:
|
| 44 |
+
|
| 45 |
+
PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
| 46 |
+
|
| 47 |
+
For more information on Execution Policies:
|
| 48 |
+
https://go.microsoft.com/fwlink/?LinkID=135170
|
| 49 |
+
|
| 50 |
+
#>
|
| 51 |
+
Param(
|
| 52 |
+
[Parameter(Mandatory = $false)]
|
| 53 |
+
[String]
|
| 54 |
+
$VenvDir,
|
| 55 |
+
[Parameter(Mandatory = $false)]
|
| 56 |
+
[String]
|
| 57 |
+
$Prompt
|
| 58 |
+
)
|
| 59 |
+
|
| 60 |
+
<# Function declarations --------------------------------------------------- #>
|
| 61 |
+
|
| 62 |
+
<#
|
| 63 |
+
.Synopsis
|
| 64 |
+
Remove all shell session elements added by the Activate script, including the
|
| 65 |
+
addition of the virtual environment's Python executable from the beginning of
|
| 66 |
+
the PATH variable.
|
| 67 |
+
|
| 68 |
+
.Parameter NonDestructive
|
| 69 |
+
If present, do not remove this function from the global namespace for the
|
| 70 |
+
session.
|
| 71 |
+
|
| 72 |
+
#>
|
| 73 |
+
function global:deactivate ([switch]$NonDestructive) {
|
| 74 |
+
# Revert to original values
|
| 75 |
+
|
| 76 |
+
# The prior prompt:
|
| 77 |
+
if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) {
|
| 78 |
+
Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt
|
| 79 |
+
Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
# The prior PYTHONHOME:
|
| 83 |
+
if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) {
|
| 84 |
+
Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME
|
| 85 |
+
Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
# The prior PATH:
|
| 89 |
+
if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) {
|
| 90 |
+
Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH
|
| 91 |
+
Remove-Item -Path Env:_OLD_VIRTUAL_PATH
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
# Just remove the VIRTUAL_ENV altogether:
|
| 95 |
+
if (Test-Path -Path Env:VIRTUAL_ENV) {
|
| 96 |
+
Remove-Item -Path env:VIRTUAL_ENV
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
# Just remove VIRTUAL_ENV_PROMPT altogether.
|
| 100 |
+
if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) {
|
| 101 |
+
Remove-Item -Path env:VIRTUAL_ENV_PROMPT
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
# Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether:
|
| 105 |
+
if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) {
|
| 106 |
+
Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
# Leave deactivate function in the global namespace if requested:
|
| 110 |
+
if (-not $NonDestructive) {
|
| 111 |
+
Remove-Item -Path function:deactivate
|
| 112 |
+
}
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
<#
|
| 116 |
+
.Description
|
| 117 |
+
Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the
|
| 118 |
+
given folder, and returns them in a map.
|
| 119 |
+
|
| 120 |
+
For each line in the pyvenv.cfg file, if that line can be parsed into exactly
|
| 121 |
+
two strings separated by `=` (with any amount of whitespace surrounding the =)
|
| 122 |
+
then it is considered a `key = value` line. The left hand string is the key,
|
| 123 |
+
the right hand is the value.
|
| 124 |
+
|
| 125 |
+
If the value starts with a `'` or a `"` then the first and last character is
|
| 126 |
+
stripped from the value before being captured.
|
| 127 |
+
|
| 128 |
+
.Parameter ConfigDir
|
| 129 |
+
Path to the directory that contains the `pyvenv.cfg` file.
|
| 130 |
+
#>
|
| 131 |
+
function Get-PyVenvConfig(
|
| 132 |
+
[String]
|
| 133 |
+
$ConfigDir
|
| 134 |
+
) {
|
| 135 |
+
Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg"
|
| 136 |
+
|
| 137 |
+
# Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue).
|
| 138 |
+
$pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue
|
| 139 |
+
|
| 140 |
+
# An empty map will be returned if no config file is found.
|
| 141 |
+
$pyvenvConfig = @{ }
|
| 142 |
+
|
| 143 |
+
if ($pyvenvConfigPath) {
|
| 144 |
+
|
| 145 |
+
Write-Verbose "File exists, parse `key = value` lines"
|
| 146 |
+
$pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath
|
| 147 |
+
|
| 148 |
+
$pyvenvConfigContent | ForEach-Object {
|
| 149 |
+
$keyval = $PSItem -split "\s*=\s*", 2
|
| 150 |
+
if ($keyval[0] -and $keyval[1]) {
|
| 151 |
+
$val = $keyval[1]
|
| 152 |
+
|
| 153 |
+
# Remove extraneous quotations around a string value.
|
| 154 |
+
if ("'""".Contains($val.Substring(0, 1))) {
|
| 155 |
+
$val = $val.Substring(1, $val.Length - 2)
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
$pyvenvConfig[$keyval[0]] = $val
|
| 159 |
+
Write-Verbose "Adding Key: '$($keyval[0])'='$val'"
|
| 160 |
+
}
|
| 161 |
+
}
|
| 162 |
+
}
|
| 163 |
+
return $pyvenvConfig
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
<# Begin Activate script --------------------------------------------------- #>
|
| 168 |
+
|
| 169 |
+
# Determine the containing directory of this script
|
| 170 |
+
$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
| 171 |
+
$VenvExecDir = Get-Item -Path $VenvExecPath
|
| 172 |
+
|
| 173 |
+
Write-Verbose "Activation script is located in path: '$VenvExecPath'"
|
| 174 |
+
Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)"
|
| 175 |
+
Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)"
|
| 176 |
+
|
| 177 |
+
# Set values required in priority: CmdLine, ConfigFile, Default
|
| 178 |
+
# First, get the location of the virtual environment, it might not be
|
| 179 |
+
# VenvExecDir if specified on the command line.
|
| 180 |
+
if ($VenvDir) {
|
| 181 |
+
Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values"
|
| 182 |
+
}
|
| 183 |
+
else {
|
| 184 |
+
Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir."
|
| 185 |
+
$VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/")
|
| 186 |
+
Write-Verbose "VenvDir=$VenvDir"
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
# Next, read the `pyvenv.cfg` file to determine any required value such
|
| 190 |
+
# as `prompt`.
|
| 191 |
+
$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir
|
| 192 |
+
|
| 193 |
+
# Next, set the prompt from the command line, or the config file, or
|
| 194 |
+
# just use the name of the virtual environment folder.
|
| 195 |
+
if ($Prompt) {
|
| 196 |
+
Write-Verbose "Prompt specified as argument, using '$Prompt'"
|
| 197 |
+
}
|
| 198 |
+
else {
|
| 199 |
+
Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value"
|
| 200 |
+
if ($pyvenvCfg -and $pyvenvCfg['prompt']) {
|
| 201 |
+
Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'"
|
| 202 |
+
$Prompt = $pyvenvCfg['prompt'];
|
| 203 |
+
}
|
| 204 |
+
else {
|
| 205 |
+
Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)"
|
| 206 |
+
Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'"
|
| 207 |
+
$Prompt = Split-Path -Path $venvDir -Leaf
|
| 208 |
+
}
|
| 209 |
+
}
|
| 210 |
+
|
| 211 |
+
Write-Verbose "Prompt = '$Prompt'"
|
| 212 |
+
Write-Verbose "VenvDir='$VenvDir'"
|
| 213 |
+
|
| 214 |
+
# Deactivate any currently active virtual environment, but leave the
|
| 215 |
+
# deactivate function in place.
|
| 216 |
+
deactivate -nondestructive
|
| 217 |
+
|
| 218 |
+
# Now set the environment variable VIRTUAL_ENV, used by many tools to determine
|
| 219 |
+
# that there is an activated venv.
|
| 220 |
+
$env:VIRTUAL_ENV = $VenvDir
|
| 221 |
+
|
| 222 |
+
if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {
|
| 223 |
+
|
| 224 |
+
Write-Verbose "Setting prompt to '$Prompt'"
|
| 225 |
+
|
| 226 |
+
# Set the prompt to include the env name
|
| 227 |
+
# Make sure _OLD_VIRTUAL_PROMPT is global
|
| 228 |
+
function global:_OLD_VIRTUAL_PROMPT { "" }
|
| 229 |
+
Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT
|
| 230 |
+
New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt
|
| 231 |
+
|
| 232 |
+
function global:prompt {
|
| 233 |
+
Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) "
|
| 234 |
+
_OLD_VIRTUAL_PROMPT
|
| 235 |
+
}
|
| 236 |
+
$env:VIRTUAL_ENV_PROMPT = $Prompt
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
# Clear PYTHONHOME
|
| 240 |
+
if (Test-Path -Path Env:PYTHONHOME) {
|
| 241 |
+
Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME
|
| 242 |
+
Remove-Item -Path Env:PYTHONHOME
|
| 243 |
+
}
|
| 244 |
+
|
| 245 |
+
# Add the venv to the PATH
|
| 246 |
+
Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH
|
| 247 |
+
$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH"
|
venv/bin/activate
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file must be used with "source bin/activate" *from bash*
|
| 2 |
+
# you cannot run it directly
|
| 3 |
+
|
| 4 |
+
deactivate () {
|
| 5 |
+
# reset old environment variables
|
| 6 |
+
if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
|
| 7 |
+
PATH="${_OLD_VIRTUAL_PATH:-}"
|
| 8 |
+
export PATH
|
| 9 |
+
unset _OLD_VIRTUAL_PATH
|
| 10 |
+
fi
|
| 11 |
+
if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
|
| 12 |
+
PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
|
| 13 |
+
export PYTHONHOME
|
| 14 |
+
unset _OLD_VIRTUAL_PYTHONHOME
|
| 15 |
+
fi
|
| 16 |
+
|
| 17 |
+
# This should detect bash and zsh, which have a hash command that must
|
| 18 |
+
# be called to get it to forget past commands. Without forgetting
|
| 19 |
+
# past commands the $PATH changes we made may not be respected
|
| 20 |
+
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
|
| 21 |
+
hash -r 2> /dev/null
|
| 22 |
+
fi
|
| 23 |
+
|
| 24 |
+
if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
|
| 25 |
+
PS1="${_OLD_VIRTUAL_PS1:-}"
|
| 26 |
+
export PS1
|
| 27 |
+
unset _OLD_VIRTUAL_PS1
|
| 28 |
+
fi
|
| 29 |
+
|
| 30 |
+
unset VIRTUAL_ENV
|
| 31 |
+
unset VIRTUAL_ENV_PROMPT
|
| 32 |
+
if [ ! "${1:-}" = "nondestructive" ] ; then
|
| 33 |
+
# Self destruct!
|
| 34 |
+
unset -f deactivate
|
| 35 |
+
fi
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
# unset irrelevant variables
|
| 39 |
+
deactivate nondestructive
|
| 40 |
+
|
| 41 |
+
VIRTUAL_ENV=/home/Ubuntu/models/Stable-diffusion/venv
|
| 42 |
+
export VIRTUAL_ENV
|
| 43 |
+
|
| 44 |
+
_OLD_VIRTUAL_PATH="$PATH"
|
| 45 |
+
PATH="$VIRTUAL_ENV/"bin":$PATH"
|
| 46 |
+
export PATH
|
| 47 |
+
|
| 48 |
+
# unset PYTHONHOME if set
|
| 49 |
+
# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
|
| 50 |
+
# could use `if (set -u; : $PYTHONHOME) ;` in bash
|
| 51 |
+
if [ -n "${PYTHONHOME:-}" ] ; then
|
| 52 |
+
_OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
|
| 53 |
+
unset PYTHONHOME
|
| 54 |
+
fi
|
| 55 |
+
|
| 56 |
+
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
|
| 57 |
+
_OLD_VIRTUAL_PS1="${PS1:-}"
|
| 58 |
+
PS1='(venv) '"${PS1:-}"
|
| 59 |
+
export PS1
|
| 60 |
+
VIRTUAL_ENV_PROMPT='(venv) '
|
| 61 |
+
export VIRTUAL_ENV_PROMPT
|
| 62 |
+
fi
|
| 63 |
+
|
| 64 |
+
# This should detect bash and zsh, which have a hash command that must
|
| 65 |
+
# be called to get it to forget past commands. Without forgetting
|
| 66 |
+
# past commands the $PATH changes we made may not be respected
|
| 67 |
+
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
|
| 68 |
+
hash -r 2> /dev/null
|
| 69 |
+
fi
|
venv/bin/activate.csh
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file must be used with "source bin/activate.csh" *from csh*.
|
| 2 |
+
# You cannot run it directly.
|
| 3 |
+
# Created by Davide Di Blasi <davidedb@gmail.com>.
|
| 4 |
+
# Ported to Python 3.3 venv by Andrew Svetlov <andrew.svetlov@gmail.com>
|
| 5 |
+
|
| 6 |
+
alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate'
|
| 7 |
+
|
| 8 |
+
# Unset irrelevant variables.
|
| 9 |
+
deactivate nondestructive
|
| 10 |
+
|
| 11 |
+
setenv VIRTUAL_ENV /home/Ubuntu/models/Stable-diffusion/venv
|
| 12 |
+
|
| 13 |
+
set _OLD_VIRTUAL_PATH="$PATH"
|
| 14 |
+
setenv PATH "$VIRTUAL_ENV/"bin":$PATH"
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
set _OLD_VIRTUAL_PROMPT="$prompt"
|
| 18 |
+
|
| 19 |
+
if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
|
| 20 |
+
set prompt = '(venv) '"$prompt"
|
| 21 |
+
setenv VIRTUAL_ENV_PROMPT '(venv) '
|
| 22 |
+
endif
|
| 23 |
+
|
| 24 |
+
alias pydoc python -m pydoc
|
| 25 |
+
|
| 26 |
+
rehash
|
venv/bin/activate.fish
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file must be used with "source <venv>/bin/activate.fish" *from fish*
|
| 2 |
+
# (https://fishshell.com/); you cannot run it directly.
|
| 3 |
+
|
| 4 |
+
function deactivate -d "Exit virtual environment and return to normal shell environment"
|
| 5 |
+
# reset old environment variables
|
| 6 |
+
if test -n "$_OLD_VIRTUAL_PATH"
|
| 7 |
+
set -gx PATH $_OLD_VIRTUAL_PATH
|
| 8 |
+
set -e _OLD_VIRTUAL_PATH
|
| 9 |
+
end
|
| 10 |
+
if test -n "$_OLD_VIRTUAL_PYTHONHOME"
|
| 11 |
+
set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME
|
| 12 |
+
set -e _OLD_VIRTUAL_PYTHONHOME
|
| 13 |
+
end
|
| 14 |
+
|
| 15 |
+
if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
|
| 16 |
+
set -e _OLD_FISH_PROMPT_OVERRIDE
|
| 17 |
+
# prevents error when using nested fish instances (Issue #93858)
|
| 18 |
+
if functions -q _old_fish_prompt
|
| 19 |
+
functions -e fish_prompt
|
| 20 |
+
functions -c _old_fish_prompt fish_prompt
|
| 21 |
+
functions -e _old_fish_prompt
|
| 22 |
+
end
|
| 23 |
+
end
|
| 24 |
+
|
| 25 |
+
set -e VIRTUAL_ENV
|
| 26 |
+
set -e VIRTUAL_ENV_PROMPT
|
| 27 |
+
if test "$argv[1]" != "nondestructive"
|
| 28 |
+
# Self-destruct!
|
| 29 |
+
functions -e deactivate
|
| 30 |
+
end
|
| 31 |
+
end
|
| 32 |
+
|
| 33 |
+
# Unset irrelevant variables.
|
| 34 |
+
deactivate nondestructive
|
| 35 |
+
|
| 36 |
+
set -gx VIRTUAL_ENV /home/Ubuntu/models/Stable-diffusion/venv
|
| 37 |
+
|
| 38 |
+
set -gx _OLD_VIRTUAL_PATH $PATH
|
| 39 |
+
set -gx PATH "$VIRTUAL_ENV/"bin $PATH
|
| 40 |
+
|
| 41 |
+
# Unset PYTHONHOME if set.
|
| 42 |
+
if set -q PYTHONHOME
|
| 43 |
+
set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME
|
| 44 |
+
set -e PYTHONHOME
|
| 45 |
+
end
|
| 46 |
+
|
| 47 |
+
if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
|
| 48 |
+
# fish uses a function instead of an env var to generate the prompt.
|
| 49 |
+
|
| 50 |
+
# Save the current fish_prompt function as the function _old_fish_prompt.
|
| 51 |
+
functions -c fish_prompt _old_fish_prompt
|
| 52 |
+
|
| 53 |
+
# With the original prompt function renamed, we can override with our own.
|
| 54 |
+
function fish_prompt
|
| 55 |
+
# Save the return status of the last command.
|
| 56 |
+
set -l old_status $status
|
| 57 |
+
|
| 58 |
+
# Output the venv prompt; color taken from the blue of the Python logo.
|
| 59 |
+
printf "%s%s%s" (set_color 4B8BBE) '(venv) ' (set_color normal)
|
| 60 |
+
|
| 61 |
+
# Restore the return status of the previous command.
|
| 62 |
+
echo "exit $old_status" | .
|
| 63 |
+
# Output the original/"old" prompt.
|
| 64 |
+
_old_fish_prompt
|
| 65 |
+
end
|
| 66 |
+
|
| 67 |
+
set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
|
| 68 |
+
set -gx VIRTUAL_ENV_PROMPT '(venv) '
|
| 69 |
+
end
|
venv/bin/pip
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/home/Ubuntu/models/Stable-diffusion/venv/bin/python3.10
|
| 2 |
+
# -*- coding: utf-8 -*-
|
| 3 |
+
import re
|
| 4 |
+
import sys
|
| 5 |
+
from pip._internal.cli.main import main
|
| 6 |
+
if __name__ == '__main__':
|
| 7 |
+
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
| 8 |
+
sys.exit(main())
|
venv/bin/pip3
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/home/Ubuntu/models/Stable-diffusion/venv/bin/python3.10
|
| 2 |
+
# -*- coding: utf-8 -*-
|
| 3 |
+
import re
|
| 4 |
+
import sys
|
| 5 |
+
from pip._internal.cli.main import main
|
| 6 |
+
if __name__ == '__main__':
|
| 7 |
+
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
| 8 |
+
sys.exit(main())
|
venv/bin/pip3.10
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/home/Ubuntu/models/Stable-diffusion/venv/bin/python3.10
|
| 2 |
+
# -*- coding: utf-8 -*-
|
| 3 |
+
import re
|
| 4 |
+
import sys
|
| 5 |
+
from pip._internal.cli.main import main
|
| 6 |
+
if __name__ == '__main__':
|
| 7 |
+
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
| 8 |
+
sys.exit(main())
|
venv/bin/python
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:11dde438e1a636073e79c81d4c2543708cc0a2922e7c42c38b1b588e17545f96
|
| 3 |
+
size 5937800
|
venv/bin/python3
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:11dde438e1a636073e79c81d4c2543708cc0a2922e7c42c38b1b588e17545f96
|
| 3 |
+
size 5937800
|
venv/bin/python3.10
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:11dde438e1a636073e79c81d4c2543708cc0a2922e7c42c38b1b588e17545f96
|
| 3 |
+
size 5937800
|
venv/lib/python3.10/site-packages/pip-22.0.2.dist-info/INSTALLER
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
pip
|
venv/lib/python3.10/site-packages/pip-22.0.2.dist-info/LICENSE.txt
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright (c) 2008-present The pip developers (see AUTHORS.txt file)
|
| 2 |
+
|
| 3 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
| 4 |
+
a copy of this software and associated documentation files (the
|
| 5 |
+
"Software"), to deal in the Software without restriction, including
|
| 6 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
| 7 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
| 8 |
+
permit persons to whom the Software is furnished to do so, subject to
|
| 9 |
+
the following conditions:
|
| 10 |
+
|
| 11 |
+
The above copyright notice and this permission notice shall be
|
| 12 |
+
included in all copies or substantial portions of the Software.
|
| 13 |
+
|
| 14 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 15 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 16 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
| 17 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
| 18 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
| 19 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
| 20 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
venv/lib/python3.10/site-packages/pip-22.0.2.dist-info/METADATA
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.1
|
| 2 |
+
Name: pip
|
| 3 |
+
Version: 22.0.2
|
| 4 |
+
Summary: The PyPA recommended tool for installing Python packages.
|
| 5 |
+
Home-page: https://pip.pypa.io/
|
| 6 |
+
Author: The pip developers
|
| 7 |
+
Author-email: distutils-sig@python.org
|
| 8 |
+
License: MIT
|
| 9 |
+
Project-URL: Documentation, https://pip.pypa.io
|
| 10 |
+
Project-URL: Source, https://github.com/pypa/pip
|
| 11 |
+
Project-URL: Changelog, https://pip.pypa.io/en/stable/news/
|
| 12 |
+
Platform: UNKNOWN
|
| 13 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 14 |
+
Classifier: Intended Audience :: Developers
|
| 15 |
+
Classifier: License :: OSI Approved :: MIT License
|
| 16 |
+
Classifier: Topic :: Software Development :: Build Tools
|
| 17 |
+
Classifier: Programming Language :: Python
|
| 18 |
+
Classifier: Programming Language :: Python :: 3
|
| 19 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
| 20 |
+
Classifier: Programming Language :: Python :: 3.7
|
| 21 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 22 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 23 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 24 |
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
| 25 |
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
| 26 |
+
Requires-Python: >=3.7
|
| 27 |
+
License-File: LICENSE.txt
|
| 28 |
+
|
| 29 |
+
pip - The Python Package Installer
|
| 30 |
+
==================================
|
| 31 |
+
|
| 32 |
+
.. image:: https://img.shields.io/pypi/v/pip.svg
|
| 33 |
+
:target: https://pypi.org/project/pip/
|
| 34 |
+
|
| 35 |
+
.. image:: https://readthedocs.org/projects/pip/badge/?version=latest
|
| 36 |
+
:target: https://pip.pypa.io/en/latest
|
| 37 |
+
|
| 38 |
+
pip is the `package installer`_ for Python. You can use pip to install packages from the `Python Package Index`_ and other indexes.
|
| 39 |
+
|
| 40 |
+
Please take a look at our documentation for how to install and use pip:
|
| 41 |
+
|
| 42 |
+
* `Installation`_
|
| 43 |
+
* `Usage`_
|
| 44 |
+
|
| 45 |
+
We release updates regularly, with a new version every 3 months. Find more details in our documentation:
|
| 46 |
+
|
| 47 |
+
* `Release notes`_
|
| 48 |
+
* `Release process`_
|
| 49 |
+
|
| 50 |
+
In pip 20.3, we've `made a big improvement to the heart of pip`_; `learn more`_. We want your input, so `sign up for our user experience research studies`_ to help us do it right.
|
| 51 |
+
|
| 52 |
+
**Note**: pip 21.0, in January 2021, removed Python 2 support, per pip's `Python 2 support policy`_. Please migrate to Python 3.
|
| 53 |
+
|
| 54 |
+
If you find bugs, need help, or want to talk to the developers, please use our mailing lists or chat rooms:
|
| 55 |
+
|
| 56 |
+
* `Issue tracking`_
|
| 57 |
+
* `Discourse channel`_
|
| 58 |
+
* `User IRC`_
|
| 59 |
+
|
| 60 |
+
If you want to get involved head over to GitHub to get the source code, look at our development documentation and feel free to jump on the developer mailing lists and chat rooms:
|
| 61 |
+
|
| 62 |
+
* `GitHub page`_
|
| 63 |
+
* `Development documentation`_
|
| 64 |
+
* `Development mailing list`_
|
| 65 |
+
* `Development IRC`_
|
| 66 |
+
|
| 67 |
+
Code of Conduct
|
| 68 |
+
---------------
|
| 69 |
+
|
| 70 |
+
Everyone interacting in the pip project's codebases, issue trackers, chat
|
| 71 |
+
rooms, and mailing lists is expected to follow the `PSF Code of Conduct`_.
|
| 72 |
+
|
| 73 |
+
.. _package installer: https://packaging.python.org/guides/tool-recommendations/
|
| 74 |
+
.. _Python Package Index: https://pypi.org
|
| 75 |
+
.. _Installation: https://pip.pypa.io/en/stable/installation/
|
| 76 |
+
.. _Usage: https://pip.pypa.io/en/stable/
|
| 77 |
+
.. _Release notes: https://pip.pypa.io/en/stable/news.html
|
| 78 |
+
.. _Release process: https://pip.pypa.io/en/latest/development/release-process/
|
| 79 |
+
.. _GitHub page: https://github.com/pypa/pip
|
| 80 |
+
.. _Development documentation: https://pip.pypa.io/en/latest/development
|
| 81 |
+
.. _made a big improvement to the heart of pip: https://pyfound.blogspot.com/2020/11/pip-20-3-new-resolver.html
|
| 82 |
+
.. _learn more: https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver-in-20-3-2020
|
| 83 |
+
.. _sign up for our user experience research studies: https://pyfound.blogspot.com/2020/03/new-pip-resolver-to-roll-out-this-year.html
|
| 84 |
+
.. _Python 2 support policy: https://pip.pypa.io/en/latest/development/release-process/#python-2-support
|
| 85 |
+
.. _Issue tracking: https://github.com/pypa/pip/issues
|
| 86 |
+
.. _Discourse channel: https://discuss.python.org/c/packaging
|
| 87 |
+
.. _Development mailing list: https://mail.python.org/mailman3/lists/distutils-sig.python.org/
|
| 88 |
+
.. _User IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa
|
| 89 |
+
.. _Development IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa-dev
|
| 90 |
+
.. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md
|
| 91 |
+
|
| 92 |
+
|
venv/lib/python3.10/site-packages/pip-22.0.2.dist-info/RECORD
ADDED
|
@@ -0,0 +1,1037 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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Q-KpnL1ZBWPqtecyaP_0,261
|
| 2 |
+
../../../bin/pip3,sha256=gqRypZLV4fdY_ERou0oxPURQ-KpnL1ZBWPqtecyaP_0,261
|
| 3 |
+
../../../bin/pip3.10,sha256=gqRypZLV4fdY_ERou0oxPURQ-KpnL1ZBWPqtecyaP_0,261
|
| 4 |
+
../../../bin/pip3.10,sha256=gqRypZLV4fdY_ERou0oxPURQ-KpnL1ZBWPqtecyaP_0,261
|
| 5 |
+
pip-22.0.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 6 |
+
pip-22.0.2.dist-info/LICENSE.txt,sha256=Y0MApmnUmurmWxLGxIySTFGkzfPR_whtw0VtyLyqIQQ,1093
|
| 7 |
+
pip-22.0.2.dist-info/METADATA,sha256=Yixa0LKkyzjT2N5JQO5qYDgZcmTs6Z6dg4UbwBNyT2A,4166
|
| 8 |
+
pip-22.0.2.dist-info/RECORD,,
|
| 9 |
+
pip-22.0.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 10 |
+
pip-22.0.2.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
| 11 |
+
pip-22.0.2.dist-info/entry_points.txt,sha256=vUvIlB_ga0fFQuWvFEq6uJKftMG_HNuoe4kgXkb5rNY,126
|
| 12 |
+
pip-22.0.2.dist-info/top_level.txt,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 13 |
+
pip/__init__.py,sha256=PZBF-ESk5Q0DZxQd4HHmTU_wX8y1ynzxBCRdu_fxHSI,357
|
| 14 |
+
pip/__main__.py,sha256=mXwWDftNLMKfwVqKFWGE_uuBZvGSIiUELhLkeysIuZc,1198
|
| 15 |
+
pip/__pycache__/__init__.cpython-310.pyc,,
|
| 16 |
+
pip/__pycache__/__main__.cpython-310.pyc,,
|
| 17 |
+
pip/_internal/__init__.py,sha256=nnFCuxrPMgALrIDxSoy-H6Zj4W4UY60D-uL1aJyq0pc,573
|
| 18 |
+
pip/_internal/__pycache__/__init__.cpython-310.pyc,,
|
| 19 |
+
pip/_internal/__pycache__/build_env.cpython-310.pyc,,
|
| 20 |
+
pip/_internal/__pycache__/cache.cpython-310.pyc,,
|
| 21 |
+
pip/_internal/__pycache__/configuration.cpython-310.pyc,,
|
| 22 |
+
pip/_internal/__pycache__/exceptions.cpython-310.pyc,,
|
| 23 |
+
pip/_internal/__pycache__/main.cpython-310.pyc,,
|
| 24 |
+
pip/_internal/__pycache__/pyproject.cpython-310.pyc,,
|
| 25 |
+
pip/_internal/__pycache__/self_outdated_check.cpython-310.pyc,,
|
| 26 |
+
pip/_internal/__pycache__/wheel_builder.cpython-310.pyc,,
|
| 27 |
+
pip/_internal/build_env.py,sha256=QAsnxJFvj74jS2cZUcxk7zXLvrtAYiRL0EkSPkpSJTo,9739
|
| 28 |
+
pip/_internal/cache.py,sha256=71eaYwrls34HJ6gzbmmYiotiKhPNFTM_tqYJXD5nf3s,9441
|
| 29 |
+
pip/_internal/cli/__init__.py,sha256=FkHBgpxxb-_gd6r1FjnNhfMOzAUYyXoXKJ6abijfcFU,132
|
| 30 |
+
pip/_internal/cli/__pycache__/__init__.cpython-310.pyc,,
|
| 31 |
+
pip/_internal/cli/__pycache__/autocompletion.cpython-310.pyc,,
|
| 32 |
+
pip/_internal/cli/__pycache__/base_command.cpython-310.pyc,,
|
| 33 |
+
pip/_internal/cli/__pycache__/cmdoptions.cpython-310.pyc,,
|
| 34 |
+
pip/_internal/cli/__pycache__/command_context.cpython-310.pyc,,
|
| 35 |
+
pip/_internal/cli/__pycache__/main.cpython-310.pyc,,
|
| 36 |
+
pip/_internal/cli/__pycache__/main_parser.cpython-310.pyc,,
|
| 37 |
+
pip/_internal/cli/__pycache__/parser.cpython-310.pyc,,
|
| 38 |
+
pip/_internal/cli/__pycache__/progress_bars.cpython-310.pyc,,
|
| 39 |
+
pip/_internal/cli/__pycache__/req_command.cpython-310.pyc,,
|
| 40 |
+
pip/_internal/cli/__pycache__/spinners.cpython-310.pyc,,
|
| 41 |
+
pip/_internal/cli/__pycache__/status_codes.cpython-310.pyc,,
|
| 42 |
+
pip/_internal/cli/autocompletion.py,sha256=wY2JPZY2Eji1vhR7bVo-yCBPJ9LCy6P80iOAhZD1Vi8,6676
|
| 43 |
+
pip/_internal/cli/base_command.py,sha256=6IVFmOjObv0ILip28QcgP8glhXHiGRvU_9kO35Hr7Z0,8037
|
| 44 |
+
pip/_internal/cli/cmdoptions.py,sha256=GT2G2YKBj-851qGseugn2Veq7fJe3FA30gWdcziPQvo,28525
|
| 45 |
+
pip/_internal/cli/command_context.py,sha256=a1pBBvvGLDiZ1Kw64_4tT6HmRTwYDoYy8JFgG5Czn7s,760
|
| 46 |
+
pip/_internal/cli/main.py,sha256=ioJ8IVlb2K1qLOxR-tXkee9lURhYV89CDM71MKag7YY,2472
|
| 47 |
+
pip/_internal/cli/main_parser.py,sha256=Q9TnytfuC5Z2JSjBFWVGtEdYLFy7rukNIb04movHdAo,2614
|
| 48 |
+
pip/_internal/cli/parser.py,sha256=CDXTuFr2UD8ozOlZYf1KDziQdo9-X_IaYOiUcyJQwrA,10788
|
| 49 |
+
pip/_internal/cli/progress_bars.py,sha256=_52w11WoZrvDSR3oItLWvLrEZFUKAfLf4Y6I6WtOnIU,10339
|
| 50 |
+
pip/_internal/cli/req_command.py,sha256=VwqonOy18QwZsRsVjHhp-6w15fG9x3Ltwoa8yJqQno8,18669
|
| 51 |
+
pip/_internal/cli/spinners.py,sha256=TFhjxtOnLeNJ5YmRvQm4eKPgPbJNkZiqO8jOXuxRaYU,5076
|
| 52 |
+
pip/_internal/cli/status_codes.py,sha256=sEFHUaUJbqv8iArL3HAtcztWZmGOFX01hTesSytDEh0,116
|
| 53 |
+
pip/_internal/commands/__init__.py,sha256=Vc1HjsLEtyCh7506OozPHPKXe2Hk-z9cFkFF3BMj1lM,3736
|
| 54 |
+
pip/_internal/commands/__pycache__/__init__.cpython-310.pyc,,
|
| 55 |
+
pip/_internal/commands/__pycache__/cache.cpython-310.pyc,,
|
| 56 |
+
pip/_internal/commands/__pycache__/check.cpython-310.pyc,,
|
| 57 |
+
pip/_internal/commands/__pycache__/completion.cpython-310.pyc,,
|
| 58 |
+
pip/_internal/commands/__pycache__/configuration.cpython-310.pyc,,
|
| 59 |
+
pip/_internal/commands/__pycache__/debug.cpython-310.pyc,,
|
| 60 |
+
pip/_internal/commands/__pycache__/download.cpython-310.pyc,,
|
| 61 |
+
pip/_internal/commands/__pycache__/freeze.cpython-310.pyc,,
|
| 62 |
+
pip/_internal/commands/__pycache__/hash.cpython-310.pyc,,
|
| 63 |
+
pip/_internal/commands/__pycache__/help.cpython-310.pyc,,
|
| 64 |
+
pip/_internal/commands/__pycache__/index.cpython-310.pyc,,
|
| 65 |
+
pip/_internal/commands/__pycache__/install.cpython-310.pyc,,
|
| 66 |
+
pip/_internal/commands/__pycache__/list.cpython-310.pyc,,
|
| 67 |
+
pip/_internal/commands/__pycache__/search.cpython-310.pyc,,
|
| 68 |
+
pip/_internal/commands/__pycache__/show.cpython-310.pyc,,
|
| 69 |
+
pip/_internal/commands/__pycache__/uninstall.cpython-310.pyc,,
|
| 70 |
+
pip/_internal/commands/__pycache__/wheel.cpython-310.pyc,,
|
| 71 |
+
pip/_internal/commands/cache.py,sha256=p9gvc6W_xgxE2zO0o8NXqO1gGJEinEK42qEC-a7Cnuk,7524
|
| 72 |
+
pip/_internal/commands/check.py,sha256=0gjXR7j36xJT5cs2heYU_dfOfpnFfzX8OoPNNoKhqdM,1685
|
| 73 |
+
pip/_internal/commands/completion.py,sha256=kTG_I1VR3N5kGC4Ma9pQTSoY9Q1URCrNyseHSQ-rCL4,2958
|
| 74 |
+
pip/_internal/commands/configuration.py,sha256=arE8vLstjBg-Ar1krXF-bBmT1qBtnL7Fpk-NVh38a0U,8944
|
| 75 |
+
pip/_internal/commands/debug.py,sha256=krET-y45CnQzXwKR1qA3M_tJE4LE2vnQtm3yfGyDSnE,6629
|
| 76 |
+
pip/_internal/commands/download.py,sha256=gVIAEOcpWolhRj9hl89Qzn52G2b_pcZ8naXhxaXobdo,4942
|
| 77 |
+
pip/_internal/commands/freeze.py,sha256=PaJJB9mT_3vHeZ3mbFL_m1fzTYL-_Or3kDtXwTdZZ-A,2968
|
| 78 |
+
pip/_internal/commands/hash.py,sha256=EVVOuvGtoPEdFi8SNnmdqlCQrhCxV-kJsdwtdcCnXGQ,1703
|
| 79 |
+
pip/_internal/commands/help.py,sha256=gcc6QDkcgHMOuAn5UxaZwAStsRBrnGSn_yxjS57JIoM,1132
|
| 80 |
+
pip/_internal/commands/index.py,sha256=8pYkICUJlccjm3E83b7UuZ5DtOfLh1N7ZHXAgkajjHo,4849
|
| 81 |
+
pip/_internal/commands/install.py,sha256=YVygBF6vfrNi0jmdNBCM6bcoWb7vaALEGG1--8Mmf88,27893
|
| 82 |
+
pip/_internal/commands/list.py,sha256=aKt1PP7enTiNLD_1qDXXaIKQ2QvLmUDfoQU6SYxJ8Ek,12318
|
| 83 |
+
pip/_internal/commands/search.py,sha256=sbBZiARRc050QquOKcCvOr2K3XLsoYebLKZGRi__iUI,5697
|
| 84 |
+
pip/_internal/commands/show.py,sha256=2VicM3jF0YWgn4O1jG_QF5oxOT0ln57VDu1NE6hqWcM,5859
|
| 85 |
+
pip/_internal/commands/uninstall.py,sha256=DNTYAGJNljMO_YYBxrpcwj0FEl7lo_P55_98O6g2TNk,3526
|
| 86 |
+
pip/_internal/commands/wheel.py,sha256=7HAjLclZxIzBrX6JmhmGBVxH5xrjaBYCtSdpQi1pWCE,6206
|
| 87 |
+
pip/_internal/configuration.py,sha256=qmCX3uuVM73PQeAuWQHic22bhops8s31B8k02nFAoiQ,13171
|
| 88 |
+
pip/_internal/distributions/__init__.py,sha256=Hq6kt6gXBgjNit5hTTWLAzeCNOKoB-N0pGYSqehrli8,858
|
| 89 |
+
pip/_internal/distributions/__pycache__/__init__.cpython-310.pyc,,
|
| 90 |
+
pip/_internal/distributions/__pycache__/base.cpython-310.pyc,,
|
| 91 |
+
pip/_internal/distributions/__pycache__/installed.cpython-310.pyc,,
|
| 92 |
+
pip/_internal/distributions/__pycache__/sdist.cpython-310.pyc,,
|
| 93 |
+
pip/_internal/distributions/__pycache__/wheel.cpython-310.pyc,,
|
| 94 |
+
pip/_internal/distributions/base.py,sha256=3FUYD8Gb4YuSu3pggC_FRctZBDbpm5ZK89tPksIUjoE,1172
|
| 95 |
+
pip/_internal/distributions/installed.py,sha256=HzfNRu3smoOm54m8H2iK6LHzBx6_DEnka4OPEsizbXg,680
|
| 96 |
+
pip/_internal/distributions/sdist.py,sha256=0nJvU1RhZtbwaeYtLbzSwYrbGRcY6IgNsWdEhAHROK8,5499
|
| 97 |
+
pip/_internal/distributions/wheel.py,sha256=-NgzdIs-w_hcer_U81yzgpVTljJRg5m79xufqvbjv0s,1115
|
| 98 |
+
pip/_internal/exceptions.py,sha256=U-dV1ixkSz6NAU6Aw9dosKi2EzZ5D3BA7ilYZuTLKeU,20912
|
| 99 |
+
pip/_internal/index/__init__.py,sha256=vpt-JeTZefh8a-FC22ZeBSXFVbuBcXSGiILhQZJaNpQ,30
|
| 100 |
+
pip/_internal/index/__pycache__/__init__.cpython-310.pyc,,
|
| 101 |
+
pip/_internal/index/__pycache__/collector.cpython-310.pyc,,
|
| 102 |
+
pip/_internal/index/__pycache__/package_finder.cpython-310.pyc,,
|
| 103 |
+
pip/_internal/index/__pycache__/sources.cpython-310.pyc,,
|
| 104 |
+
pip/_internal/index/collector.py,sha256=8kXlmlnZ-qAknyxd0duCn5mxFHX-zr468ykutk8WOwo,21392
|
| 105 |
+
pip/_internal/index/package_finder.py,sha256=9UVg-7582nYNEWa0cIIl8otzPm4mlfyrQVuozAcssLo,36783
|
| 106 |
+
pip/_internal/index/sources.py,sha256=SVyPitv08-Qalh2_Bk5diAJ9GAA_d-a93koouQodAG0,6557
|
| 107 |
+
pip/_internal/locations/__init__.py,sha256=ergvPwlfNTmQYFmaRYbj--ZwTN5izgTL9KE5d0FB7-8,17362
|
| 108 |
+
pip/_internal/locations/__pycache__/__init__.cpython-310.pyc,,
|
| 109 |
+
pip/_internal/locations/__pycache__/_distutils.cpython-310.pyc,,
|
| 110 |
+
pip/_internal/locations/__pycache__/_sysconfig.cpython-310.pyc,,
|
| 111 |
+
pip/_internal/locations/__pycache__/base.cpython-310.pyc,,
|
| 112 |
+
pip/_internal/locations/_distutils.py,sha256=Sk7tw8ZP1DWMYJ8MibABsa8IME2Ejv1PKeGlYQCBTZc,5871
|
| 113 |
+
pip/_internal/locations/_sysconfig.py,sha256=LQNKTJKyjVqxXaPntlBwdUqTG1xwYf6GVCKMbyRJx5M,7918
|
| 114 |
+
pip/_internal/locations/base.py,sha256=x5D1ONktmPJd8nnUTh-ELsAJ7fiXA-k-0a_vhfi2_Us,1579
|
| 115 |
+
pip/_internal/main.py,sha256=r-UnUe8HLo5XFJz8inTcOOTiu_sxNhgHb6VwlGUllOI,340
|
| 116 |
+
pip/_internal/metadata/__init__.py,sha256=iGoDbe_iTXQTIAEVy9f7dm-VQfZANO8kkwFr1CpqxqI,2036
|
| 117 |
+
pip/_internal/metadata/__pycache__/__init__.cpython-310.pyc,,
|
| 118 |
+
pip/_internal/metadata/__pycache__/base.cpython-310.pyc,,
|
| 119 |
+
pip/_internal/metadata/__pycache__/pkg_resources.cpython-310.pyc,,
|
| 120 |
+
pip/_internal/metadata/base.py,sha256=SCRPtShrtPy0lfFxuaFTgJJHsRXToGFToQUAZoBBbeA,19429
|
| 121 |
+
pip/_internal/metadata/pkg_resources.py,sha256=wAnEtrcgH9YtV996MfoBjR2hGLHvi3uxk0vUOHbqBak,9456
|
| 122 |
+
pip/_internal/models/__init__.py,sha256=3DHUd_qxpPozfzouoqa9g9ts1Czr5qaHfFxbnxriepM,63
|
| 123 |
+
pip/_internal/models/__pycache__/__init__.cpython-310.pyc,,
|
| 124 |
+
pip/_internal/models/__pycache__/candidate.cpython-310.pyc,,
|
| 125 |
+
pip/_internal/models/__pycache__/direct_url.cpython-310.pyc,,
|
| 126 |
+
pip/_internal/models/__pycache__/format_control.cpython-310.pyc,,
|
| 127 |
+
pip/_internal/models/__pycache__/index.cpython-310.pyc,,
|
| 128 |
+
pip/_internal/models/__pycache__/link.cpython-310.pyc,,
|
| 129 |
+
pip/_internal/models/__pycache__/scheme.cpython-310.pyc,,
|
| 130 |
+
pip/_internal/models/__pycache__/search_scope.cpython-310.pyc,,
|
| 131 |
+
pip/_internal/models/__pycache__/selection_prefs.cpython-310.pyc,,
|
| 132 |
+
pip/_internal/models/__pycache__/target_python.cpython-310.pyc,,
|
| 133 |
+
pip/_internal/models/__pycache__/wheel.cpython-310.pyc,,
|
| 134 |
+
pip/_internal/models/candidate.py,sha256=6pcABsaR7CfIHlbJbr2_kMkVJFL_yrYjTx6SVWUnCPQ,990
|
| 135 |
+
pip/_internal/models/direct_url.py,sha256=7XtGQSLLDQb5ZywI2EMnnLcddtf5CJLx44lMtTHPxFw,6350
|
| 136 |
+
pip/_internal/models/format_control.py,sha256=DJpMYjxeYKKQdwNcML2_F0vtAh-qnKTYe-CpTxQe-4g,2520
|
| 137 |
+
pip/_internal/models/index.py,sha256=tYnL8oxGi4aSNWur0mG8DAP7rC6yuha_MwJO8xw0crI,1030
|
| 138 |
+
pip/_internal/models/link.py,sha256=hoT_qsOBAgLBm9GKqpBrNF_mrEXeGXQE-aH_RX2cGgg,9817
|
| 139 |
+
pip/_internal/models/scheme.py,sha256=3EFQp_ICu_shH1-TBqhl0QAusKCPDFOlgHFeN4XowWs,738
|
| 140 |
+
pip/_internal/models/search_scope.py,sha256=LwloG0PJAmtI1hFXIypsD95kWE9xfR5hf_a2v1Vw7sk,4520
|
| 141 |
+
pip/_internal/models/selection_prefs.py,sha256=KZdi66gsR-_RUXUr9uejssk3rmTHrQVJWeNA2sV-VSY,1907
|
| 142 |
+
pip/_internal/models/target_python.py,sha256=qKpZox7J8NAaPmDs5C_aniwfPDxzvpkrCKqfwndG87k,3858
|
| 143 |
+
pip/_internal/models/wheel.py,sha256=wlyz23BcZ40nBLX3rXKtrV6tmc8-8RxHyV-hq5zJ74Q,3525
|
| 144 |
+
pip/_internal/network/__init__.py,sha256=jf6Tt5nV_7zkARBrKojIXItgejvoegVJVKUbhAa5Ioc,50
|
| 145 |
+
pip/_internal/network/__pycache__/__init__.cpython-310.pyc,,
|
| 146 |
+
pip/_internal/network/__pycache__/auth.cpython-310.pyc,,
|
| 147 |
+
pip/_internal/network/__pycache__/cache.cpython-310.pyc,,
|
| 148 |
+
pip/_internal/network/__pycache__/download.cpython-310.pyc,,
|
| 149 |
+
pip/_internal/network/__pycache__/lazy_wheel.cpython-310.pyc,,
|
| 150 |
+
pip/_internal/network/__pycache__/session.cpython-310.pyc,,
|
| 151 |
+
pip/_internal/network/__pycache__/utils.cpython-310.pyc,,
|
| 152 |
+
pip/_internal/network/__pycache__/xmlrpc.cpython-310.pyc,,
|
| 153 |
+
pip/_internal/network/auth.py,sha256=a3C7Xaa8kTJjXkdi_wrUjqaySc8Z9Yz7U6QIbXfzMyc,12190
|
| 154 |
+
pip/_internal/network/cache.py,sha256=FJ3uTUo3wgf2KHmeZ3ltN9x3tQoy_0X6qNsRtNXsuL0,2131
|
| 155 |
+
pip/_internal/network/download.py,sha256=12Ef_L7MlhNUN_0-n_3DggozWJER8c9J0us16cbvkKA,6062
|
| 156 |
+
pip/_internal/network/lazy_wheel.py,sha256=1b8ZJ1w4bSBzpGzGwJR_CL2yQ6AFIwWQkS1vbPPw2XU,7627
|
| 157 |
+
pip/_internal/network/session.py,sha256=38IKGKC64MTVUIH5XOR1hr2pOCzp39RccykdmGAvqRU,16729
|
| 158 |
+
pip/_internal/network/utils.py,sha256=igLlTu_-q0LmL8FdJKq-Uj7AT_owrQ-T9FfyarkhK5U,4059
|
| 159 |
+
pip/_internal/network/xmlrpc.py,sha256=AzQgG4GgS152_cqmGr_Oz2MIXsCal-xfsis7fA7nmU0,1791
|
| 160 |
+
pip/_internal/operations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 161 |
+
pip/_internal/operations/__pycache__/__init__.cpython-310.pyc,,
|
| 162 |
+
pip/_internal/operations/__pycache__/check.cpython-310.pyc,,
|
| 163 |
+
pip/_internal/operations/__pycache__/freeze.cpython-310.pyc,,
|
| 164 |
+
pip/_internal/operations/__pycache__/prepare.cpython-310.pyc,,
|
| 165 |
+
pip/_internal/operations/build/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 166 |
+
pip/_internal/operations/build/__pycache__/__init__.cpython-310.pyc,,
|
| 167 |
+
pip/_internal/operations/build/__pycache__/metadata.cpython-310.pyc,,
|
| 168 |
+
pip/_internal/operations/build/__pycache__/metadata_editable.cpython-310.pyc,,
|
| 169 |
+
pip/_internal/operations/build/__pycache__/metadata_legacy.cpython-310.pyc,,
|
| 170 |
+
pip/_internal/operations/build/__pycache__/wheel.cpython-310.pyc,,
|
| 171 |
+
pip/_internal/operations/build/__pycache__/wheel_editable.cpython-310.pyc,,
|
| 172 |
+
pip/_internal/operations/build/__pycache__/wheel_legacy.cpython-310.pyc,,
|
| 173 |
+
pip/_internal/operations/build/metadata.py,sha256=ES_uRmAvhrNm_nDTpZxshBfUsvnXtkj-g_4rZrH9Rww,1404
|
| 174 |
+
pip/_internal/operations/build/metadata_editable.py,sha256=_Rai0VZjxoeJUkjkuICrq45LtjwFoDOveosMYH43rKc,1456
|
| 175 |
+
pip/_internal/operations/build/metadata_legacy.py,sha256=o-eU21As175hDC7dluM1fJJ_FqokTIShyWpjKaIpHZw,2198
|
| 176 |
+
pip/_internal/operations/build/wheel.py,sha256=AO9XnTGhTgHtZmU8Dkbfo1OGr41rBuSDjIgAa4zUKgE,1063
|
| 177 |
+
pip/_internal/operations/build/wheel_editable.py,sha256=TVETY-L_M_dSEKBhTIcQOP75zKVXw8tuq1U354Mm30A,1405
|
| 178 |
+
pip/_internal/operations/build/wheel_legacy.py,sha256=C9j6rukgQI1n_JeQLoZGuDdfUwzCXShyIdPTp6edbMQ,3064
|
| 179 |
+
pip/_internal/operations/check.py,sha256=ca4O9CkPt9Em9sLCf3H0iVt1GIcW7M8C0U5XooaBuT4,5109
|
| 180 |
+
pip/_internal/operations/freeze.py,sha256=ZiYw5GlUpLVx4VJHz4S1AP2JFNyvH0iq5kpcYj2ovyw,9770
|
| 181 |
+
pip/_internal/operations/install/__init__.py,sha256=mX7hyD2GNBO2mFGokDQ30r_GXv7Y_PLdtxcUv144e-s,51
|
| 182 |
+
pip/_internal/operations/install/__pycache__/__init__.cpython-310.pyc,,
|
| 183 |
+
pip/_internal/operations/install/__pycache__/editable_legacy.cpython-310.pyc,,
|
| 184 |
+
pip/_internal/operations/install/__pycache__/legacy.cpython-310.pyc,,
|
| 185 |
+
pip/_internal/operations/install/__pycache__/wheel.cpython-310.pyc,,
|
| 186 |
+
pip/_internal/operations/install/editable_legacy.py,sha256=ee4kfJHNuzTdKItbfAsNOSEwq_vD7DRPGkBdK48yBhU,1354
|
| 187 |
+
pip/_internal/operations/install/legacy.py,sha256=x7BG8kBm0K3JO6AR4sBl0zh2LOrfUaz7EdNt-keHBv4,4091
|
| 188 |
+
pip/_internal/operations/install/wheel.py,sha256=QuQyCZE-XjuJjDYRixo40oUt2ucFhNmSrCbcXY7A9aE,27412
|
| 189 |
+
pip/_internal/operations/prepare.py,sha256=LJP97jsuiCAaTGVIRrcINvxc1ntVsB45MoRbyMIukg4,24145
|
| 190 |
+
pip/_internal/pyproject.py,sha256=Wm2ljdT6spC-tSdf1LBRaMYSJaXr1xUxV3OwdHCW9jc,6722
|
| 191 |
+
pip/_internal/req/__init__.py,sha256=A7mUvT1KAcCYP3H7gUOTx2GRMlgoDur3H68Q0OJqM5A,2793
|
| 192 |
+
pip/_internal/req/__pycache__/__init__.cpython-310.pyc,,
|
| 193 |
+
pip/_internal/req/__pycache__/constructors.cpython-310.pyc,,
|
| 194 |
+
pip/_internal/req/__pycache__/req_file.cpython-310.pyc,,
|
| 195 |
+
pip/_internal/req/__pycache__/req_install.cpython-310.pyc,,
|
| 196 |
+
pip/_internal/req/__pycache__/req_set.cpython-310.pyc,,
|
| 197 |
+
pip/_internal/req/__pycache__/req_tracker.cpython-310.pyc,,
|
| 198 |
+
pip/_internal/req/__pycache__/req_uninstall.cpython-310.pyc,,
|
| 199 |
+
pip/_internal/req/constructors.py,sha256=fXmtNI_J77JFP_HRvYcQW-1nKw3AiUu6Q3b1Nm8aMm0,16094
|
| 200 |
+
pip/_internal/req/req_file.py,sha256=5N8OTouPCof-305StC2YK9HBxQMw-xO46skRoBPbkZo,17421
|
| 201 |
+
pip/_internal/req/req_install.py,sha256=jU1HQBT_DnXZean7jY8wPNMhb6_CzdKHcilHFY_o-Fc,32524
|
| 202 |
+
pip/_internal/req/req_set.py,sha256=kHYiLvkKRx21WaLTwOI-54Ng0SSzZZ9SE7FD0PsfvYA,7584
|
| 203 |
+
pip/_internal/req/req_tracker.py,sha256=jK7JDu-Wt73X-gqozrFtgJVlUlnQo0P4IQ4x4_gPlfM,4117
|
| 204 |
+
pip/_internal/req/req_uninstall.py,sha256=K2BHYRRJAfkSpFqcPzc9XfX2EvbhaRtQIPRFmMtUdfo,23814
|
| 205 |
+
pip/_internal/resolution/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 206 |
+
pip/_internal/resolution/__pycache__/__init__.cpython-310.pyc,,
|
| 207 |
+
pip/_internal/resolution/__pycache__/base.cpython-310.pyc,,
|
| 208 |
+
pip/_internal/resolution/base.py,sha256=qlmh325SBVfvG6Me9gc5Nsh5sdwHBwzHBq6aEXtKsLA,583
|
| 209 |
+
pip/_internal/resolution/legacy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 210 |
+
pip/_internal/resolution/legacy/__pycache__/__init__.cpython-310.pyc,,
|
| 211 |
+
pip/_internal/resolution/legacy/__pycache__/resolver.cpython-310.pyc,,
|
| 212 |
+
pip/_internal/resolution/legacy/resolver.py,sha256=b7bf5qL1ROg73sl8dhTvLdD1w5XF8xybBAF6eF_kz7c,18288
|
| 213 |
+
pip/_internal/resolution/resolvelib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 214 |
+
pip/_internal/resolution/resolvelib/__pycache__/__init__.cpython-310.pyc,,
|
| 215 |
+
pip/_internal/resolution/resolvelib/__pycache__/base.cpython-310.pyc,,
|
| 216 |
+
pip/_internal/resolution/resolvelib/__pycache__/candidates.cpython-310.pyc,,
|
| 217 |
+
pip/_internal/resolution/resolvelib/__pycache__/factory.cpython-310.pyc,,
|
| 218 |
+
pip/_internal/resolution/resolvelib/__pycache__/found_candidates.cpython-310.pyc,,
|
| 219 |
+
pip/_internal/resolution/resolvelib/__pycache__/provider.cpython-310.pyc,,
|
| 220 |
+
pip/_internal/resolution/resolvelib/__pycache__/reporter.cpython-310.pyc,,
|
| 221 |
+
pip/_internal/resolution/resolvelib/__pycache__/requirements.cpython-310.pyc,,
|
| 222 |
+
pip/_internal/resolution/resolvelib/__pycache__/resolver.cpython-310.pyc,,
|
| 223 |
+
pip/_internal/resolution/resolvelib/base.py,sha256=u1O4fkvCO4mhmu5i32xrDv9AX5NgUci_eYVyBDQhTIM,5220
|
| 224 |
+
pip/_internal/resolution/resolvelib/candidates.py,sha256=KR5jxZRSahByOABXbwrX-zNoawa7Gm9Iss-HrvrcvNw,18357
|
| 225 |
+
pip/_internal/resolution/resolvelib/factory.py,sha256=0bbxnUSSjaeTmtIEgeeKtEqhEFfNhv3xpq7j9IaMq2c,28298
|
| 226 |
+
pip/_internal/resolution/resolvelib/found_candidates.py,sha256=hvL3Hoa9VaYo-qEOZkBi2Iqw251UDxPz-uMHVaWmLpE,5705
|
| 227 |
+
pip/_internal/resolution/resolvelib/provider.py,sha256=LzQQyzMVaZYAwLgKInbq-it6mbQL1gX0hGohz5Cr5wg,9915
|
| 228 |
+
pip/_internal/resolution/resolvelib/reporter.py,sha256=3ZVVYrs5PqvLFJkGLcuXoMK5mTInFzl31xjUpDBpZZk,2526
|
| 229 |
+
pip/_internal/resolution/resolvelib/requirements.py,sha256=B1ndvKPSuyyyTEXt9sKhbwminViSWnBrJa7qO2ln4Z0,5455
|
| 230 |
+
pip/_internal/resolution/resolvelib/resolver.py,sha256=ucoVKHtwH6gkZjcfIVJbUiOIHLqJxeYlrKTMIJciYwM,11335
|
| 231 |
+
pip/_internal/self_outdated_check.py,sha256=GKSatNlt2cz_CMGxu72FbUzuPaXpWOnIVKOOYIk0gvY,6849
|
| 232 |
+
pip/_internal/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 233 |
+
pip/_internal/utils/__pycache__/__init__.cpython-310.pyc,,
|
| 234 |
+
pip/_internal/utils/__pycache__/_log.cpython-310.pyc,,
|
| 235 |
+
pip/_internal/utils/__pycache__/appdirs.cpython-310.pyc,,
|
| 236 |
+
pip/_internal/utils/__pycache__/compat.cpython-310.pyc,,
|
| 237 |
+
pip/_internal/utils/__pycache__/compatibility_tags.cpython-310.pyc,,
|
| 238 |
+
pip/_internal/utils/__pycache__/datetime.cpython-310.pyc,,
|
| 239 |
+
pip/_internal/utils/__pycache__/deprecation.cpython-310.pyc,,
|
| 240 |
+
pip/_internal/utils/__pycache__/direct_url_helpers.cpython-310.pyc,,
|
| 241 |
+
pip/_internal/utils/__pycache__/distutils_args.cpython-310.pyc,,
|
| 242 |
+
pip/_internal/utils/__pycache__/egg_link.cpython-310.pyc,,
|
| 243 |
+
pip/_internal/utils/__pycache__/encoding.cpython-310.pyc,,
|
| 244 |
+
pip/_internal/utils/__pycache__/entrypoints.cpython-310.pyc,,
|
| 245 |
+
pip/_internal/utils/__pycache__/filesystem.cpython-310.pyc,,
|
| 246 |
+
pip/_internal/utils/__pycache__/filetypes.cpython-310.pyc,,
|
| 247 |
+
pip/_internal/utils/__pycache__/glibc.cpython-310.pyc,,
|
| 248 |
+
pip/_internal/utils/__pycache__/hashes.cpython-310.pyc,,
|
| 249 |
+
pip/_internal/utils/__pycache__/inject_securetransport.cpython-310.pyc,,
|
| 250 |
+
pip/_internal/utils/__pycache__/logging.cpython-310.pyc,,
|
| 251 |
+
pip/_internal/utils/__pycache__/misc.cpython-310.pyc,,
|
| 252 |
+
pip/_internal/utils/__pycache__/models.cpython-310.pyc,,
|
| 253 |
+
pip/_internal/utils/__pycache__/packaging.cpython-310.pyc,,
|
| 254 |
+
pip/_internal/utils/__pycache__/setuptools_build.cpython-310.pyc,,
|
| 255 |
+
pip/_internal/utils/__pycache__/subprocess.cpython-310.pyc,,
|
| 256 |
+
pip/_internal/utils/__pycache__/temp_dir.cpython-310.pyc,,
|
| 257 |
+
pip/_internal/utils/__pycache__/unpacking.cpython-310.pyc,,
|
| 258 |
+
pip/_internal/utils/__pycache__/urls.cpython-310.pyc,,
|
| 259 |
+
pip/_internal/utils/__pycache__/virtualenv.cpython-310.pyc,,
|
| 260 |
+
pip/_internal/utils/__pycache__/wheel.cpython-310.pyc,,
|
| 261 |
+
pip/_internal/utils/_log.py,sha256=-jHLOE_THaZz5BFcCnoSL9EYAtJ0nXem49s9of4jvKw,1015
|
| 262 |
+
pip/_internal/utils/appdirs.py,sha256=swgcTKOm3daLeXTW6v5BUS2Ti2RvEnGRQYH_yDXklAo,1665
|
| 263 |
+
pip/_internal/utils/compat.py,sha256=ACyBfLgj3_XG-iA5omEDrXqDM0cQKzi8h8HRBInzG6Q,1884
|
| 264 |
+
pip/_internal/utils/compatibility_tags.py,sha256=ydin8QG8BHqYRsPY4OL6cmb44CbqXl1T0xxS97VhHkk,5377
|
| 265 |
+
pip/_internal/utils/datetime.py,sha256=m21Y3wAtQc-ji6Veb6k_M5g6A0ZyFI4egchTdnwh-pQ,242
|
| 266 |
+
pip/_internal/utils/deprecation.py,sha256=NKo8VqLioJ4nnXXGmW4KdasxF90EFHkZaHeX1fT08C8,3627
|
| 267 |
+
pip/_internal/utils/direct_url_helpers.py,sha256=6F1tc2rcKaCZmgfVwsE6ObIe_Pux23mUVYA-2D9wCFc,3206
|
| 268 |
+
pip/_internal/utils/distutils_args.py,sha256=mcAscyp80vTt3xAGTipnpgc83V-_wCvydNELVXLq7JI,1249
|
| 269 |
+
pip/_internal/utils/egg_link.py,sha256=5MVlpz5LirT4iLQq86OYzjXaYF0D4Qk1dprEI7ThST4,2203
|
| 270 |
+
pip/_internal/utils/encoding.py,sha256=bdZ3YgUpaOEBI5MP4-DEXiQarCW3V0rxw1kRz-TaU1Q,1169
|
| 271 |
+
pip/_internal/utils/entrypoints.py,sha256=aPvCnQVi9Hdk35Kloww_D5ibjUpqxgqcJP8O9VuMZek,1055
|
| 272 |
+
pip/_internal/utils/filesystem.py,sha256=rrl-rY1w8TYyKYndUyZlE9ffkQyA4-jI9x_59zXkn5s,5893
|
| 273 |
+
pip/_internal/utils/filetypes.py,sha256=i8XAQ0eFCog26Fw9yV0Yb1ygAqKYB1w9Cz9n0fj8gZU,716
|
| 274 |
+
pip/_internal/utils/glibc.py,sha256=tDfwVYnJCOC0BNVpItpy8CGLP9BjkxFHdl0mTS0J7fc,3110
|
| 275 |
+
pip/_internal/utils/hashes.py,sha256=anpZfFGIT6HcIj2td9NHtE8AWg6GeAIhwpP8GPvZE0E,4811
|
| 276 |
+
pip/_internal/utils/inject_securetransport.py,sha256=o-QRVMGiENrTJxw3fAhA7uxpdEdw6M41TjHYtSVRrcg,795
|
| 277 |
+
pip/_internal/utils/logging.py,sha256=Rvght-fDXL70VWib1cpgZ3iU-kXODV98bNeLUlbqVto,11522
|
| 278 |
+
pip/_internal/utils/misc.py,sha256=MdUB12BMhj73sEmskEutmPyWFaJB7asoPCfLzs_YeT0,19359
|
| 279 |
+
pip/_internal/utils/models.py,sha256=5GoYU586SrxURMvDn_jBMJInitviJg4O5-iOU-6I0WY,1193
|
| 280 |
+
pip/_internal/utils/packaging.py,sha256=5Wm6_x7lKrlqVjPI5MBN_RurcRHwVYoQ7Ksrs84de7s,2108
|
| 281 |
+
pip/_internal/utils/setuptools_build.py,sha256=vNH9hQB9wT6d-h1hVQhBKw91jNeT42meHpVeii-urOI,5652
|
| 282 |
+
pip/_internal/utils/subprocess.py,sha256=vIWGpet5ARBmZ2Qn4NEHNgzCOduqbPIuByZmhhmr6mM,9182
|
| 283 |
+
pip/_internal/utils/temp_dir.py,sha256=zob3PYMVevONkheOMUp_4jDofrEY3HIu5DHK78cSspI,7662
|
| 284 |
+
pip/_internal/utils/unpacking.py,sha256=HUFlMEyCa9dPwdLh6sWeh95DeKytV8rsOyKShEw9y6g,8906
|
| 285 |
+
pip/_internal/utils/urls.py,sha256=AhaesUGl-9it6uvG6fsFPOr9ynFpGaTMk4t5XTX7Z_Q,1759
|
| 286 |
+
pip/_internal/utils/virtualenv.py,sha256=4_48qMzCwB_F5jIK5BC_ua7uiAMVifmQWU9NdaGUoVA,3459
|
| 287 |
+
pip/_internal/utils/wheel.py,sha256=lXOgZyTlOm5HmK8tw5iw0A3_5A6wRzsXHOaQkIvvloU,4549
|
| 288 |
+
pip/_internal/vcs/__init__.py,sha256=UAqvzpbi0VbZo3Ub6skEeZAw-ooIZR-zX_WpCbxyCoU,596
|
| 289 |
+
pip/_internal/vcs/__pycache__/__init__.cpython-310.pyc,,
|
| 290 |
+
pip/_internal/vcs/__pycache__/bazaar.cpython-310.pyc,,
|
| 291 |
+
pip/_internal/vcs/__pycache__/git.cpython-310.pyc,,
|
| 292 |
+
pip/_internal/vcs/__pycache__/mercurial.cpython-310.pyc,,
|
| 293 |
+
pip/_internal/vcs/__pycache__/subversion.cpython-310.pyc,,
|
| 294 |
+
pip/_internal/vcs/__pycache__/versioncontrol.cpython-310.pyc,,
|
| 295 |
+
pip/_internal/vcs/bazaar.py,sha256=IGb5ca1xSZfgegRD2_JeyoZPrQQHs7lEYEIgpVsKpoU,3047
|
| 296 |
+
pip/_internal/vcs/git.py,sha256=mjhwudCx9WlLNkxZ6_kOKmueF0rLoU2i1xeASKF6yiQ,18116
|
| 297 |
+
pip/_internal/vcs/mercurial.py,sha256=Bzbd518Jsx-EJI0IhIobiQqiRsUv5TWYnrmRIFWE0Gw,5238
|
| 298 |
+
pip/_internal/vcs/subversion.py,sha256=TEMRdwECvMcXakZX0pTNUep79kmBYkWDkWFkrYmcmac,11718
|
| 299 |
+
pip/_internal/vcs/versioncontrol.py,sha256=KUOc-hN51em9jrqxKwUR3JnkgSE-xSOqMiiJcSaL6B8,22811
|
| 300 |
+
pip/_internal/wheel_builder.py,sha256=65rOA8FSYt3c3HyqEw17uujjlCgqmoKEIv6rv9xN2NM,12307
|
| 301 |
+
pip/_vendor/__init__.py,sha256=xjcBX0EP50pkaMdCssrsBXoZgo2hTtYxlcH1CIyA3T4,4708
|
| 302 |
+
pip/_vendor/__pycache__/__init__.cpython-310.pyc,,
|
| 303 |
+
pip/_vendor/__pycache__/distro.cpython-310.pyc,,
|
| 304 |
+
pip/_vendor/__pycache__/six.cpython-310.pyc,,
|
| 305 |
+
pip/_vendor/__pycache__/typing_extensions.cpython-310.pyc,,
|
| 306 |
+
pip/_vendor/cachecontrol/__init__.py,sha256=1j_YQfjmiix6YyouLrftC6NzksAm8e8xGSjMKMRPIkM,465
|
| 307 |
+
pip/_vendor/cachecontrol/__pycache__/__init__.cpython-310.pyc,,
|
| 308 |
+
pip/_vendor/cachecontrol/__pycache__/_cmd.cpython-310.pyc,,
|
| 309 |
+
pip/_vendor/cachecontrol/__pycache__/adapter.cpython-310.pyc,,
|
| 310 |
+
pip/_vendor/cachecontrol/__pycache__/cache.cpython-310.pyc,,
|
| 311 |
+
pip/_vendor/cachecontrol/__pycache__/compat.cpython-310.pyc,,
|
| 312 |
+
pip/_vendor/cachecontrol/__pycache__/controller.cpython-310.pyc,,
|
| 313 |
+
pip/_vendor/cachecontrol/__pycache__/filewrapper.cpython-310.pyc,,
|
| 314 |
+
pip/_vendor/cachecontrol/__pycache__/heuristics.cpython-310.pyc,,
|
| 315 |
+
pip/_vendor/cachecontrol/__pycache__/serialize.cpython-310.pyc,,
|
| 316 |
+
pip/_vendor/cachecontrol/__pycache__/wrapper.cpython-310.pyc,,
|
| 317 |
+
pip/_vendor/cachecontrol/_cmd.py,sha256=lxUXqfNTVx84zf6tcWbkLZHA6WVBRtJRpfeA9ZqhaAY,1379
|
| 318 |
+
pip/_vendor/cachecontrol/adapter.py,sha256=ew9OYEQHEOjvGl06ZsuX8W3DAvHWsQKHwWAxISyGug8,5033
|
| 319 |
+
pip/_vendor/cachecontrol/cache.py,sha256=eMS9Bn9JWQkHiIYA5GPRBqKVU95uS-yXkxrzpoafRig,917
|
| 320 |
+
pip/_vendor/cachecontrol/caches/__init__.py,sha256=gGFOtIH8QDRvkP4YAfGIh-u9YYcGZVxwLM1-6e1mPNI,170
|
| 321 |
+
pip/_vendor/cachecontrol/caches/__pycache__/__init__.cpython-310.pyc,,
|
| 322 |
+
pip/_vendor/cachecontrol/caches/__pycache__/file_cache.cpython-310.pyc,,
|
| 323 |
+
pip/_vendor/cachecontrol/caches/__pycache__/redis_cache.cpython-310.pyc,,
|
| 324 |
+
pip/_vendor/cachecontrol/caches/file_cache.py,sha256=P2KHcNXiqxEW7fCq5KC-NYHGSk0nNR9NIKuN-vBTn-E,4251
|
| 325 |
+
pip/_vendor/cachecontrol/caches/redis_cache.py,sha256=tu_YBV7EV8vdBRGazUErkoRqYYjSBmNcB8dZ7BNomqk,940
|
| 326 |
+
pip/_vendor/cachecontrol/compat.py,sha256=LNx7vqBndYdHU8YuJt53ab_8rzMGTXVrvMb7CZJkxG0,778
|
| 327 |
+
pip/_vendor/cachecontrol/controller.py,sha256=9DSEiV58Gx7Ce69fLCrRcpN-_sHzXTY4ol9bEviatR0,15625
|
| 328 |
+
pip/_vendor/cachecontrol/filewrapper.py,sha256=X4BAQOO26GNOR7nH_fhTzAfeuct2rBQcx_15MyFBpcs,3946
|
| 329 |
+
pip/_vendor/cachecontrol/heuristics.py,sha256=8kAyuZLSCyEIgQr6vbUwfhpqg9ows4mM0IV6DWazevI,4154
|
| 330 |
+
pip/_vendor/cachecontrol/serialize.py,sha256=dlySaeA5U7Q5eHvjiObgo1M8j8_huVjfWjid7Aq-r8c,6783
|
| 331 |
+
pip/_vendor/cachecontrol/wrapper.py,sha256=X3-KMZ20Ho3VtqyVaXclpeQpFzokR5NE8tZSfvKVaB8,774
|
| 332 |
+
pip/_vendor/certifi/__init__.py,sha256=xWdRgntT3j1V95zkRipGOg_A1UfEju2FcpujhysZLRI,62
|
| 333 |
+
pip/_vendor/certifi/__main__.py,sha256=1k3Cr95vCxxGRGDljrW3wMdpZdL3Nhf0u1n-k2qdsCY,255
|
| 334 |
+
pip/_vendor/certifi/__pycache__/__init__.cpython-310.pyc,,
|
| 335 |
+
pip/_vendor/certifi/__pycache__/__main__.cpython-310.pyc,,
|
| 336 |
+
pip/_vendor/certifi/__pycache__/core.cpython-310.pyc,,
|
| 337 |
+
pip/_vendor/certifi/cacert.pem,sha256=-og4Keu4zSpgL5shwfhd4kz0eUnVILzrGCi0zRy2kGw,265969
|
| 338 |
+
pip/_vendor/certifi/core.py,sha256=CcwptmiI-3M50jIdO0HT6Fh6W_wqGsf8QcX9yfzvyuc,2791
|
| 339 |
+
pip/_vendor/chardet/__init__.py,sha256=mWZaWmvZkhwfBEAT9O1Y6nRTfKzhT7FHhQTTAujbqUA,3271
|
| 340 |
+
pip/_vendor/chardet/__pycache__/__init__.cpython-310.pyc,,
|
| 341 |
+
pip/_vendor/chardet/__pycache__/big5freq.cpython-310.pyc,,
|
| 342 |
+
pip/_vendor/chardet/__pycache__/big5prober.cpython-310.pyc,,
|
| 343 |
+
pip/_vendor/chardet/__pycache__/chardistribution.cpython-310.pyc,,
|
| 344 |
+
pip/_vendor/chardet/__pycache__/charsetgroupprober.cpython-310.pyc,,
|
| 345 |
+
pip/_vendor/chardet/__pycache__/charsetprober.cpython-310.pyc,,
|
| 346 |
+
pip/_vendor/chardet/__pycache__/codingstatemachine.cpython-310.pyc,,
|
| 347 |
+
pip/_vendor/chardet/__pycache__/compat.cpython-310.pyc,,
|
| 348 |
+
pip/_vendor/chardet/__pycache__/cp949prober.cpython-310.pyc,,
|
| 349 |
+
pip/_vendor/chardet/__pycache__/enums.cpython-310.pyc,,
|
| 350 |
+
pip/_vendor/chardet/__pycache__/escprober.cpython-310.pyc,,
|
| 351 |
+
pip/_vendor/chardet/__pycache__/escsm.cpython-310.pyc,,
|
| 352 |
+
pip/_vendor/chardet/__pycache__/eucjpprober.cpython-310.pyc,,
|
| 353 |
+
pip/_vendor/chardet/__pycache__/euckrfreq.cpython-310.pyc,,
|
| 354 |
+
pip/_vendor/chardet/__pycache__/euckrprober.cpython-310.pyc,,
|
| 355 |
+
pip/_vendor/chardet/__pycache__/euctwfreq.cpython-310.pyc,,
|
| 356 |
+
pip/_vendor/chardet/__pycache__/euctwprober.cpython-310.pyc,,
|
| 357 |
+
pip/_vendor/chardet/__pycache__/gb2312freq.cpython-310.pyc,,
|
| 358 |
+
pip/_vendor/chardet/__pycache__/gb2312prober.cpython-310.pyc,,
|
| 359 |
+
pip/_vendor/chardet/__pycache__/hebrewprober.cpython-310.pyc,,
|
| 360 |
+
pip/_vendor/chardet/__pycache__/jisfreq.cpython-310.pyc,,
|
| 361 |
+
pip/_vendor/chardet/__pycache__/jpcntx.cpython-310.pyc,,
|
| 362 |
+
pip/_vendor/chardet/__pycache__/langbulgarianmodel.cpython-310.pyc,,
|
| 363 |
+
pip/_vendor/chardet/__pycache__/langgreekmodel.cpython-310.pyc,,
|
| 364 |
+
pip/_vendor/chardet/__pycache__/langhebrewmodel.cpython-310.pyc,,
|
| 365 |
+
pip/_vendor/chardet/__pycache__/langhungarianmodel.cpython-310.pyc,,
|
| 366 |
+
pip/_vendor/chardet/__pycache__/langrussianmodel.cpython-310.pyc,,
|
| 367 |
+
pip/_vendor/chardet/__pycache__/langthaimodel.cpython-310.pyc,,
|
| 368 |
+
pip/_vendor/chardet/__pycache__/langturkishmodel.cpython-310.pyc,,
|
| 369 |
+
pip/_vendor/chardet/__pycache__/latin1prober.cpython-310.pyc,,
|
| 370 |
+
pip/_vendor/chardet/__pycache__/mbcharsetprober.cpython-310.pyc,,
|
| 371 |
+
pip/_vendor/chardet/__pycache__/mbcsgroupprober.cpython-310.pyc,,
|
| 372 |
+
pip/_vendor/chardet/__pycache__/mbcssm.cpython-310.pyc,,
|
| 373 |
+
pip/_vendor/chardet/__pycache__/sbcharsetprober.cpython-310.pyc,,
|
| 374 |
+
pip/_vendor/chardet/__pycache__/sbcsgroupprober.cpython-310.pyc,,
|
| 375 |
+
pip/_vendor/chardet/__pycache__/sjisprober.cpython-310.pyc,,
|
| 376 |
+
pip/_vendor/chardet/__pycache__/universaldetector.cpython-310.pyc,,
|
| 377 |
+
pip/_vendor/chardet/__pycache__/utf8prober.cpython-310.pyc,,
|
| 378 |
+
pip/_vendor/chardet/__pycache__/version.cpython-310.pyc,,
|
| 379 |
+
pip/_vendor/chardet/big5freq.py,sha256=D_zK5GyzoVsRes0HkLJziltFQX0bKCLOrFe9_xDvO_8,31254
|
| 380 |
+
pip/_vendor/chardet/big5prober.py,sha256=kBxHbdetBpPe7xrlb-e990iot64g_eGSLd32lB7_h3M,1757
|
| 381 |
+
pip/_vendor/chardet/chardistribution.py,sha256=3woWS62KrGooKyqz4zQSnjFbJpa6V7g02daAibTwcl8,9411
|
| 382 |
+
pip/_vendor/chardet/charsetgroupprober.py,sha256=GZLReHP6FRRn43hvSOoGCxYamErKzyp6RgOQxVeC3kg,3839
|
| 383 |
+
pip/_vendor/chardet/charsetprober.py,sha256=KSmwJErjypyj0bRZmC5F5eM7c8YQgLYIjZXintZNstg,5110
|
| 384 |
+
pip/_vendor/chardet/cli/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
| 385 |
+
pip/_vendor/chardet/cli/__pycache__/__init__.cpython-310.pyc,,
|
| 386 |
+
pip/_vendor/chardet/cli/__pycache__/chardetect.cpython-310.pyc,,
|
| 387 |
+
pip/_vendor/chardet/cli/chardetect.py,sha256=XK5zqjUG2a4-y6eLHZ8ThYcp6WWUrdlmELxNypcc2SE,2747
|
| 388 |
+
pip/_vendor/chardet/codingstatemachine.py,sha256=VYp_6cyyki5sHgXDSZnXW4q1oelHc3cu9AyQTX7uug8,3590
|
| 389 |
+
pip/_vendor/chardet/compat.py,sha256=40zr6wICZwknxyuLGGcIOPyve8DTebBCbbvttvnmp5Q,1200
|
| 390 |
+
pip/_vendor/chardet/cp949prober.py,sha256=TZ434QX8zzBsnUvL_8wm4AQVTZ2ZkqEEQL_lNw9f9ow,1855
|
| 391 |
+
pip/_vendor/chardet/enums.py,sha256=Aimwdb9as1dJKZaFNUH2OhWIVBVd6ZkJJ_WK5sNY8cU,1661
|
| 392 |
+
pip/_vendor/chardet/escprober.py,sha256=kkyqVg1Yw3DIOAMJ2bdlyQgUFQhuHAW8dUGskToNWSc,3950
|
| 393 |
+
pip/_vendor/chardet/escsm.py,sha256=RuXlgNvTIDarndvllNCk5WZBIpdCxQ0kcd9EAuxUh84,10510
|
| 394 |
+
pip/_vendor/chardet/eucjpprober.py,sha256=iD8Jdp0ISRjgjiVN7f0e8xGeQJ5GM2oeZ1dA8nbSeUw,3749
|
| 395 |
+
pip/_vendor/chardet/euckrfreq.py,sha256=-7GdmvgWez4-eO4SuXpa7tBiDi5vRXQ8WvdFAzVaSfo,13546
|
| 396 |
+
pip/_vendor/chardet/euckrprober.py,sha256=MqFMTQXxW4HbzIpZ9lKDHB3GN8SP4yiHenTmf8g_PxY,1748
|
| 397 |
+
pip/_vendor/chardet/euctwfreq.py,sha256=No1WyduFOgB5VITUA7PLyC5oJRNzRyMbBxaKI1l16MA,31621
|
| 398 |
+
pip/_vendor/chardet/euctwprober.py,sha256=13p6EP4yRaxqnP4iHtxHOJ6R2zxHq1_m8hTRjzVZ95c,1747
|
| 399 |
+
pip/_vendor/chardet/gb2312freq.py,sha256=JX8lsweKLmnCwmk8UHEQsLgkr_rP_kEbvivC4qPOrlc,20715
|
| 400 |
+
pip/_vendor/chardet/gb2312prober.py,sha256=gGvIWi9WhDjE-xQXHvNIyrnLvEbMAYgyUSZ65HUfylw,1754
|
| 401 |
+
pip/_vendor/chardet/hebrewprober.py,sha256=c3SZ-K7hvyzGY6JRAZxJgwJ_sUS9k0WYkvMY00YBYFo,13838
|
| 402 |
+
pip/_vendor/chardet/jisfreq.py,sha256=vpmJv2Bu0J8gnMVRPHMFefTRvo_ha1mryLig8CBwgOg,25777
|
| 403 |
+
pip/_vendor/chardet/jpcntx.py,sha256=PYlNqRUQT8LM3cT5FmHGP0iiscFlTWED92MALvBungo,19643
|
| 404 |
+
pip/_vendor/chardet/langbulgarianmodel.py,sha256=rk9CJpuxO0bObboJcv6gNgWuosYZmd8qEEds5y7DS_Y,105697
|
| 405 |
+
pip/_vendor/chardet/langgreekmodel.py,sha256=S-uNQ1ihC75yhBvSux24gLFZv3QyctMwC6OxLJdX-bw,99571
|
| 406 |
+
pip/_vendor/chardet/langhebrewmodel.py,sha256=DzPP6TPGG_-PV7tqspu_d8duueqm7uN-5eQ0aHUw1Gg,98776
|
| 407 |
+
pip/_vendor/chardet/langhungarianmodel.py,sha256=RtJH7DZdsmaHqyK46Kkmnk5wQHiJwJPPJSqqIlpeZRc,102498
|
| 408 |
+
pip/_vendor/chardet/langrussianmodel.py,sha256=THqJOhSxiTQcHboDNSc5yofc2koXXQFHFyjtyuntUfM,131180
|
| 409 |
+
pip/_vendor/chardet/langthaimodel.py,sha256=R1wXHnUMtejpw0JnH_JO8XdYasME6wjVqp1zP7TKLgg,103312
|
| 410 |
+
pip/_vendor/chardet/langturkishmodel.py,sha256=rfwanTptTwSycE4-P-QasPmzd-XVYgevytzjlEzBBu8,95946
|
| 411 |
+
pip/_vendor/chardet/latin1prober.py,sha256=S2IoORhFk39FEFOlSFWtgVybRiP6h7BlLldHVclNkU8,5370
|
| 412 |
+
pip/_vendor/chardet/mbcharsetprober.py,sha256=AR95eFH9vuqSfvLQZN-L5ijea25NOBCoXqw8s5O9xLQ,3413
|
| 413 |
+
pip/_vendor/chardet/mbcsgroupprober.py,sha256=h6TRnnYq2OxG1WdD5JOyxcdVpn7dG0q-vB8nWr5mbh4,2012
|
| 414 |
+
pip/_vendor/chardet/mbcssm.py,sha256=SY32wVIF3HzcjY3BaEspy9metbNSKxIIB0RKPn7tjpI,25481
|
| 415 |
+
pip/_vendor/chardet/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 416 |
+
pip/_vendor/chardet/metadata/__pycache__/__init__.cpython-310.pyc,,
|
| 417 |
+
pip/_vendor/chardet/metadata/__pycache__/languages.cpython-310.pyc,,
|
| 418 |
+
pip/_vendor/chardet/metadata/languages.py,sha256=41tLq3eLSrBEbEVVQpVGFq9K7o1ln9b1HpY1l0hCUQo,19474
|
| 419 |
+
pip/_vendor/chardet/sbcharsetprober.py,sha256=nmyMyuxzG87DN6K3Rk2MUzJLMLR69MrWpdnHzOwVUwQ,6136
|
| 420 |
+
pip/_vendor/chardet/sbcsgroupprober.py,sha256=hqefQuXmiFyDBArOjujH6hd6WFXlOD1kWCsxDhjx5Vc,4309
|
| 421 |
+
pip/_vendor/chardet/sjisprober.py,sha256=IIt-lZj0WJqK4rmUZzKZP4GJlE8KUEtFYVuY96ek5MQ,3774
|
| 422 |
+
pip/_vendor/chardet/universaldetector.py,sha256=DpZTXCX0nUHXxkQ9sr4GZxGB_hveZ6hWt3uM94cgWKs,12503
|
| 423 |
+
pip/_vendor/chardet/utf8prober.py,sha256=IdD8v3zWOsB8OLiyPi-y_fqwipRFxV9Nc1eKBLSuIEw,2766
|
| 424 |
+
pip/_vendor/chardet/version.py,sha256=A4CILFAd8MRVG1HoXPp45iK9RLlWyV73a1EtwE8Tvn8,242
|
| 425 |
+
pip/_vendor/colorama/__init__.py,sha256=pCdErryzLSzDW5P-rRPBlPLqbBtIRNJB6cMgoeJns5k,239
|
| 426 |
+
pip/_vendor/colorama/__pycache__/__init__.cpython-310.pyc,,
|
| 427 |
+
pip/_vendor/colorama/__pycache__/ansi.cpython-310.pyc,,
|
| 428 |
+
pip/_vendor/colorama/__pycache__/ansitowin32.cpython-310.pyc,,
|
| 429 |
+
pip/_vendor/colorama/__pycache__/initialise.cpython-310.pyc,,
|
| 430 |
+
pip/_vendor/colorama/__pycache__/win32.cpython-310.pyc,,
|
| 431 |
+
pip/_vendor/colorama/__pycache__/winterm.cpython-310.pyc,,
|
| 432 |
+
pip/_vendor/colorama/ansi.py,sha256=Top4EeEuaQdBWdteKMEcGOTeKeF19Q-Wo_6_Cj5kOzQ,2522
|
| 433 |
+
pip/_vendor/colorama/ansitowin32.py,sha256=yV7CEmCb19MjnJKODZEEvMH_fnbJhwnpzo4sxZuGXmA,10517
|
| 434 |
+
pip/_vendor/colorama/initialise.py,sha256=PprovDNxMTrvoNHFcL2NZjpH2XzDc8BLxLxiErfUl4k,1915
|
| 435 |
+
pip/_vendor/colorama/win32.py,sha256=bJ8Il9jwaBN5BJ8bmN6FoYZ1QYuMKv2j8fGrXh7TJjw,5404
|
| 436 |
+
pip/_vendor/colorama/winterm.py,sha256=2y_2b7Zsv34feAsP67mLOVc-Bgq51mdYGo571VprlrM,6438
|
| 437 |
+
pip/_vendor/distlib/__init__.py,sha256=y-rKDBB99QJ3N1PJGAXQo89ou615aAeBjV2brBxKgM8,581
|
| 438 |
+
pip/_vendor/distlib/__pycache__/__init__.cpython-310.pyc,,
|
| 439 |
+
pip/_vendor/distlib/__pycache__/compat.cpython-310.pyc,,
|
| 440 |
+
pip/_vendor/distlib/__pycache__/database.cpython-310.pyc,,
|
| 441 |
+
pip/_vendor/distlib/__pycache__/index.cpython-310.pyc,,
|
| 442 |
+
pip/_vendor/distlib/__pycache__/locators.cpython-310.pyc,,
|
| 443 |
+
pip/_vendor/distlib/__pycache__/manifest.cpython-310.pyc,,
|
| 444 |
+
pip/_vendor/distlib/__pycache__/markers.cpython-310.pyc,,
|
| 445 |
+
pip/_vendor/distlib/__pycache__/metadata.cpython-310.pyc,,
|
| 446 |
+
pip/_vendor/distlib/__pycache__/resources.cpython-310.pyc,,
|
| 447 |
+
pip/_vendor/distlib/__pycache__/scripts.cpython-310.pyc,,
|
| 448 |
+
pip/_vendor/distlib/__pycache__/util.cpython-310.pyc,,
|
| 449 |
+
pip/_vendor/distlib/__pycache__/version.cpython-310.pyc,,
|
| 450 |
+
pip/_vendor/distlib/__pycache__/wheel.cpython-310.pyc,,
|
| 451 |
+
pip/_vendor/distlib/compat.py,sha256=tfoMrj6tujk7G4UC2owL6ArgDuCKabgBxuJRGZSmpko,41259
|
| 452 |
+
pip/_vendor/distlib/database.py,sha256=hBO2dgvDF7W3BqX8Ecns6p_RPerCaIbNKbdUOuJ1a14,51456
|
| 453 |
+
pip/_vendor/distlib/index.py,sha256=UfcimNW19AB7IKWam4VaJbXuCBvArKfSxhV16EwavzE,20739
|
| 454 |
+
pip/_vendor/distlib/locators.py,sha256=4D2hEcHePNuW4mXEZ3Cuw12eW-vbO-4WuAlbf4h5K7w,51963
|
| 455 |
+
pip/_vendor/distlib/manifest.py,sha256=nQEhYmgoreaBZzyFzwYsXxJARu3fo4EkunU163U16iE,14811
|
| 456 |
+
pip/_vendor/distlib/markers.py,sha256=TpHHHLgkzyT7YHbwj-2i6weRaq-Ivy2-MUnrDkjau-U,5058
|
| 457 |
+
pip/_vendor/distlib/metadata.py,sha256=vatoxFdmBr6ie-sTVXVNPOPG3uwMDWJTnEECnm7xDCw,39109
|
| 458 |
+
pip/_vendor/distlib/resources.py,sha256=LwbPksc0A1JMbi6XnuPdMBUn83X7BPuFNWqPGEKI698,10820
|
| 459 |
+
pip/_vendor/distlib/scripts.py,sha256=tjSwENINeV91ROZxec5zTSMRg2jEeKc4enyCHDzNvEE,17720
|
| 460 |
+
pip/_vendor/distlib/util.py,sha256=31dPXn3Rfat0xZLeVoFpuniyhe6vsbl9_QN-qd9Lhlk,66262
|
| 461 |
+
pip/_vendor/distlib/version.py,sha256=WG__LyAa2GwmA6qSoEJtvJE8REA1LZpbSizy8WvhJLk,23513
|
| 462 |
+
pip/_vendor/distlib/wheel.py,sha256=pj5VVCjqZMcHvgizORWwAFPS7hOk61CZ59dxP8laQ4E,42943
|
| 463 |
+
pip/_vendor/distro.py,sha256=O1EeHMq1-xAO373JI2_6pYEtd09yEkxtmrYkdY-9S-w,48414
|
| 464 |
+
pip/_vendor/html5lib/__init__.py,sha256=BYzcKCqeEii52xDrqBFruhnmtmkiuHXFyFh-cglQ8mk,1160
|
| 465 |
+
pip/_vendor/html5lib/__pycache__/__init__.cpython-310.pyc,,
|
| 466 |
+
pip/_vendor/html5lib/__pycache__/_ihatexml.cpython-310.pyc,,
|
| 467 |
+
pip/_vendor/html5lib/__pycache__/_inputstream.cpython-310.pyc,,
|
| 468 |
+
pip/_vendor/html5lib/__pycache__/_tokenizer.cpython-310.pyc,,
|
| 469 |
+
pip/_vendor/html5lib/__pycache__/_utils.cpython-310.pyc,,
|
| 470 |
+
pip/_vendor/html5lib/__pycache__/constants.cpython-310.pyc,,
|
| 471 |
+
pip/_vendor/html5lib/__pycache__/html5parser.cpython-310.pyc,,
|
| 472 |
+
pip/_vendor/html5lib/__pycache__/serializer.cpython-310.pyc,,
|
| 473 |
+
pip/_vendor/html5lib/_ihatexml.py,sha256=ifOwF7pXqmyThIXc3boWc96s4MDezqRrRVp7FwDYUFs,16728
|
| 474 |
+
pip/_vendor/html5lib/_inputstream.py,sha256=jErNASMlkgs7MpOM9Ve_VdLDJyFFweAjLuhVutZz33U,32353
|
| 475 |
+
pip/_vendor/html5lib/_tokenizer.py,sha256=04mgA2sNTniutl2fxFv-ei5bns4iRaPxVXXHh_HrV_4,77040
|
| 476 |
+
pip/_vendor/html5lib/_trie/__init__.py,sha256=nqfgO910329BEVJ5T4psVwQtjd2iJyEXQ2-X8c1YxwU,109
|
| 477 |
+
pip/_vendor/html5lib/_trie/__pycache__/__init__.cpython-310.pyc,,
|
| 478 |
+
pip/_vendor/html5lib/_trie/__pycache__/_base.cpython-310.pyc,,
|
| 479 |
+
pip/_vendor/html5lib/_trie/__pycache__/py.cpython-310.pyc,,
|
| 480 |
+
pip/_vendor/html5lib/_trie/_base.py,sha256=CaybYyMro8uERQYjby2tTeSUatnWDfWroUN9N7ety5w,1013
|
| 481 |
+
pip/_vendor/html5lib/_trie/py.py,sha256=wXmQLrZRf4MyWNyg0m3h81m9InhLR7GJ002mIIZh-8o,1775
|
| 482 |
+
pip/_vendor/html5lib/_utils.py,sha256=Dx9AKntksRjFT1veBj7I362pf5OgIaT0zglwq43RnfU,4931
|
| 483 |
+
pip/_vendor/html5lib/constants.py,sha256=Ll-yzLU_jcjyAI_h57zkqZ7aQWE5t5xA4y_jQgoUUhw,83464
|
| 484 |
+
pip/_vendor/html5lib/filters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 485 |
+
pip/_vendor/html5lib/filters/__pycache__/__init__.cpython-310.pyc,,
|
| 486 |
+
pip/_vendor/html5lib/filters/__pycache__/alphabeticalattributes.cpython-310.pyc,,
|
| 487 |
+
pip/_vendor/html5lib/filters/__pycache__/base.cpython-310.pyc,,
|
| 488 |
+
pip/_vendor/html5lib/filters/__pycache__/inject_meta_charset.cpython-310.pyc,,
|
| 489 |
+
pip/_vendor/html5lib/filters/__pycache__/lint.cpython-310.pyc,,
|
| 490 |
+
pip/_vendor/html5lib/filters/__pycache__/optionaltags.cpython-310.pyc,,
|
| 491 |
+
pip/_vendor/html5lib/filters/__pycache__/sanitizer.cpython-310.pyc,,
|
| 492 |
+
pip/_vendor/html5lib/filters/__pycache__/whitespace.cpython-310.pyc,,
|
| 493 |
+
pip/_vendor/html5lib/filters/alphabeticalattributes.py,sha256=lViZc2JMCclXi_5gduvmdzrRxtO5Xo9ONnbHBVCsykU,919
|
| 494 |
+
pip/_vendor/html5lib/filters/base.py,sha256=z-IU9ZAYjpsVsqmVt7kuWC63jR11hDMr6CVrvuao8W0,286
|
| 495 |
+
pip/_vendor/html5lib/filters/inject_meta_charset.py,sha256=egDXUEHXmAG9504xz0K6ALDgYkvUrC2q15YUVeNlVQg,2945
|
| 496 |
+
pip/_vendor/html5lib/filters/lint.py,sha256=jk6q56xY0ojiYfvpdP-OZSm9eTqcAdRqhCoPItemPYA,3643
|
| 497 |
+
pip/_vendor/html5lib/filters/optionaltags.py,sha256=8lWT75J0aBOHmPgfmqTHSfPpPMp01T84NKu0CRedxcE,10588
|
| 498 |
+
pip/_vendor/html5lib/filters/sanitizer.py,sha256=m6oGmkBhkGAnn2nV6D4hE78SCZ6WEnK9rKdZB3uXBIc,26897
|
| 499 |
+
pip/_vendor/html5lib/filters/whitespace.py,sha256=8eWqZxd4UC4zlFGW6iyY6f-2uuT8pOCSALc3IZt7_t4,1214
|
| 500 |
+
pip/_vendor/html5lib/html5parser.py,sha256=anr-aXre_ImfrkQ35c_rftKXxC80vJCREKe06Tq15HA,117186
|
| 501 |
+
pip/_vendor/html5lib/serializer.py,sha256=_PpvcZF07cwE7xr9uKkZqh5f4UEaI8ltCU2xPJzaTpk,15759
|
| 502 |
+
pip/_vendor/html5lib/treeadapters/__init__.py,sha256=A0rY5gXIe4bJOiSGRO_j_tFhngRBO8QZPzPtPw5dFzo,679
|
| 503 |
+
pip/_vendor/html5lib/treeadapters/__pycache__/__init__.cpython-310.pyc,,
|
| 504 |
+
pip/_vendor/html5lib/treeadapters/__pycache__/genshi.cpython-310.pyc,,
|
| 505 |
+
pip/_vendor/html5lib/treeadapters/__pycache__/sax.cpython-310.pyc,,
|
| 506 |
+
pip/_vendor/html5lib/treeadapters/genshi.py,sha256=CH27pAsDKmu4ZGkAUrwty7u0KauGLCZRLPMzaO3M5vo,1715
|
| 507 |
+
pip/_vendor/html5lib/treeadapters/sax.py,sha256=BKS8woQTnKiqeffHsxChUqL4q2ZR_wb5fc9MJ3zQC8s,1776
|
| 508 |
+
pip/_vendor/html5lib/treebuilders/__init__.py,sha256=AysSJyvPfikCMMsTVvaxwkgDieELD5dfR8FJIAuq7hY,3592
|
| 509 |
+
pip/_vendor/html5lib/treebuilders/__pycache__/__init__.cpython-310.pyc,,
|
| 510 |
+
pip/_vendor/html5lib/treebuilders/__pycache__/base.cpython-310.pyc,,
|
| 511 |
+
pip/_vendor/html5lib/treebuilders/__pycache__/dom.cpython-310.pyc,,
|
| 512 |
+
pip/_vendor/html5lib/treebuilders/__pycache__/etree.cpython-310.pyc,,
|
| 513 |
+
pip/_vendor/html5lib/treebuilders/__pycache__/etree_lxml.cpython-310.pyc,,
|
| 514 |
+
pip/_vendor/html5lib/treebuilders/base.py,sha256=z-o51vt9r_l2IDG5IioTOKGzZne4Fy3_Fc-7ztrOh4I,14565
|
| 515 |
+
pip/_vendor/html5lib/treebuilders/dom.py,sha256=22whb0C71zXIsai5mamg6qzBEiigcBIvaDy4Asw3at0,8925
|
| 516 |
+
pip/_vendor/html5lib/treebuilders/etree.py,sha256=w5ZFpKk6bAxnrwD2_BrF5EVC7vzz0L3LMi9Sxrbc_8w,12836
|
| 517 |
+
pip/_vendor/html5lib/treebuilders/etree_lxml.py,sha256=9gqDjs-IxsPhBYa5cpvv2FZ1KZlG83Giusy2lFmvIkE,14766
|
| 518 |
+
pip/_vendor/html5lib/treewalkers/__init__.py,sha256=OBPtc1TU5mGyy18QDMxKEyYEz0wxFUUNj5v0-XgmYhY,5719
|
| 519 |
+
pip/_vendor/html5lib/treewalkers/__pycache__/__init__.cpython-310.pyc,,
|
| 520 |
+
pip/_vendor/html5lib/treewalkers/__pycache__/base.cpython-310.pyc,,
|
| 521 |
+
pip/_vendor/html5lib/treewalkers/__pycache__/dom.cpython-310.pyc,,
|
| 522 |
+
pip/_vendor/html5lib/treewalkers/__pycache__/etree.cpython-310.pyc,,
|
| 523 |
+
pip/_vendor/html5lib/treewalkers/__pycache__/etree_lxml.cpython-310.pyc,,
|
| 524 |
+
pip/_vendor/html5lib/treewalkers/__pycache__/genshi.cpython-310.pyc,,
|
| 525 |
+
pip/_vendor/html5lib/treewalkers/base.py,sha256=ouiOsuSzvI0KgzdWP8PlxIaSNs9falhbiinAEc_UIJY,7476
|
| 526 |
+
pip/_vendor/html5lib/treewalkers/dom.py,sha256=EHyFR8D8lYNnyDU9lx_IKigVJRyecUGua0mOi7HBukc,1413
|
| 527 |
+
pip/_vendor/html5lib/treewalkers/etree.py,sha256=xo1L5m9VtkfpFJK0pFmkLVajhqYYVisVZn3k9kYpPkI,4551
|
| 528 |
+
pip/_vendor/html5lib/treewalkers/etree_lxml.py,sha256=_b0LAVWLcVu9WaU_-w3D8f0IRSpCbjf667V-3NRdhTw,6357
|
| 529 |
+
pip/_vendor/html5lib/treewalkers/genshi.py,sha256=4D2PECZ5n3ZN3qu3jMl9yY7B81jnQApBQSVlfaIuYbA,2309
|
| 530 |
+
pip/_vendor/idna/__init__.py,sha256=KJQN1eQBr8iIK5SKrJ47lXvxG0BJ7Lm38W4zT0v_8lk,849
|
| 531 |
+
pip/_vendor/idna/__pycache__/__init__.cpython-310.pyc,,
|
| 532 |
+
pip/_vendor/idna/__pycache__/codec.cpython-310.pyc,,
|
| 533 |
+
pip/_vendor/idna/__pycache__/compat.cpython-310.pyc,,
|
| 534 |
+
pip/_vendor/idna/__pycache__/core.cpython-310.pyc,,
|
| 535 |
+
pip/_vendor/idna/__pycache__/idnadata.cpython-310.pyc,,
|
| 536 |
+
pip/_vendor/idna/__pycache__/intranges.cpython-310.pyc,,
|
| 537 |
+
pip/_vendor/idna/__pycache__/package_data.cpython-310.pyc,,
|
| 538 |
+
pip/_vendor/idna/__pycache__/uts46data.cpython-310.pyc,,
|
| 539 |
+
pip/_vendor/idna/codec.py,sha256=6ly5odKfqrytKT9_7UrlGklHnf1DSK2r9C6cSM4sa28,3374
|
| 540 |
+
pip/_vendor/idna/compat.py,sha256=0_sOEUMT4CVw9doD3vyRhX80X19PwqFoUBs7gWsFME4,321
|
| 541 |
+
pip/_vendor/idna/core.py,sha256=RFIkY-HhFZaDoBEFjGwyGd_vWI04uOAQjnzueMWqwOU,12795
|
| 542 |
+
pip/_vendor/idna/idnadata.py,sha256=fzMzkCea2xieVxcrjngJ-2pLsKQNejPCZFlBajIuQdw,44025
|
| 543 |
+
pip/_vendor/idna/intranges.py,sha256=YBr4fRYuWH7kTKS2tXlFjM24ZF1Pdvcir-aywniInqg,1881
|
| 544 |
+
pip/_vendor/idna/package_data.py,sha256=szxQhV0ZD0nKJ84Kuobw3l8q4_KeCyXjFRdpwIpKZmw,21
|
| 545 |
+
pip/_vendor/idna/uts46data.py,sha256=o-D7V-a0fOLZNd7tvxof6MYfUd0TBZzE2bLR5XO67xU,204400
|
| 546 |
+
pip/_vendor/msgpack/__init__.py,sha256=2gJwcsTIaAtCM0GMi2rU-_Y6kILeeQuqRkrQ22jSANc,1118
|
| 547 |
+
pip/_vendor/msgpack/__pycache__/__init__.cpython-310.pyc,,
|
| 548 |
+
pip/_vendor/msgpack/__pycache__/_version.cpython-310.pyc,,
|
| 549 |
+
pip/_vendor/msgpack/__pycache__/exceptions.cpython-310.pyc,,
|
| 550 |
+
pip/_vendor/msgpack/__pycache__/ext.cpython-310.pyc,,
|
| 551 |
+
pip/_vendor/msgpack/__pycache__/fallback.cpython-310.pyc,,
|
| 552 |
+
pip/_vendor/msgpack/_version.py,sha256=JpTcnRd3YUioA24NDtDZbLW0Nhl2yA-N1Rq2lLDBB-g,20
|
| 553 |
+
pip/_vendor/msgpack/exceptions.py,sha256=dCTWei8dpkrMsQDcjQk74ATl9HsIBH0ybt8zOPNqMYc,1081
|
| 554 |
+
pip/_vendor/msgpack/ext.py,sha256=4l356Y4sVEcvCla2dh_cL57vh4GMhZfa3kuWHFHYz6A,6088
|
| 555 |
+
pip/_vendor/msgpack/fallback.py,sha256=L5jriXysURbf6rPbbHbvXgvoFrKZiryIBmujMTcrf3A,34475
|
| 556 |
+
pip/_vendor/packaging/__about__.py,sha256=ugASIO2w1oUyH8_COqQ2X_s0rDhjbhQC3yJocD03h2c,661
|
| 557 |
+
pip/_vendor/packaging/__init__.py,sha256=b9Kk5MF7KxhhLgcDmiUWukN-LatWFxPdNug0joPhHSk,497
|
| 558 |
+
pip/_vendor/packaging/__pycache__/__about__.cpython-310.pyc,,
|
| 559 |
+
pip/_vendor/packaging/__pycache__/__init__.cpython-310.pyc,,
|
| 560 |
+
pip/_vendor/packaging/__pycache__/_manylinux.cpython-310.pyc,,
|
| 561 |
+
pip/_vendor/packaging/__pycache__/_musllinux.cpython-310.pyc,,
|
| 562 |
+
pip/_vendor/packaging/__pycache__/_structures.cpython-310.pyc,,
|
| 563 |
+
pip/_vendor/packaging/__pycache__/markers.cpython-310.pyc,,
|
| 564 |
+
pip/_vendor/packaging/__pycache__/requirements.cpython-310.pyc,,
|
| 565 |
+
pip/_vendor/packaging/__pycache__/specifiers.cpython-310.pyc,,
|
| 566 |
+
pip/_vendor/packaging/__pycache__/tags.cpython-310.pyc,,
|
| 567 |
+
pip/_vendor/packaging/__pycache__/utils.cpython-310.pyc,,
|
| 568 |
+
pip/_vendor/packaging/__pycache__/version.cpython-310.pyc,,
|
| 569 |
+
pip/_vendor/packaging/_manylinux.py,sha256=XcbiXB-qcjv3bcohp6N98TMpOP4_j3m-iOA8ptK2GWY,11488
|
| 570 |
+
pip/_vendor/packaging/_musllinux.py,sha256=_KGgY_qc7vhMGpoqss25n2hiLCNKRtvz9mCrS7gkqyc,4378
|
| 571 |
+
pip/_vendor/packaging/_structures.py,sha256=q3eVNmbWJGG_S0Dit_S3Ao8qQqz_5PYTXFAKBZe5yr4,1431
|
| 572 |
+
pip/_vendor/packaging/markers.py,sha256=AJBOcY8Oq0kYc570KuuPTkvuqjAlhufaE2c9sCUbm64,8487
|
| 573 |
+
pip/_vendor/packaging/requirements.py,sha256=NtDlPBtojpn1IUC85iMjPNsUmufjpSlwnNA-Xb4m5NA,4676
|
| 574 |
+
pip/_vendor/packaging/specifiers.py,sha256=LRQ0kFsHrl5qfcFNEEJrIFYsnIHQUJXY9fIsakTrrqE,30110
|
| 575 |
+
pip/_vendor/packaging/tags.py,sha256=lmsnGNiJ8C4D_Pf9PbM0qgbZvD9kmB9lpZBQUZa3R_Y,15699
|
| 576 |
+
pip/_vendor/packaging/utils.py,sha256=dJjeat3BS-TYn1RrUFVwufUMasbtzLfYRoy_HXENeFQ,4200
|
| 577 |
+
pip/_vendor/packaging/version.py,sha256=_fLRNrFrxYcHVfyo8vk9j8s6JM8N_xsSxVFr6RJyco8,14665
|
| 578 |
+
pip/_vendor/pep517/__init__.py,sha256=Y1bATL2qbFNN6M_DQa4yyrwqjpIiL-j9T6kBmR0DS14,130
|
| 579 |
+
pip/_vendor/pep517/__pycache__/__init__.cpython-310.pyc,,
|
| 580 |
+
pip/_vendor/pep517/__pycache__/build.cpython-310.pyc,,
|
| 581 |
+
pip/_vendor/pep517/__pycache__/check.cpython-310.pyc,,
|
| 582 |
+
pip/_vendor/pep517/__pycache__/colorlog.cpython-310.pyc,,
|
| 583 |
+
pip/_vendor/pep517/__pycache__/compat.cpython-310.pyc,,
|
| 584 |
+
pip/_vendor/pep517/__pycache__/dirtools.cpython-310.pyc,,
|
| 585 |
+
pip/_vendor/pep517/__pycache__/envbuild.cpython-310.pyc,,
|
| 586 |
+
pip/_vendor/pep517/__pycache__/meta.cpython-310.pyc,,
|
| 587 |
+
pip/_vendor/pep517/__pycache__/wrappers.cpython-310.pyc,,
|
| 588 |
+
pip/_vendor/pep517/build.py,sha256=2bar6EdjwIz2Dlfy94qdxn3oA9mVnnny40mfoT5f-qI,3457
|
| 589 |
+
pip/_vendor/pep517/check.py,sha256=bCORq1WrHjhpTONa-zpAqG0EB9rHNuhO1ORu6DsDuL8,6084
|
| 590 |
+
pip/_vendor/pep517/colorlog.py,sha256=Tk9AuYm_cLF3BKTBoSTJt9bRryn0aFojIQOwbfVUTxQ,4098
|
| 591 |
+
pip/_vendor/pep517/compat.py,sha256=NmLImE5oiDT3gbEhJ4w7xeoMFcpAPrGu_NltBytSJUY,1253
|
| 592 |
+
pip/_vendor/pep517/dirtools.py,sha256=2mkAkAL0mRz_elYFjRKuekTJVipH1zTn4tbf1EDev84,1129
|
| 593 |
+
pip/_vendor/pep517/envbuild.py,sha256=zFde--rmzjXMLXcm7SA_3hDtgk5VCTA8hjpk88RbF6E,6100
|
| 594 |
+
pip/_vendor/pep517/in_process/__init__.py,sha256=MyWoAi8JHdcBv7yXuWpUSVADbx6LSB9rZh7kTIgdA8Y,563
|
| 595 |
+
pip/_vendor/pep517/in_process/__pycache__/__init__.cpython-310.pyc,,
|
| 596 |
+
pip/_vendor/pep517/in_process/__pycache__/_in_process.cpython-310.pyc,,
|
| 597 |
+
pip/_vendor/pep517/in_process/_in_process.py,sha256=D3waguyNSGcwosociD5USfcycYr2RCzCjYtxX5UHQmQ,11201
|
| 598 |
+
pip/_vendor/pep517/meta.py,sha256=8mnM5lDnT4zXQpBTliJbRGfesH7iioHwozbDxALPS9Y,2463
|
| 599 |
+
pip/_vendor/pep517/wrappers.py,sha256=impq7Cz_LL1iDF1iiOzYWB4MaEu6O6Gps7TJ5qsJz1Q,13429
|
| 600 |
+
pip/_vendor/pkg_resources/__init__.py,sha256=NnpQ3g6BCHzpMgOR_OLBmYtniY4oOzdKpwqghfq_6ug,108287
|
| 601 |
+
pip/_vendor/pkg_resources/__pycache__/__init__.cpython-310.pyc,,
|
| 602 |
+
pip/_vendor/pkg_resources/__pycache__/py31compat.cpython-310.pyc,,
|
| 603 |
+
pip/_vendor/pkg_resources/py31compat.py,sha256=CRk8fkiPRDLsbi5pZcKsHI__Pbmh_94L8mr9Qy9Ab2U,562
|
| 604 |
+
pip/_vendor/platformdirs/__init__.py,sha256=Aizpxewwd4nY63Gqw-Od1Rso9Ah4bSoc6rkx-GBRu2Y,12676
|
| 605 |
+
pip/_vendor/platformdirs/__main__.py,sha256=ZmsnTxEOxtTvwa-Y_Vfab_JN3X4XCVeN8X0yyy9-qnc,1176
|
| 606 |
+
pip/_vendor/platformdirs/__pycache__/__init__.cpython-310.pyc,,
|
| 607 |
+
pip/_vendor/platformdirs/__pycache__/__main__.cpython-310.pyc,,
|
| 608 |
+
pip/_vendor/platformdirs/__pycache__/android.cpython-310.pyc,,
|
| 609 |
+
pip/_vendor/platformdirs/__pycache__/api.cpython-310.pyc,,
|
| 610 |
+
pip/_vendor/platformdirs/__pycache__/macos.cpython-310.pyc,,
|
| 611 |
+
pip/_vendor/platformdirs/__pycache__/unix.cpython-310.pyc,,
|
| 612 |
+
pip/_vendor/platformdirs/__pycache__/version.cpython-310.pyc,,
|
| 613 |
+
pip/_vendor/platformdirs/__pycache__/windows.cpython-310.pyc,,
|
| 614 |
+
pip/_vendor/platformdirs/android.py,sha256=xhlD4NmrKCARe5lgnpBGYo4lOYxEOBOByNDNYy91gEE,4012
|
| 615 |
+
pip/_vendor/platformdirs/api.py,sha256=MXKHXOL3eh_-trSok-JUTjAR_zjmmKF3rjREVABjP8s,4910
|
| 616 |
+
pip/_vendor/platformdirs/macos.py,sha256=-3UXQewbT0yMhMdkzRXfXGAntmLIH7Qt4a9Hlf8I5_Y,2655
|
| 617 |
+
pip/_vendor/platformdirs/unix.py,sha256=b4aVYTz0qZ50HntwOXo8r6tp82jAa3qTjxw-WlnC2yc,6910
|
| 618 |
+
pip/_vendor/platformdirs/version.py,sha256=bXzLJCe23FNQRQrf7ZRWKejxWnct_wft7dxdkMGT33E,80
|
| 619 |
+
pip/_vendor/platformdirs/windows.py,sha256=ISruopR5UGBePC0BxCxXevkZYfjJsIZc49YWU5iYfQ4,6439
|
| 620 |
+
pip/_vendor/progress/__init__.py,sha256=1HejNZtv2ouUNQeStUDAtZrtwkz_3FmYKQ476hJ7zOs,5294
|
| 621 |
+
pip/_vendor/progress/__pycache__/__init__.cpython-310.pyc,,
|
| 622 |
+
pip/_vendor/progress/__pycache__/bar.cpython-310.pyc,,
|
| 623 |
+
pip/_vendor/progress/__pycache__/colors.cpython-310.pyc,,
|
| 624 |
+
pip/_vendor/progress/__pycache__/counter.cpython-310.pyc,,
|
| 625 |
+
pip/_vendor/progress/__pycache__/spinner.cpython-310.pyc,,
|
| 626 |
+
pip/_vendor/progress/bar.py,sha256=GbedY0oZ-Q1duXjmvVLO0tSf-uTSH7hJ3zzyI91Esws,2942
|
| 627 |
+
pip/_vendor/progress/colors.py,sha256=cCYXQnYFYVmQKKmYEbQ_lj6SPSFzdw4FN98F2x2kR-U,2655
|
| 628 |
+
pip/_vendor/progress/counter.py,sha256=zYt9DWH0_05s8Q9TrJwHVud-WwsyyaR3PwYtk5hxwwQ,1613
|
| 629 |
+
pip/_vendor/progress/spinner.py,sha256=u5ElzW94XEiLGH-aAlr54VJtKfeK745xr6UfGvvflzU,1461
|
| 630 |
+
pip/_vendor/pygments/__init__.py,sha256=CAmA9UthykwxvtutUcH0IxqtiyQcSg6CmYdM-jKlcRY,3002
|
| 631 |
+
pip/_vendor/pygments/__main__.py,sha256=X7rGLMUC54EXgO14FZ9goKXZDmhPzKXTsUglmb_McIU,353
|
| 632 |
+
pip/_vendor/pygments/__pycache__/__init__.cpython-310.pyc,,
|
| 633 |
+
pip/_vendor/pygments/__pycache__/__main__.cpython-310.pyc,,
|
| 634 |
+
pip/_vendor/pygments/__pycache__/cmdline.cpython-310.pyc,,
|
| 635 |
+
pip/_vendor/pygments/__pycache__/console.cpython-310.pyc,,
|
| 636 |
+
pip/_vendor/pygments/__pycache__/filter.cpython-310.pyc,,
|
| 637 |
+
pip/_vendor/pygments/__pycache__/formatter.cpython-310.pyc,,
|
| 638 |
+
pip/_vendor/pygments/__pycache__/lexer.cpython-310.pyc,,
|
| 639 |
+
pip/_vendor/pygments/__pycache__/modeline.cpython-310.pyc,,
|
| 640 |
+
pip/_vendor/pygments/__pycache__/plugin.cpython-310.pyc,,
|
| 641 |
+
pip/_vendor/pygments/__pycache__/regexopt.cpython-310.pyc,,
|
| 642 |
+
pip/_vendor/pygments/__pycache__/scanner.cpython-310.pyc,,
|
| 643 |
+
pip/_vendor/pygments/__pycache__/sphinxext.cpython-310.pyc,,
|
| 644 |
+
pip/_vendor/pygments/__pycache__/style.cpython-310.pyc,,
|
| 645 |
+
pip/_vendor/pygments/__pycache__/token.cpython-310.pyc,,
|
| 646 |
+
pip/_vendor/pygments/__pycache__/unistring.cpython-310.pyc,,
|
| 647 |
+
pip/_vendor/pygments/__pycache__/util.cpython-310.pyc,,
|
| 648 |
+
pip/_vendor/pygments/cmdline.py,sha256=XpsyWgErcSqHC7rXiYKLF3Y61Uy8SR2DNQDDhZGuezg,23408
|
| 649 |
+
pip/_vendor/pygments/console.py,sha256=QZXBUAkyl4dPLQ1e6XHjQu3mmXBWvuGQwsQT2q1mtCY,1697
|
| 650 |
+
pip/_vendor/pygments/filter.py,sha256=35iMZiB1rcuogxokm92kViB2DPXPp_wWoxWuMmwvvzY,1938
|
| 651 |
+
pip/_vendor/pygments/filters/__init__.py,sha256=-veOimzCyYGEARru2Dfo6ofSYcZ8tGsIVuMprtaZQ24,40292
|
| 652 |
+
pip/_vendor/pygments/filters/__pycache__/__init__.cpython-310.pyc,,
|
| 653 |
+
pip/_vendor/pygments/formatter.py,sha256=zSBbX2U_OOriy7SJvSTK6OAxjuXtROWxQlNpJEJZjBA,2917
|
| 654 |
+
pip/_vendor/pygments/formatters/__init__.py,sha256=fjkYDy5-F998XczKi0ymHFayr5ObIRLHF8cgp9k8kpA,5119
|
| 655 |
+
pip/_vendor/pygments/formatters/__pycache__/__init__.cpython-310.pyc,,
|
| 656 |
+
pip/_vendor/pygments/formatters/__pycache__/_mapping.cpython-310.pyc,,
|
| 657 |
+
pip/_vendor/pygments/formatters/__pycache__/bbcode.cpython-310.pyc,,
|
| 658 |
+
pip/_vendor/pygments/formatters/__pycache__/groff.cpython-310.pyc,,
|
| 659 |
+
pip/_vendor/pygments/formatters/__pycache__/html.cpython-310.pyc,,
|
| 660 |
+
pip/_vendor/pygments/formatters/__pycache__/img.cpython-310.pyc,,
|
| 661 |
+
pip/_vendor/pygments/formatters/__pycache__/irc.cpython-310.pyc,,
|
| 662 |
+
pip/_vendor/pygments/formatters/__pycache__/latex.cpython-310.pyc,,
|
| 663 |
+
pip/_vendor/pygments/formatters/__pycache__/other.cpython-310.pyc,,
|
| 664 |
+
pip/_vendor/pygments/formatters/__pycache__/pangomarkup.cpython-310.pyc,,
|
| 665 |
+
pip/_vendor/pygments/formatters/__pycache__/rtf.cpython-310.pyc,,
|
| 666 |
+
pip/_vendor/pygments/formatters/__pycache__/svg.cpython-310.pyc,,
|
| 667 |
+
pip/_vendor/pygments/formatters/__pycache__/terminal.cpython-310.pyc,,
|
| 668 |
+
pip/_vendor/pygments/formatters/__pycache__/terminal256.cpython-310.pyc,,
|
| 669 |
+
pip/_vendor/pygments/formatters/_mapping.py,sha256=3A1rYSjYN9MLduCFWy2_mYhllPVpwlw55anRYnPXX8w,6516
|
| 670 |
+
pip/_vendor/pygments/formatters/bbcode.py,sha256=cSKMOioUnE4TzvCCsK4IbJ6G78W07ZwHtkz4V1Wte0U,3314
|
| 671 |
+
pip/_vendor/pygments/formatters/groff.py,sha256=ULgMKvGeLswX0KZn3IBp0p0U3rruiSHBtpl6O5qbqLs,5005
|
| 672 |
+
pip/_vendor/pygments/formatters/html.py,sha256=0jM7Jc4xA4tsjmPq35uklm_En_OVdcNb0__SEXp2pDQ,35330
|
| 673 |
+
pip/_vendor/pygments/formatters/img.py,sha256=r4iag_jCfyv_LhIt-1fRDeVEEoAfVJzkD9nZChIwiS8,21819
|
| 674 |
+
pip/_vendor/pygments/formatters/irc.py,sha256=gi_IeIZeNaTfTMtvseLigZdS6lNicN7r7O7rnI6myo0,5871
|
| 675 |
+
pip/_vendor/pygments/formatters/latex.py,sha256=qZUerrHt2Nn2aB4gJcdqj99qBkIxl_1v1ukYsf230Gk,18930
|
| 676 |
+
pip/_vendor/pygments/formatters/other.py,sha256=Q01LtkqPZ8m_EYdgMVzXPUGjHoL00lXI3By97wzytYU,5073
|
| 677 |
+
pip/_vendor/pygments/formatters/pangomarkup.py,sha256=ZpjALTSuGFwviJd5kOYwr-1NgqxCX3XRJrjXC7x1UbQ,2212
|
| 678 |
+
pip/_vendor/pygments/formatters/rtf.py,sha256=qh7-z_wbUsTY6z7fZUGrYECYBlWB0wEdBwIZVEVybL0,5014
|
| 679 |
+
pip/_vendor/pygments/formatters/svg.py,sha256=T7Jj004I3JUPOr48aAhQ368K2qWCciUyMQ2tdU-LB-4,7335
|
| 680 |
+
pip/_vendor/pygments/formatters/terminal.py,sha256=cRD5hitINOkYlGZo9ma252vpJYPSGNgLivrsm6zGyec,4674
|
| 681 |
+
pip/_vendor/pygments/formatters/terminal256.py,sha256=Bvz9zZL3UWc94TDm1GhKMI4x0BTit0XplhyRL0zmtkw,11753
|
| 682 |
+
pip/_vendor/pygments/lexer.py,sha256=ECXWlEsbRnKs_njozZns6BGQ4riTMzct_BzAr3zV6dY,31937
|
| 683 |
+
pip/_vendor/pygments/lexers/__init__.py,sha256=6Ds0GVBP3jrIU02wmjRdpoL4eFGhwT2IVD1zf3cV5_Y,11307
|
| 684 |
+
pip/_vendor/pygments/lexers/__pycache__/__init__.cpython-310.pyc,,
|
| 685 |
+
pip/_vendor/pygments/lexers/__pycache__/_mapping.cpython-310.pyc,,
|
| 686 |
+
pip/_vendor/pygments/lexers/__pycache__/python.cpython-310.pyc,,
|
| 687 |
+
pip/_vendor/pygments/lexers/_mapping.py,sha256=jAxmvh5wvNkD-p3Fh6E7hY_B0sGbcxWRfseT6iq7ex4,70032
|
| 688 |
+
pip/_vendor/pygments/lexers/python.py,sha256=LXnk43Lcngqn9xj6eRqdk2f73oF4kHZWiwgHMM_RlVM,52776
|
| 689 |
+
pip/_vendor/pygments/modeline.py,sha256=37fen3cf1moCz4vMVJqX41eAQCmj8pzUchikgPcHp-U,986
|
| 690 |
+
pip/_vendor/pygments/plugin.py,sha256=zGSig3S7QX-3o6RDxd4_Uvice_t25l_BN9aQQ9k8vmU,1727
|
| 691 |
+
pip/_vendor/pygments/regexopt.py,sha256=mj8Fgu3sT0d5PZwRwDLexEvVOQbuHeosubQnqVwgiqs,3072
|
| 692 |
+
pip/_vendor/pygments/scanner.py,sha256=nGoHy-Npk2ylUd4bws_CJN1hK785Xqo8e0teRmNX2jo,3091
|
| 693 |
+
pip/_vendor/pygments/sphinxext.py,sha256=FZ2puvLe2Bztqtj6UJvQd7D8TvtOZ1GsfRJObvH59tE,4630
|
| 694 |
+
pip/_vendor/pygments/style.py,sha256=lGyan5bU42q1kGMfFqafwL3g1j5EurTvfkv8vdP7NzQ,6257
|
| 695 |
+
pip/_vendor/pygments/styles/__init__.py,sha256=Qx2zq6ufbDNE2cTp51M-s9zW-sDE-KLIqFw31qr3Bhg,3252
|
| 696 |
+
pip/_vendor/pygments/styles/__pycache__/__init__.cpython-310.pyc,,
|
| 697 |
+
pip/_vendor/pygments/token.py,sha256=lNPgeaQTzu2DEUi6n_lxAIU7uy4DVj8LMI3nSVnTjks,6143
|
| 698 |
+
pip/_vendor/pygments/unistring.py,sha256=Xs0FzOzE0l0iWRoTlcgi-Q_kAMdF5Gt5FL_goGKJc98,63188
|
| 699 |
+
pip/_vendor/pygments/util.py,sha256=s9n8BQXIxG3lIwCPWv5-ci8yhaqq5JbEVK9v8Z-8_3I,9123
|
| 700 |
+
pip/_vendor/pyparsing/__init__.py,sha256=jXheGTFT1b6r_4WxuOE0uVUqiouLJ3WHzOScpLieRgQ,9107
|
| 701 |
+
pip/_vendor/pyparsing/__pycache__/__init__.cpython-310.pyc,,
|
| 702 |
+
pip/_vendor/pyparsing/__pycache__/actions.cpython-310.pyc,,
|
| 703 |
+
pip/_vendor/pyparsing/__pycache__/common.cpython-310.pyc,,
|
| 704 |
+
pip/_vendor/pyparsing/__pycache__/core.cpython-310.pyc,,
|
| 705 |
+
pip/_vendor/pyparsing/__pycache__/exceptions.cpython-310.pyc,,
|
| 706 |
+
pip/_vendor/pyparsing/__pycache__/helpers.cpython-310.pyc,,
|
| 707 |
+
pip/_vendor/pyparsing/__pycache__/results.cpython-310.pyc,,
|
| 708 |
+
pip/_vendor/pyparsing/__pycache__/testing.cpython-310.pyc,,
|
| 709 |
+
pip/_vendor/pyparsing/__pycache__/unicode.cpython-310.pyc,,
|
| 710 |
+
pip/_vendor/pyparsing/__pycache__/util.cpython-310.pyc,,
|
| 711 |
+
pip/_vendor/pyparsing/actions.py,sha256=60v7mETOBzc01YPH_qQD5isavgcSJpAfIKpzgjM3vaU,6429
|
| 712 |
+
pip/_vendor/pyparsing/common.py,sha256=lFL97ooIeR75CmW5hjURZqwDCTgruqltcTCZ-ulLO2Q,12936
|
| 713 |
+
pip/_vendor/pyparsing/core.py,sha256=GtQsD06HlwKPc7M8K8hyOuOW-cRnd87AxAHq-ad5lEk,212248
|
| 714 |
+
pip/_vendor/pyparsing/diagram/__init__.py,sha256=h0gsUwmo5N3shgvfXVQTtqvTpUAv-ZdQjSQ6IUJmsxY,22165
|
| 715 |
+
pip/_vendor/pyparsing/diagram/__pycache__/__init__.cpython-310.pyc,,
|
| 716 |
+
pip/_vendor/pyparsing/exceptions.py,sha256=H4D9gqMavqmAFSsdrU_J6bO-jA-T-A7yvtXWZpooIUA,9030
|
| 717 |
+
pip/_vendor/pyparsing/helpers.py,sha256=kqpIZFG-y0fQ3g_TmloYllo9we6YCYiewZMXIK0y5wc,38299
|
| 718 |
+
pip/_vendor/pyparsing/results.py,sha256=4D-oURF1cLeL7k0d3zMqUuWH_gTjop_OrZwik9O0HXU,25339
|
| 719 |
+
pip/_vendor/pyparsing/testing.py,sha256=szs8AKZREZMhL0y0vsMfaTVAnpqPHetg6VKJBNmc4QY,13388
|
| 720 |
+
pip/_vendor/pyparsing/unicode.py,sha256=IR-ioeGY29cZ49tG8Ts7ITPWWNP5G2DcZs58oa8zn44,10381
|
| 721 |
+
pip/_vendor/pyparsing/util.py,sha256=kq772O5YSeXOSdP-M31EWpbH_ayj7BMHImBYo9xPD5M,6805
|
| 722 |
+
pip/_vendor/requests/__init__.py,sha256=6IUFQM6K9V2NIu4fe4LtUsN21-TFbw_w3EfPpdUN-qc,5130
|
| 723 |
+
pip/_vendor/requests/__pycache__/__init__.cpython-310.pyc,,
|
| 724 |
+
pip/_vendor/requests/__pycache__/__version__.cpython-310.pyc,,
|
| 725 |
+
pip/_vendor/requests/__pycache__/_internal_utils.cpython-310.pyc,,
|
| 726 |
+
pip/_vendor/requests/__pycache__/adapters.cpython-310.pyc,,
|
| 727 |
+
pip/_vendor/requests/__pycache__/api.cpython-310.pyc,,
|
| 728 |
+
pip/_vendor/requests/__pycache__/auth.cpython-310.pyc,,
|
| 729 |
+
pip/_vendor/requests/__pycache__/certs.cpython-310.pyc,,
|
| 730 |
+
pip/_vendor/requests/__pycache__/compat.cpython-310.pyc,,
|
| 731 |
+
pip/_vendor/requests/__pycache__/cookies.cpython-310.pyc,,
|
| 732 |
+
pip/_vendor/requests/__pycache__/exceptions.cpython-310.pyc,,
|
| 733 |
+
pip/_vendor/requests/__pycache__/help.cpython-310.pyc,,
|
| 734 |
+
pip/_vendor/requests/__pycache__/hooks.cpython-310.pyc,,
|
| 735 |
+
pip/_vendor/requests/__pycache__/models.cpython-310.pyc,,
|
| 736 |
+
pip/_vendor/requests/__pycache__/packages.cpython-310.pyc,,
|
| 737 |
+
pip/_vendor/requests/__pycache__/sessions.cpython-310.pyc,,
|
| 738 |
+
pip/_vendor/requests/__pycache__/status_codes.cpython-310.pyc,,
|
| 739 |
+
pip/_vendor/requests/__pycache__/structures.cpython-310.pyc,,
|
| 740 |
+
pip/_vendor/requests/__pycache__/utils.cpython-310.pyc,,
|
| 741 |
+
pip/_vendor/requests/__version__.py,sha256=q8miOQaomOv3S74lK4eQs1zZ5jwcnOusyEU-M2idhts,441
|
| 742 |
+
pip/_vendor/requests/_internal_utils.py,sha256=Zx3PnEUccyfsB-ie11nZVAW8qClJy0gx1qNME7rgT18,1096
|
| 743 |
+
pip/_vendor/requests/adapters.py,sha256=WazYJQ_b2LHhNDb_y0hscNlWVsSe5ca5I3pymPrer5w,21861
|
| 744 |
+
pip/_vendor/requests/api.py,sha256=hjuoP79IAEmX6Dysrw8t032cLfwLHxbI_wM4gC5G9t0,6402
|
| 745 |
+
pip/_vendor/requests/auth.py,sha256=OMoJIVKyRLy9THr91y8rxysZuclwPB-K1Xg1zBomUhQ,10207
|
| 746 |
+
pip/_vendor/requests/certs.py,sha256=nXRVq9DtGmv_1AYbwjTu9UrgAcdJv05ZvkNeaoLOZxY,465
|
| 747 |
+
pip/_vendor/requests/compat.py,sha256=N1281mkcTluMjKqCSLf88LR6HNOygEhS1TbR9LLsoVY,2114
|
| 748 |
+
pip/_vendor/requests/cookies.py,sha256=Y-bKX6TvW3FnYlE6Au0SXtVVWcaNdFvuAwQxw-G0iTI,18430
|
| 749 |
+
pip/_vendor/requests/exceptions.py,sha256=VcpBXOL-9JYhNbK8OZxCIImBgpQSXJlUelDPf1f-pmM,3446
|
| 750 |
+
pip/_vendor/requests/help.py,sha256=dyhe3lcmHXnFCzDiZVjcGmVvvO_jtsfAm-AC542ndw8,3972
|
| 751 |
+
pip/_vendor/requests/hooks.py,sha256=QReGyy0bRcr5rkwCuObNakbYsc7EkiKeBwG4qHekr2Q,757
|
| 752 |
+
pip/_vendor/requests/models.py,sha256=7pzscX_47qxx7-zEaBWGxMoB33Vdf6HLoUKZh1ktEvM,35116
|
| 753 |
+
pip/_vendor/requests/packages.py,sha256=njJmVifY4aSctuW3PP5EFRCxjEwMRDO6J_feG2dKWsI,695
|
| 754 |
+
pip/_vendor/requests/sessions.py,sha256=Zu-Y9YPlwTIsyFx1hvIrc3ziyeFpuFPqcOuSuz8BNWs,29835
|
| 755 |
+
pip/_vendor/requests/status_codes.py,sha256=gT79Pbs_cQjBgp-fvrUgg1dn2DQO32bDj4TInjnMPSc,4188
|
| 756 |
+
pip/_vendor/requests/structures.py,sha256=msAtr9mq1JxHd-JRyiILfdFlpbJwvvFuP3rfUQT_QxE,3005
|
| 757 |
+
pip/_vendor/requests/utils.py,sha256=siud-FQ6xgKFbL49DRvAb3PMQMMHoeCL_TCmuHh9AUU,33301
|
| 758 |
+
pip/_vendor/resolvelib/__init__.py,sha256=UL-B2BDI0_TRIqkfGwLHKLxY-LjBlomz7941wDqzB1I,537
|
| 759 |
+
pip/_vendor/resolvelib/__pycache__/__init__.cpython-310.pyc,,
|
| 760 |
+
pip/_vendor/resolvelib/__pycache__/providers.cpython-310.pyc,,
|
| 761 |
+
pip/_vendor/resolvelib/__pycache__/reporters.cpython-310.pyc,,
|
| 762 |
+
pip/_vendor/resolvelib/__pycache__/resolvers.cpython-310.pyc,,
|
| 763 |
+
pip/_vendor/resolvelib/__pycache__/structs.cpython-310.pyc,,
|
| 764 |
+
pip/_vendor/resolvelib/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 765 |
+
pip/_vendor/resolvelib/compat/__pycache__/__init__.cpython-310.pyc,,
|
| 766 |
+
pip/_vendor/resolvelib/compat/__pycache__/collections_abc.cpython-310.pyc,,
|
| 767 |
+
pip/_vendor/resolvelib/compat/collections_abc.py,sha256=uy8xUZ-NDEw916tugUXm8HgwCGiMO0f-RcdnpkfXfOs,156
|
| 768 |
+
pip/_vendor/resolvelib/providers.py,sha256=roVmFBItQJ0TkhNua65h8LdNny7rmeqVEXZu90QiP4o,5872
|
| 769 |
+
pip/_vendor/resolvelib/reporters.py,sha256=fW91NKf-lK8XN7i6Yd_rczL5QeOT3sc6AKhpaTEnP3E,1583
|
| 770 |
+
pip/_vendor/resolvelib/resolvers.py,sha256=2wYzVGBGerbmcIpH8cFmgSKgLSETz8jmwBMGjCBMHG4,17592
|
| 771 |
+
pip/_vendor/resolvelib/structs.py,sha256=IVIYof6sA_N4ZEiE1C1UhzTX495brCNnyCdgq6CYq28,4794
|
| 772 |
+
pip/_vendor/rich/__init__.py,sha256=wF1th4JGBCVC02xfaw8j6P2MrFcJaQJL72scKtEmDYQ,5804
|
| 773 |
+
pip/_vendor/rich/__main__.py,sha256=vd1PP-o7_1un-ThdgMU9LHV-D8z56yz_-fryczn38eE,8810
|
| 774 |
+
pip/_vendor/rich/__pycache__/__init__.cpython-310.pyc,,
|
| 775 |
+
pip/_vendor/rich/__pycache__/__main__.cpython-310.pyc,,
|
| 776 |
+
pip/_vendor/rich/__pycache__/_cell_widths.cpython-310.pyc,,
|
| 777 |
+
pip/_vendor/rich/__pycache__/_emoji_codes.cpython-310.pyc,,
|
| 778 |
+
pip/_vendor/rich/__pycache__/_emoji_replace.cpython-310.pyc,,
|
| 779 |
+
pip/_vendor/rich/__pycache__/_extension.cpython-310.pyc,,
|
| 780 |
+
pip/_vendor/rich/__pycache__/_inspect.cpython-310.pyc,,
|
| 781 |
+
pip/_vendor/rich/__pycache__/_log_render.cpython-310.pyc,,
|
| 782 |
+
pip/_vendor/rich/__pycache__/_loop.cpython-310.pyc,,
|
| 783 |
+
pip/_vendor/rich/__pycache__/_lru_cache.cpython-310.pyc,,
|
| 784 |
+
pip/_vendor/rich/__pycache__/_palettes.cpython-310.pyc,,
|
| 785 |
+
pip/_vendor/rich/__pycache__/_pick.cpython-310.pyc,,
|
| 786 |
+
pip/_vendor/rich/__pycache__/_ratio.cpython-310.pyc,,
|
| 787 |
+
pip/_vendor/rich/__pycache__/_spinners.cpython-310.pyc,,
|
| 788 |
+
pip/_vendor/rich/__pycache__/_stack.cpython-310.pyc,,
|
| 789 |
+
pip/_vendor/rich/__pycache__/_timer.cpython-310.pyc,,
|
| 790 |
+
pip/_vendor/rich/__pycache__/_windows.cpython-310.pyc,,
|
| 791 |
+
pip/_vendor/rich/__pycache__/_wrap.cpython-310.pyc,,
|
| 792 |
+
pip/_vendor/rich/__pycache__/abc.cpython-310.pyc,,
|
| 793 |
+
pip/_vendor/rich/__pycache__/align.cpython-310.pyc,,
|
| 794 |
+
pip/_vendor/rich/__pycache__/ansi.cpython-310.pyc,,
|
| 795 |
+
pip/_vendor/rich/__pycache__/bar.cpython-310.pyc,,
|
| 796 |
+
pip/_vendor/rich/__pycache__/box.cpython-310.pyc,,
|
| 797 |
+
pip/_vendor/rich/__pycache__/cells.cpython-310.pyc,,
|
| 798 |
+
pip/_vendor/rich/__pycache__/color.cpython-310.pyc,,
|
| 799 |
+
pip/_vendor/rich/__pycache__/color_triplet.cpython-310.pyc,,
|
| 800 |
+
pip/_vendor/rich/__pycache__/columns.cpython-310.pyc,,
|
| 801 |
+
pip/_vendor/rich/__pycache__/console.cpython-310.pyc,,
|
| 802 |
+
pip/_vendor/rich/__pycache__/constrain.cpython-310.pyc,,
|
| 803 |
+
pip/_vendor/rich/__pycache__/containers.cpython-310.pyc,,
|
| 804 |
+
pip/_vendor/rich/__pycache__/control.cpython-310.pyc,,
|
| 805 |
+
pip/_vendor/rich/__pycache__/default_styles.cpython-310.pyc,,
|
| 806 |
+
pip/_vendor/rich/__pycache__/diagnose.cpython-310.pyc,,
|
| 807 |
+
pip/_vendor/rich/__pycache__/emoji.cpython-310.pyc,,
|
| 808 |
+
pip/_vendor/rich/__pycache__/errors.cpython-310.pyc,,
|
| 809 |
+
pip/_vendor/rich/__pycache__/file_proxy.cpython-310.pyc,,
|
| 810 |
+
pip/_vendor/rich/__pycache__/filesize.cpython-310.pyc,,
|
| 811 |
+
pip/_vendor/rich/__pycache__/highlighter.cpython-310.pyc,,
|
| 812 |
+
pip/_vendor/rich/__pycache__/json.cpython-310.pyc,,
|
| 813 |
+
pip/_vendor/rich/__pycache__/jupyter.cpython-310.pyc,,
|
| 814 |
+
pip/_vendor/rich/__pycache__/layout.cpython-310.pyc,,
|
| 815 |
+
pip/_vendor/rich/__pycache__/live.cpython-310.pyc,,
|
| 816 |
+
pip/_vendor/rich/__pycache__/live_render.cpython-310.pyc,,
|
| 817 |
+
pip/_vendor/rich/__pycache__/logging.cpython-310.pyc,,
|
| 818 |
+
pip/_vendor/rich/__pycache__/markup.cpython-310.pyc,,
|
| 819 |
+
pip/_vendor/rich/__pycache__/measure.cpython-310.pyc,,
|
| 820 |
+
pip/_vendor/rich/__pycache__/padding.cpython-310.pyc,,
|
| 821 |
+
pip/_vendor/rich/__pycache__/pager.cpython-310.pyc,,
|
| 822 |
+
pip/_vendor/rich/__pycache__/palette.cpython-310.pyc,,
|
| 823 |
+
pip/_vendor/rich/__pycache__/panel.cpython-310.pyc,,
|
| 824 |
+
pip/_vendor/rich/__pycache__/pretty.cpython-310.pyc,,
|
| 825 |
+
pip/_vendor/rich/__pycache__/progress.cpython-310.pyc,,
|
| 826 |
+
pip/_vendor/rich/__pycache__/progress_bar.cpython-310.pyc,,
|
| 827 |
+
pip/_vendor/rich/__pycache__/prompt.cpython-310.pyc,,
|
| 828 |
+
pip/_vendor/rich/__pycache__/protocol.cpython-310.pyc,,
|
| 829 |
+
pip/_vendor/rich/__pycache__/region.cpython-310.pyc,,
|
| 830 |
+
pip/_vendor/rich/__pycache__/repr.cpython-310.pyc,,
|
| 831 |
+
pip/_vendor/rich/__pycache__/rule.cpython-310.pyc,,
|
| 832 |
+
pip/_vendor/rich/__pycache__/scope.cpython-310.pyc,,
|
| 833 |
+
pip/_vendor/rich/__pycache__/screen.cpython-310.pyc,,
|
| 834 |
+
pip/_vendor/rich/__pycache__/segment.cpython-310.pyc,,
|
| 835 |
+
pip/_vendor/rich/__pycache__/spinner.cpython-310.pyc,,
|
| 836 |
+
pip/_vendor/rich/__pycache__/status.cpython-310.pyc,,
|
| 837 |
+
pip/_vendor/rich/__pycache__/style.cpython-310.pyc,,
|
| 838 |
+
pip/_vendor/rich/__pycache__/styled.cpython-310.pyc,,
|
| 839 |
+
pip/_vendor/rich/__pycache__/syntax.cpython-310.pyc,,
|
| 840 |
+
pip/_vendor/rich/__pycache__/table.cpython-310.pyc,,
|
| 841 |
+
pip/_vendor/rich/__pycache__/tabulate.cpython-310.pyc,,
|
| 842 |
+
pip/_vendor/rich/__pycache__/terminal_theme.cpython-310.pyc,,
|
| 843 |
+
pip/_vendor/rich/__pycache__/text.cpython-310.pyc,,
|
| 844 |
+
pip/_vendor/rich/__pycache__/theme.cpython-310.pyc,,
|
| 845 |
+
pip/_vendor/rich/__pycache__/themes.cpython-310.pyc,,
|
| 846 |
+
pip/_vendor/rich/__pycache__/traceback.cpython-310.pyc,,
|
| 847 |
+
pip/_vendor/rich/__pycache__/tree.cpython-310.pyc,,
|
| 848 |
+
pip/_vendor/rich/_cell_widths.py,sha256=2n4EiJi3X9sqIq0O16kUZ_zy6UYMd3xFfChlKfnW1Hc,10096
|
| 849 |
+
pip/_vendor/rich/_emoji_codes.py,sha256=hu1VL9nbVdppJrVoijVshRlcRRe_v3dju3Mmd2sKZdY,140235
|
| 850 |
+
pip/_vendor/rich/_emoji_replace.py,sha256=n-kcetsEUx2ZUmhQrfeMNc-teeGhpuSQ5F8VPBsyvDo,1064
|
| 851 |
+
pip/_vendor/rich/_extension.py,sha256=Xt47QacCKwYruzjDi-gOBq724JReDj9Cm9xUi5fr-34,265
|
| 852 |
+
pip/_vendor/rich/_inspect.py,sha256=vq6BjewwEvddjcBTr_lCcjYQBsKi92aTNpcXyaA5ERA,7444
|
| 853 |
+
pip/_vendor/rich/_log_render.py,sha256=1ByI0PA1ZpxZY3CGJOK54hjlq4X-Bz_boIjIqCd8Kns,3225
|
| 854 |
+
pip/_vendor/rich/_loop.py,sha256=hV_6CLdoPm0va22Wpw4zKqM0RYsz3TZxXj0PoS-9eDQ,1236
|
| 855 |
+
pip/_vendor/rich/_lru_cache.py,sha256=M7H1ZQF32o6SxrpOur9zTIhEHlNXT9XnrcdhruUmG5I,1246
|
| 856 |
+
pip/_vendor/rich/_palettes.py,sha256=cdev1JQKZ0JvlguV9ipHgznTdnvlIzUFDBb0It2PzjI,7063
|
| 857 |
+
pip/_vendor/rich/_pick.py,sha256=evDt8QN4lF5CiwrUIXlOJCntitBCOsI3ZLPEIAVRLJU,423
|
| 858 |
+
pip/_vendor/rich/_ratio.py,sha256=2lLSliL025Y-YMfdfGbutkQDevhcyDqc-DtUYW9mU70,5472
|
| 859 |
+
pip/_vendor/rich/_spinners.py,sha256=huT1biTlwyp9Lm8S7bLfVzg1psUaIH5xHDwTaWEHVh0,26521
|
| 860 |
+
pip/_vendor/rich/_stack.py,sha256=-C8OK7rxn3sIUdVwxZBBpeHhIzX0eI-VM3MemYfaXm0,351
|
| 861 |
+
pip/_vendor/rich/_timer.py,sha256=zelxbT6oPFZnNrwWPpc1ktUeAT-Vc4fuFcRZLQGLtMI,417
|
| 862 |
+
pip/_vendor/rich/_windows.py,sha256=nBO71icHMIHlzT7hg6fkoIdh1mT-5MvDdPDwunkshyw,2065
|
| 863 |
+
pip/_vendor/rich/_wrap.py,sha256=OtnSxnERkuNlSM1d_MYtNg8KIYTcTBk3peg16dCZH_U,1804
|
| 864 |
+
pip/_vendor/rich/abc.py,sha256=ON-E-ZqSSheZ88VrKX2M3PXpFbGEUUZPMa_Af0l-4f0,890
|
| 865 |
+
pip/_vendor/rich/align.py,sha256=2zRHV8SzR5eP-vQkSDgjmgsBLBluCBwykgejAW6oRD0,10425
|
| 866 |
+
pip/_vendor/rich/ansi.py,sha256=QaVVkfvVL6C3OsuWI9iQ-iJFkMsMohjYlxgMLnVTEPo,6676
|
| 867 |
+
pip/_vendor/rich/bar.py,sha256=a7UD303BccRCrEhGjfMElpv5RFYIinaAhAuqYqhUvmw,3264
|
| 868 |
+
pip/_vendor/rich/box.py,sha256=o0ywz1iW0WjGLPrRVDAZPh1CVPEgAOaWsn8Bf3sf43g,9069
|
| 869 |
+
pip/_vendor/rich/cells.py,sha256=NadN20gFxE8Aj-2S3Drn7qgn-ZpsRZcNnTNtweRL7rA,4285
|
| 870 |
+
pip/_vendor/rich/color.py,sha256=SD3yTf3t8japb-jOv8GYCMCDqyzpipzXS_0rAXhSlU4,17285
|
| 871 |
+
pip/_vendor/rich/color_triplet.py,sha256=3lhQkdJbvWPoLDO-AnYImAWmJvV5dlgYNCVZ97ORaN4,1054
|
| 872 |
+
pip/_vendor/rich/columns.py,sha256=HUX0KcMm9dsKNi11fTbiM_h2iDtl8ySCaVcxlalEzq8,7131
|
| 873 |
+
pip/_vendor/rich/console.py,sha256=bioCy8012eZ8PIOBxMyyqxYPltKk2pGEG9jmwylNCQk,81236
|
| 874 |
+
pip/_vendor/rich/constrain.py,sha256=1VIPuC8AgtKWrcncQrjBdYqA3JVWysu6jZo1rrh7c7Q,1288
|
| 875 |
+
pip/_vendor/rich/containers.py,sha256=aKgm5UDHn5Nmui6IJaKdsZhbHClh_X7D-_Wg8Ehrr7s,5497
|
| 876 |
+
pip/_vendor/rich/control.py,sha256=qxg6Yjd78XuF0VxthlT8O4dpvpACYwKkBfm2S4-IvHA,5298
|
| 877 |
+
pip/_vendor/rich/default_styles.py,sha256=At42PcWzmnYWcx5fUOKyOUpI8HK5m4ItZqxkgHToaMs,7614
|
| 878 |
+
pip/_vendor/rich/diagnose.py,sha256=4L8SZfbqjIRotzJ39QzD9-d4I80FyV1mNKHryg1eArE,183
|
| 879 |
+
pip/_vendor/rich/emoji.py,sha256=omTF9asaAnsM4yLY94eR_9dgRRSm1lHUszX20D1yYCQ,2501
|
| 880 |
+
pip/_vendor/rich/errors.py,sha256=5pP3Kc5d4QJ_c0KFsxrfyhjiPVe7J1zOqSFbFAzcV-Y,642
|
| 881 |
+
pip/_vendor/rich/file_proxy.py,sha256=fHeReSO3VJ7IbH_9ri-OrPYbFC3UYOzeTNjngiiWOcY,1613
|
| 882 |
+
pip/_vendor/rich/filesize.py,sha256=oQJnM5_7ygkpzt3GtNq5l3F6gmB7YahBA5vpdQVKLwI,2511
|
| 883 |
+
pip/_vendor/rich/highlighter.py,sha256=AdhjC0meTYswZ_xKgka0cRYdNjLABLUzHAbyF3QpPWo,4894
|
| 884 |
+
pip/_vendor/rich/json.py,sha256=RCm4lXBXrjvXHpqrWPH8wdGP0jEo4IohLmkddlhRY18,5051
|
| 885 |
+
pip/_vendor/rich/jupyter.py,sha256=4sxNAwJs4g3dYfWy_enPw9fp0Tdn-82tV4T9uh9vAOM,3025
|
| 886 |
+
pip/_vendor/rich/layout.py,sha256=b64KMDP2EPiC103P-v-_VZKGY13oWiiGS418P_KRRlc,14048
|
| 887 |
+
pip/_vendor/rich/live.py,sha256=OKxMaFU5sFfuR--cJftGYjSvg1VPQri1U_DNZUjCsvI,13711
|
| 888 |
+
pip/_vendor/rich/live_render.py,sha256=zElm3PrfSIvjOce28zETHMIUf9pFYSUA5o0AflgUP64,3667
|
| 889 |
+
pip/_vendor/rich/logging.py,sha256=YNcCSK6pCo2Wg6JKqScAe6VgFqebHBnS5nDnBO4gXAA,10868
|
| 890 |
+
pip/_vendor/rich/markup.py,sha256=hsVW_k1TIvj5OPPQ12ihAii9HSVa8N1TStvA5B2GGpo,8058
|
| 891 |
+
pip/_vendor/rich/measure.py,sha256=Z74XvzIgLZm0xH-QIo1uX5d4oahavHe8D8MKyxLNqPQ,5258
|
| 892 |
+
pip/_vendor/rich/padding.py,sha256=kTFGsdGe0os7tXLnHKpwTI90CXEvrceeZGCshmJy5zw,4970
|
| 893 |
+
pip/_vendor/rich/pager.py,sha256=VK_2EfH0JduZWdyV-KZma06bvi_V5PWmHG6W7BoiaTg,838
|
| 894 |
+
pip/_vendor/rich/palette.py,sha256=lInvR1ODDT2f3UZMfL1grq7dY_pDdKHw4bdUgOGaM4Y,3396
|
| 895 |
+
pip/_vendor/rich/panel.py,sha256=O6ORyIhDcOLSEasTjpcDvmhvIcppPGCeQoXpoycIUT8,8637
|
| 896 |
+
pip/_vendor/rich/pretty.py,sha256=HAB68BpYysaL1EXeV4X5Tt-U2hDlcLpbFz06fkojWWE,32572
|
| 897 |
+
pip/_vendor/rich/progress.py,sha256=jcgi7aMnQ_YjSpAmQkalwtNsgVn9i56SeZGprr7tuOk,35926
|
| 898 |
+
pip/_vendor/rich/progress_bar.py,sha256=ELiBaxJOgsRYKpNIrot7BC0bFXvmf8cTd6nxI02BbK0,7762
|
| 899 |
+
pip/_vendor/rich/prompt.py,sha256=gKVd13YWv6jedzwcRPZGUINBjC-xcJhJ_xz_NvMW80c,11307
|
| 900 |
+
pip/_vendor/rich/protocol.py,sha256=Vx6n4fEoSDhzSup8t3KH0iK2RWyssIOks5E0S1qw1GA,1401
|
| 901 |
+
pip/_vendor/rich/region.py,sha256=rNT9xZrVZTYIXZC0NYn41CJQwYNbR-KecPOxTgQvB8Y,166
|
| 902 |
+
pip/_vendor/rich/repr.py,sha256=1A0U0_ibG_bZbw71pUBIctO9Az-CQUuyOTbiKcJOwyw,4309
|
| 903 |
+
pip/_vendor/rich/rule.py,sha256=cPK6NYo4kzh-vM_8a-rXajXplsbaHa6ahErYvGSsrJ0,4197
|
| 904 |
+
pip/_vendor/rich/scope.py,sha256=HX13XsJfqzQHpPfw4Jn9JmJjCsRj9uhHxXQEqjkwyLA,2842
|
| 905 |
+
pip/_vendor/rich/screen.py,sha256=YoeReESUhx74grqb0mSSb9lghhysWmFHYhsbMVQjXO8,1591
|
| 906 |
+
pip/_vendor/rich/segment.py,sha256=MBBAWaHyqCQFCfiNbrTW4BGaFR1uU31XktJ1S3Taqb4,23916
|
| 907 |
+
pip/_vendor/rich/spinner.py,sha256=V6dW0jIk5IO0_2MyxyftQf5VjCHI0T2cRhJ4F31hPIQ,4312
|
| 908 |
+
pip/_vendor/rich/status.py,sha256=gJsIXIZeSo3urOyxRUjs6VrhX5CZrA0NxIQ-dxhCnwo,4425
|
| 909 |
+
pip/_vendor/rich/style.py,sha256=AD1I7atfclsFCtGeL8ronH1Jj-02WLp9ZQ2VYqmpBjM,26469
|
| 910 |
+
pip/_vendor/rich/styled.py,sha256=eZNnzGrI4ki_54pgY3Oj0T-x3lxdXTYh4_ryDB24wBU,1258
|
| 911 |
+
pip/_vendor/rich/syntax.py,sha256=pJAD08ywowg5xVwTGCqUOMpDYskjoMoDYEV-hryEX5s,26994
|
| 912 |
+
pip/_vendor/rich/table.py,sha256=oQAEBaV4zMUPyg_tSA93_GrCirdIf-osolxf9wb3pEo,36757
|
| 913 |
+
pip/_vendor/rich/tabulate.py,sha256=nl0oeNbiXectEgTHyj3K7eN4NZMISpaogpOdZyEOGbs,1700
|
| 914 |
+
pip/_vendor/rich/terminal_theme.py,sha256=E0nI_ycFpvflamt-KVCY4J52LmUjRi1Y6ICB-Ef3gMo,1459
|
| 915 |
+
pip/_vendor/rich/text.py,sha256=auX3LpY-I6PBiNyxB3o3LyMEx7lna2cx9IbNQJDwtw8,44424
|
| 916 |
+
pip/_vendor/rich/theme.py,sha256=GKNtQhDBZKAzDaY0vQVQQFzbc0uWfFe6CJXA-syT7zQ,3627
|
| 917 |
+
pip/_vendor/rich/themes.py,sha256=0xgTLozfabebYtcJtDdC5QkX5IVUEaviqDUJJh4YVFk,102
|
| 918 |
+
pip/_vendor/rich/traceback.py,sha256=hAU3IR295eFuup_px2NU4aCEWu7KQs1qpZbnqoHCtR0,25935
|
| 919 |
+
pip/_vendor/rich/tree.py,sha256=JxyWbc27ZuwoLQnd7I-rSsRsqI9lzaVKlfTLJXla9U0,9122
|
| 920 |
+
pip/_vendor/six.py,sha256=TOOfQi7nFGfMrIvtdr6wX4wyHH8M7aknmuLfo2cBBrM,34549
|
| 921 |
+
pip/_vendor/tenacity/__init__.py,sha256=GLLsTFD4Bd5VDgTR6mU_FxyOsrxc48qONorVaRebeD4,18257
|
| 922 |
+
pip/_vendor/tenacity/__pycache__/__init__.cpython-310.pyc,,
|
| 923 |
+
pip/_vendor/tenacity/__pycache__/_asyncio.cpython-310.pyc,,
|
| 924 |
+
pip/_vendor/tenacity/__pycache__/_utils.cpython-310.pyc,,
|
| 925 |
+
pip/_vendor/tenacity/__pycache__/after.cpython-310.pyc,,
|
| 926 |
+
pip/_vendor/tenacity/__pycache__/before.cpython-310.pyc,,
|
| 927 |
+
pip/_vendor/tenacity/__pycache__/before_sleep.cpython-310.pyc,,
|
| 928 |
+
pip/_vendor/tenacity/__pycache__/nap.cpython-310.pyc,,
|
| 929 |
+
pip/_vendor/tenacity/__pycache__/retry.cpython-310.pyc,,
|
| 930 |
+
pip/_vendor/tenacity/__pycache__/stop.cpython-310.pyc,,
|
| 931 |
+
pip/_vendor/tenacity/__pycache__/tornadoweb.cpython-310.pyc,,
|
| 932 |
+
pip/_vendor/tenacity/__pycache__/wait.cpython-310.pyc,,
|
| 933 |
+
pip/_vendor/tenacity/_asyncio.py,sha256=HEb0BVJEeBJE9P-m9XBxh1KcaF96BwoeqkJCL5sbVcQ,3314
|
| 934 |
+
pip/_vendor/tenacity/_utils.py,sha256=-y68scDcyoqvTJuJJ0GTfjdSCljEYlbCYvgk7nM4NdM,1944
|
| 935 |
+
pip/_vendor/tenacity/after.py,sha256=dlmyxxFy2uqpLXDr838DiEd7jgv2AGthsWHGYcGYsaI,1496
|
| 936 |
+
pip/_vendor/tenacity/before.py,sha256=7XtvRmO0dRWUp8SVn24OvIiGFj8-4OP5muQRUiWgLh0,1376
|
| 937 |
+
pip/_vendor/tenacity/before_sleep.py,sha256=ThyDvqKU5yle_IvYQz_b6Tp6UjUS0PhVp6zgqYl9U6Y,1908
|
| 938 |
+
pip/_vendor/tenacity/nap.py,sha256=fRWvnz1aIzbIq9Ap3gAkAZgDH6oo5zxMrU6ZOVByq0I,1383
|
| 939 |
+
pip/_vendor/tenacity/retry.py,sha256=62R71W59bQjuNyFKsDM7hE2aEkEPtwNBRA0tnsEvgSk,6645
|
| 940 |
+
pip/_vendor/tenacity/stop.py,sha256=sKHmHaoSaW6sKu3dTxUVKr1-stVkY7lw4Y9yjZU30zQ,2790
|
| 941 |
+
pip/_vendor/tenacity/tornadoweb.py,sha256=E8lWO2nwe6dJgoB-N2HhQprYLDLB_UdSgFnv-EN6wKE,2145
|
| 942 |
+
pip/_vendor/tenacity/wait.py,sha256=e_Saa6I2tsNLpCL1t9897wN2fGb0XQMQlE4bU2t9V2w,6691
|
| 943 |
+
pip/_vendor/tomli/__init__.py,sha256=z1Elt0nLAqU5Y0DOn9p__8QnLWavlEOpRyQikdYgKro,230
|
| 944 |
+
pip/_vendor/tomli/__pycache__/__init__.cpython-310.pyc,,
|
| 945 |
+
pip/_vendor/tomli/__pycache__/_parser.cpython-310.pyc,,
|
| 946 |
+
pip/_vendor/tomli/__pycache__/_re.cpython-310.pyc,,
|
| 947 |
+
pip/_vendor/tomli/_parser.py,sha256=50BD4o9YbzFAGAYyZLqZC8F81DQ7iWWyJnrHNwBKa6A,22415
|
| 948 |
+
pip/_vendor/tomli/_re.py,sha256=5GPfgXKteg7wRFCF-DzlkAPI2ilHbkMK2-JC49F-AJQ,2681
|
| 949 |
+
pip/_vendor/typing_extensions.py,sha256=1uqi_RSlI7gos4eJB_NEV3d5wQwzTUQHd3_jrkbTo8Q,87149
|
| 950 |
+
pip/_vendor/urllib3/__init__.py,sha256=j3yzHIbmW7CS-IKQJ9-PPQf_YKO8EOAey_rMW0UR7us,2763
|
| 951 |
+
pip/_vendor/urllib3/__pycache__/__init__.cpython-310.pyc,,
|
| 952 |
+
pip/_vendor/urllib3/__pycache__/_collections.cpython-310.pyc,,
|
| 953 |
+
pip/_vendor/urllib3/__pycache__/_version.cpython-310.pyc,,
|
| 954 |
+
pip/_vendor/urllib3/__pycache__/connection.cpython-310.pyc,,
|
| 955 |
+
pip/_vendor/urllib3/__pycache__/connectionpool.cpython-310.pyc,,
|
| 956 |
+
pip/_vendor/urllib3/__pycache__/exceptions.cpython-310.pyc,,
|
| 957 |
+
pip/_vendor/urllib3/__pycache__/fields.cpython-310.pyc,,
|
| 958 |
+
pip/_vendor/urllib3/__pycache__/filepost.cpython-310.pyc,,
|
| 959 |
+
pip/_vendor/urllib3/__pycache__/poolmanager.cpython-310.pyc,,
|
| 960 |
+
pip/_vendor/urllib3/__pycache__/request.cpython-310.pyc,,
|
| 961 |
+
pip/_vendor/urllib3/__pycache__/response.cpython-310.pyc,,
|
| 962 |
+
pip/_vendor/urllib3/_collections.py,sha256=pyASJJhW7wdOpqJj9QJA8FyGRfr8E8uUUhqUvhF0728,11372
|
| 963 |
+
pip/_vendor/urllib3/_version.py,sha256=_NdMUQaeBvFHAX2z3zAIX2Wum58A6rVtY1f7ByHsQ4g,63
|
| 964 |
+
pip/_vendor/urllib3/connection.py,sha256=6zokyboYYKm9VkyrQvVVLgxMyCZK7n9Vmg_2ZK6pbhc,20076
|
| 965 |
+
pip/_vendor/urllib3/connectionpool.py,sha256=eQ1jWJ2dDdRADuCj9Yx7RCpzY2iM8P32jGHbjYBkAIk,39308
|
| 966 |
+
pip/_vendor/urllib3/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 967 |
+
pip/_vendor/urllib3/contrib/__pycache__/__init__.cpython-310.pyc,,
|
| 968 |
+
pip/_vendor/urllib3/contrib/__pycache__/_appengine_environ.cpython-310.pyc,,
|
| 969 |
+
pip/_vendor/urllib3/contrib/__pycache__/appengine.cpython-310.pyc,,
|
| 970 |
+
pip/_vendor/urllib3/contrib/__pycache__/ntlmpool.cpython-310.pyc,,
|
| 971 |
+
pip/_vendor/urllib3/contrib/__pycache__/pyopenssl.cpython-310.pyc,,
|
| 972 |
+
pip/_vendor/urllib3/contrib/__pycache__/securetransport.cpython-310.pyc,,
|
| 973 |
+
pip/_vendor/urllib3/contrib/__pycache__/socks.cpython-310.pyc,,
|
| 974 |
+
pip/_vendor/urllib3/contrib/_appengine_environ.py,sha256=bDbyOEhW2CKLJcQqAKAyrEHN-aklsyHFKq6vF8ZFsmk,957
|
| 975 |
+
pip/_vendor/urllib3/contrib/_securetransport/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 976 |
+
pip/_vendor/urllib3/contrib/_securetransport/__pycache__/__init__.cpython-310.pyc,,
|
| 977 |
+
pip/_vendor/urllib3/contrib/_securetransport/__pycache__/bindings.cpython-310.pyc,,
|
| 978 |
+
pip/_vendor/urllib3/contrib/_securetransport/__pycache__/low_level.cpython-310.pyc,,
|
| 979 |
+
pip/_vendor/urllib3/contrib/_securetransport/bindings.py,sha256=4Xk64qIkPBt09A5q-RIFUuDhNc9mXilVapm7WnYnzRw,17632
|
| 980 |
+
pip/_vendor/urllib3/contrib/_securetransport/low_level.py,sha256=B2JBB2_NRP02xK6DCa1Pa9IuxrPwxzDzZbixQkb7U9M,13922
|
| 981 |
+
pip/_vendor/urllib3/contrib/appengine.py,sha256=lfzpHFmJiO82shClLEm3QB62SYgHWnjpZOH_2JhU5Tc,11034
|
| 982 |
+
pip/_vendor/urllib3/contrib/ntlmpool.py,sha256=ej9gGvfAb2Gt00lafFp45SIoRz-QwrQ4WChm6gQmAlM,4538
|
| 983 |
+
pip/_vendor/urllib3/contrib/pyopenssl.py,sha256=DD4pInv_3OEEGffEFynBoirc8ldR789sLmGSKukzA0E,16900
|
| 984 |
+
pip/_vendor/urllib3/contrib/securetransport.py,sha256=4qUKo7PUV-vVIqXmr2BD-sH7qplB918jiD5eNsRI9vU,34449
|
| 985 |
+
pip/_vendor/urllib3/contrib/socks.py,sha256=aRi9eWXo9ZEb95XUxef4Z21CFlnnjbEiAo9HOseoMt4,7097
|
| 986 |
+
pip/_vendor/urllib3/exceptions.py,sha256=0Mnno3KHTNfXRfY7638NufOPkUb6mXOm-Lqj-4x2w8A,8217
|
| 987 |
+
pip/_vendor/urllib3/fields.py,sha256=kvLDCg_JmH1lLjUUEY_FLS8UhY7hBvDPuVETbY8mdrM,8579
|
| 988 |
+
pip/_vendor/urllib3/filepost.py,sha256=5b_qqgRHVlL7uLtdAYBzBh-GHmU5AfJVt_2N0XS3PeY,2440
|
| 989 |
+
pip/_vendor/urllib3/packages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 990 |
+
pip/_vendor/urllib3/packages/__pycache__/__init__.cpython-310.pyc,,
|
| 991 |
+
pip/_vendor/urllib3/packages/__pycache__/six.cpython-310.pyc,,
|
| 992 |
+
pip/_vendor/urllib3/packages/backports/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 993 |
+
pip/_vendor/urllib3/packages/backports/__pycache__/__init__.cpython-310.pyc,,
|
| 994 |
+
pip/_vendor/urllib3/packages/backports/__pycache__/makefile.cpython-310.pyc,,
|
| 995 |
+
pip/_vendor/urllib3/packages/backports/makefile.py,sha256=nbzt3i0agPVP07jqqgjhaYjMmuAi_W5E0EywZivVO8E,1417
|
| 996 |
+
pip/_vendor/urllib3/packages/six.py,sha256=1LVW7ljqRirFlfExjwl-v1B7vSAUNTmzGMs-qays2zg,34666
|
| 997 |
+
pip/_vendor/urllib3/poolmanager.py,sha256=xfVcBtEBc8Xwa8jURSqdS7QmXvUuMHhjL1sjFOY-rUk,20001
|
| 998 |
+
pip/_vendor/urllib3/request.py,sha256=ZFSIqX0C6WizixecChZ3_okyu7BEv0lZu1VT0s6h4SM,5985
|
| 999 |
+
pip/_vendor/urllib3/response.py,sha256=hGhGBh7TkEkh_IQg5C1W_xuPNrgIKv5BUXPyE-q0LuE,28203
|
| 1000 |
+
pip/_vendor/urllib3/util/__init__.py,sha256=JEmSmmqqLyaw8P51gUImZh8Gwg9i1zSe-DoqAitn2nc,1155
|
| 1001 |
+
pip/_vendor/urllib3/util/__pycache__/__init__.cpython-310.pyc,,
|
| 1002 |
+
pip/_vendor/urllib3/util/__pycache__/connection.cpython-310.pyc,,
|
| 1003 |
+
pip/_vendor/urllib3/util/__pycache__/proxy.cpython-310.pyc,,
|
| 1004 |
+
pip/_vendor/urllib3/util/__pycache__/queue.cpython-310.pyc,,
|
| 1005 |
+
pip/_vendor/urllib3/util/__pycache__/request.cpython-310.pyc,,
|
| 1006 |
+
pip/_vendor/urllib3/util/__pycache__/response.cpython-310.pyc,,
|
| 1007 |
+
pip/_vendor/urllib3/util/__pycache__/retry.cpython-310.pyc,,
|
| 1008 |
+
pip/_vendor/urllib3/util/__pycache__/ssl_.cpython-310.pyc,,
|
| 1009 |
+
pip/_vendor/urllib3/util/__pycache__/ssl_match_hostname.cpython-310.pyc,,
|
| 1010 |
+
pip/_vendor/urllib3/util/__pycache__/ssltransport.cpython-310.pyc,,
|
| 1011 |
+
pip/_vendor/urllib3/util/__pycache__/timeout.cpython-310.pyc,,
|
| 1012 |
+
pip/_vendor/urllib3/util/__pycache__/url.cpython-310.pyc,,
|
| 1013 |
+
pip/_vendor/urllib3/util/__pycache__/wait.cpython-310.pyc,,
|
| 1014 |
+
pip/_vendor/urllib3/util/connection.py,sha256=5Lx2B1PW29KxBn2T0xkN1CBgRBa3gGVJBKoQoRogEVk,4901
|
| 1015 |
+
pip/_vendor/urllib3/util/proxy.py,sha256=zUvPPCJrp6dOF0N4GAVbOcl6o-4uXKSrGiTkkr5vUS4,1605
|
| 1016 |
+
pip/_vendor/urllib3/util/queue.py,sha256=nRgX8_eX-_VkvxoX096QWoz8Ps0QHUAExILCY_7PncM,498
|
| 1017 |
+
pip/_vendor/urllib3/util/request.py,sha256=NnzaEKQ1Pauw5MFMV6HmgEMHITf0Aua9fQuzi2uZzGc,4123
|
| 1018 |
+
pip/_vendor/urllib3/util/response.py,sha256=GJpg3Egi9qaJXRwBh5wv-MNuRWan5BIu40oReoxWP28,3510
|
| 1019 |
+
pip/_vendor/urllib3/util/retry.py,sha256=J39USWUTcYYHibxaBy2ZLlXnBZX0N1leKok6cCdtUMw,22048
|
| 1020 |
+
pip/_vendor/urllib3/util/ssl_.py,sha256=X4-AqW91aYPhPx6-xbf66yHFQKbqqfC_5Zt4WkLX1Hc,17177
|
| 1021 |
+
pip/_vendor/urllib3/util/ssl_match_hostname.py,sha256=w01jCYuwvQ038p9mhc1P1gF8IiTN1qHakThpoukOlbw,5751
|
| 1022 |
+
pip/_vendor/urllib3/util/ssltransport.py,sha256=NA-u5rMTrDFDFC8QzRKUEKMG0561hOD4qBTr3Z4pv6E,6895
|
| 1023 |
+
pip/_vendor/urllib3/util/timeout.py,sha256=QSbBUNOB9yh6AnDn61SrLQ0hg5oz0I9-uXEG91AJuIg,10003
|
| 1024 |
+
pip/_vendor/urllib3/util/url.py,sha256=QVEzcbHipbXyCWwH6R4K4TR-N8T4LM55WEMwNUTBmLE,14047
|
| 1025 |
+
pip/_vendor/urllib3/util/wait.py,sha256=3MUKRSAUJDB2tgco7qRUskW0zXGAWYvRRE4Q1_6xlLs,5404
|
| 1026 |
+
pip/_vendor/vendor.txt,sha256=H-9fScoah7nx4K8O4Uft0l5iH2P_mVo4RqyuMVOTJEc,496
|
| 1027 |
+
pip/_vendor/webencodings/__init__.py,sha256=qOBJIuPy_4ByYH6W_bNgJF-qYQ2DoU-dKsDu5yRWCXg,10579
|
| 1028 |
+
pip/_vendor/webencodings/__pycache__/__init__.cpython-310.pyc,,
|
| 1029 |
+
pip/_vendor/webencodings/__pycache__/labels.cpython-310.pyc,,
|
| 1030 |
+
pip/_vendor/webencodings/__pycache__/mklabels.cpython-310.pyc,,
|
| 1031 |
+
pip/_vendor/webencodings/__pycache__/tests.cpython-310.pyc,,
|
| 1032 |
+
pip/_vendor/webencodings/__pycache__/x_user_defined.cpython-310.pyc,,
|
| 1033 |
+
pip/_vendor/webencodings/labels.py,sha256=4AO_KxTddqGtrL9ns7kAPjb0CcN6xsCIxbK37HY9r3E,8979
|
| 1034 |
+
pip/_vendor/webencodings/mklabels.py,sha256=GYIeywnpaLnP0GSic8LFWgd0UVvO_l1Nc6YoF-87R_4,1305
|
| 1035 |
+
pip/_vendor/webencodings/tests.py,sha256=OtGLyjhNY1fvkW1GvLJ_FV9ZoqC9Anyjr7q3kxTbzNs,6563
|
| 1036 |
+
pip/_vendor/webencodings/x_user_defined.py,sha256=yOqWSdmpytGfUgh_Z6JYgDNhoc-BAHyyeeT15Fr42tM,4307
|
| 1037 |
+
pip/py.typed,sha256=EBVvvPRTn_eIpz5e5QztSCdrMX7Qwd7VP93RSoIlZ2I,286
|
venv/lib/python3.10/site-packages/pip-22.0.2.dist-info/REQUESTED
ADDED
|
File without changes
|
venv/lib/python3.10/site-packages/pip-22.0.2.dist-info/WHEEL
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Wheel-Version: 1.0
|
| 2 |
+
Generator: bdist_wheel (0.37.1)
|
| 3 |
+
Root-Is-Purelib: true
|
| 4 |
+
Tag: py3-none-any
|
| 5 |
+
|
venv/lib/python3.10/site-packages/pip-22.0.2.dist-info/entry_points.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[console_scripts]
|
| 2 |
+
pip = pip._internal.cli.main:main
|
| 3 |
+
pip3 = pip._internal.cli.main:main
|
| 4 |
+
pip3.10 = pip._internal.cli.main:main
|
| 5 |
+
|
venv/lib/python3.10/site-packages/pip-22.0.2.dist-info/top_level.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
pip
|
venv/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
venv/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (99.9 kB). View file
|
|
|
venv/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__pycache__/py31compat.cpython-310.pyc
ADDED
|
Binary file (664 Bytes). View file
|
|
|
venv/lib/python3.10/site-packages/pip/_vendor/pkg_resources/py31compat.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import errno
|
| 3 |
+
import sys
|
| 4 |
+
|
| 5 |
+
from pip._vendor import six
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
def _makedirs_31(path, exist_ok=False):
|
| 9 |
+
try:
|
| 10 |
+
os.makedirs(path)
|
| 11 |
+
except OSError as exc:
|
| 12 |
+
if not exist_ok or exc.errno != errno.EEXIST:
|
| 13 |
+
raise
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
# rely on compatibility behavior until mode considerations
|
| 17 |
+
# and exists_ok considerations are disentangled.
|
| 18 |
+
# See https://github.com/pypa/setuptools/pull/1083#issuecomment-315168663
|
| 19 |
+
needs_makedirs = (
|
| 20 |
+
six.PY2 or
|
| 21 |
+
(3, 4) <= sys.version_info < (3, 4, 1)
|
| 22 |
+
)
|
| 23 |
+
makedirs = _makedirs_31 if needs_makedirs else os.makedirs
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__init__.py
ADDED
|
@@ -0,0 +1,328 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# module pyparsing.py
|
| 2 |
+
#
|
| 3 |
+
# Copyright (c) 2003-2021 Paul T. McGuire
|
| 4 |
+
#
|
| 5 |
+
# Permission is hereby granted, free of charge, to any person obtaining
|
| 6 |
+
# a copy of this software and associated documentation files (the
|
| 7 |
+
# "Software"), to deal in the Software without restriction, including
|
| 8 |
+
# without limitation the rights to use, copy, modify, merge, publish,
|
| 9 |
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
| 10 |
+
# permit persons to whom the Software is furnished to do so, subject to
|
| 11 |
+
# the following conditions:
|
| 12 |
+
#
|
| 13 |
+
# The above copyright notice and this permission notice shall be
|
| 14 |
+
# included in all copies or substantial portions of the Software.
|
| 15 |
+
#
|
| 16 |
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 17 |
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 18 |
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
| 19 |
+
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
| 20 |
+
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
| 21 |
+
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
| 22 |
+
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 23 |
+
#
|
| 24 |
+
|
| 25 |
+
__doc__ = """
|
| 26 |
+
pyparsing module - Classes and methods to define and execute parsing grammars
|
| 27 |
+
=============================================================================
|
| 28 |
+
|
| 29 |
+
The pyparsing module is an alternative approach to creating and
|
| 30 |
+
executing simple grammars, vs. the traditional lex/yacc approach, or the
|
| 31 |
+
use of regular expressions. With pyparsing, you don't need to learn
|
| 32 |
+
a new syntax for defining grammars or matching expressions - the parsing
|
| 33 |
+
module provides a library of classes that you use to construct the
|
| 34 |
+
grammar directly in Python.
|
| 35 |
+
|
| 36 |
+
Here is a program to parse "Hello, World!" (or any greeting of the form
|
| 37 |
+
``"<salutation>, <addressee>!"``), built up using :class:`Word`,
|
| 38 |
+
:class:`Literal`, and :class:`And` elements
|
| 39 |
+
(the :meth:`'+'<ParserElement.__add__>` operators create :class:`And` expressions,
|
| 40 |
+
and the strings are auto-converted to :class:`Literal` expressions)::
|
| 41 |
+
|
| 42 |
+
from pip._vendor.pyparsing import Word, alphas
|
| 43 |
+
|
| 44 |
+
# define grammar of a greeting
|
| 45 |
+
greet = Word(alphas) + "," + Word(alphas) + "!"
|
| 46 |
+
|
| 47 |
+
hello = "Hello, World!"
|
| 48 |
+
print(hello, "->", greet.parse_string(hello))
|
| 49 |
+
|
| 50 |
+
The program outputs the following::
|
| 51 |
+
|
| 52 |
+
Hello, World! -> ['Hello', ',', 'World', '!']
|
| 53 |
+
|
| 54 |
+
The Python representation of the grammar is quite readable, owing to the
|
| 55 |
+
self-explanatory class names, and the use of :class:`'+'<And>`,
|
| 56 |
+
:class:`'|'<MatchFirst>`, :class:`'^'<Or>` and :class:`'&'<Each>` operators.
|
| 57 |
+
|
| 58 |
+
The :class:`ParseResults` object returned from
|
| 59 |
+
:class:`ParserElement.parseString` can be
|
| 60 |
+
accessed as a nested list, a dictionary, or an object with named
|
| 61 |
+
attributes.
|
| 62 |
+
|
| 63 |
+
The pyparsing module handles some of the problems that are typically
|
| 64 |
+
vexing when writing text parsers:
|
| 65 |
+
|
| 66 |
+
- extra or missing whitespace (the above program will also handle
|
| 67 |
+
"Hello,World!", "Hello , World !", etc.)
|
| 68 |
+
- quoted strings
|
| 69 |
+
- embedded comments
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
Getting Started -
|
| 73 |
+
-----------------
|
| 74 |
+
Visit the classes :class:`ParserElement` and :class:`ParseResults` to
|
| 75 |
+
see the base classes that most other pyparsing
|
| 76 |
+
classes inherit from. Use the docstrings for examples of how to:
|
| 77 |
+
|
| 78 |
+
- construct literal match expressions from :class:`Literal` and
|
| 79 |
+
:class:`CaselessLiteral` classes
|
| 80 |
+
- construct character word-group expressions using the :class:`Word`
|
| 81 |
+
class
|
| 82 |
+
- see how to create repetitive expressions using :class:`ZeroOrMore`
|
| 83 |
+
and :class:`OneOrMore` classes
|
| 84 |
+
- use :class:`'+'<And>`, :class:`'|'<MatchFirst>`, :class:`'^'<Or>`,
|
| 85 |
+
and :class:`'&'<Each>` operators to combine simple expressions into
|
| 86 |
+
more complex ones
|
| 87 |
+
- associate names with your parsed results using
|
| 88 |
+
:class:`ParserElement.setResultsName`
|
| 89 |
+
- access the parsed data, which is returned as a :class:`ParseResults`
|
| 90 |
+
object
|
| 91 |
+
- find some helpful expression short-cuts like :class:`delimitedList`
|
| 92 |
+
and :class:`oneOf`
|
| 93 |
+
- find more useful common expressions in the :class:`pyparsing_common`
|
| 94 |
+
namespace class
|
| 95 |
+
"""
|
| 96 |
+
from typing import NamedTuple
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
class version_info(NamedTuple):
|
| 100 |
+
major: int
|
| 101 |
+
minor: int
|
| 102 |
+
micro: int
|
| 103 |
+
releaselevel: str
|
| 104 |
+
serial: int
|
| 105 |
+
|
| 106 |
+
@property
|
| 107 |
+
def __version__(self):
|
| 108 |
+
return "{}.{}.{}".format(self.major, self.minor, self.micro) + (
|
| 109 |
+
"{}{}{}".format(
|
| 110 |
+
"r" if self.releaselevel[0] == "c" else "",
|
| 111 |
+
self.releaselevel[0],
|
| 112 |
+
self.serial,
|
| 113 |
+
),
|
| 114 |
+
"",
|
| 115 |
+
)[self.releaselevel == "final"]
|
| 116 |
+
|
| 117 |
+
def __str__(self):
|
| 118 |
+
return "{} {} / {}".format(__name__, self.__version__, __version_time__)
|
| 119 |
+
|
| 120 |
+
def __repr__(self):
|
| 121 |
+
return "{}.{}({})".format(
|
| 122 |
+
__name__,
|
| 123 |
+
type(self).__name__,
|
| 124 |
+
", ".join("{}={!r}".format(*nv) for nv in zip(self._fields, self)),
|
| 125 |
+
)
|
| 126 |
+
|
| 127 |
+
|
| 128 |
+
__version_info__ = version_info(3, 0, 7, "final", 0)
|
| 129 |
+
__version_time__ = "15 Jan 2022 04:10 UTC"
|
| 130 |
+
__version__ = __version_info__.__version__
|
| 131 |
+
__versionTime__ = __version_time__
|
| 132 |
+
__author__ = "Paul McGuire <ptmcg.gm+pyparsing@gmail.com>"
|
| 133 |
+
|
| 134 |
+
from .util import *
|
| 135 |
+
from .exceptions import *
|
| 136 |
+
from .actions import *
|
| 137 |
+
from .core import __diag__, __compat__
|
| 138 |
+
from .results import *
|
| 139 |
+
from .core import *
|
| 140 |
+
from .core import _builtin_exprs as core_builtin_exprs
|
| 141 |
+
from .helpers import *
|
| 142 |
+
from .helpers import _builtin_exprs as helper_builtin_exprs
|
| 143 |
+
|
| 144 |
+
from .unicode import unicode_set, UnicodeRangeList, pyparsing_unicode as unicode
|
| 145 |
+
from .testing import pyparsing_test as testing
|
| 146 |
+
from .common import (
|
| 147 |
+
pyparsing_common as common,
|
| 148 |
+
_builtin_exprs as common_builtin_exprs,
|
| 149 |
+
)
|
| 150 |
+
|
| 151 |
+
# define backward compat synonyms
|
| 152 |
+
if "pyparsing_unicode" not in globals():
|
| 153 |
+
pyparsing_unicode = unicode
|
| 154 |
+
if "pyparsing_common" not in globals():
|
| 155 |
+
pyparsing_common = common
|
| 156 |
+
if "pyparsing_test" not in globals():
|
| 157 |
+
pyparsing_test = testing
|
| 158 |
+
|
| 159 |
+
core_builtin_exprs += common_builtin_exprs + helper_builtin_exprs
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
__all__ = [
|
| 163 |
+
"__version__",
|
| 164 |
+
"__version_time__",
|
| 165 |
+
"__author__",
|
| 166 |
+
"__compat__",
|
| 167 |
+
"__diag__",
|
| 168 |
+
"And",
|
| 169 |
+
"AtLineStart",
|
| 170 |
+
"AtStringStart",
|
| 171 |
+
"CaselessKeyword",
|
| 172 |
+
"CaselessLiteral",
|
| 173 |
+
"CharsNotIn",
|
| 174 |
+
"Combine",
|
| 175 |
+
"Dict",
|
| 176 |
+
"Each",
|
| 177 |
+
"Empty",
|
| 178 |
+
"FollowedBy",
|
| 179 |
+
"Forward",
|
| 180 |
+
"GoToColumn",
|
| 181 |
+
"Group",
|
| 182 |
+
"IndentedBlock",
|
| 183 |
+
"Keyword",
|
| 184 |
+
"LineEnd",
|
| 185 |
+
"LineStart",
|
| 186 |
+
"Literal",
|
| 187 |
+
"Located",
|
| 188 |
+
"PrecededBy",
|
| 189 |
+
"MatchFirst",
|
| 190 |
+
"NoMatch",
|
| 191 |
+
"NotAny",
|
| 192 |
+
"OneOrMore",
|
| 193 |
+
"OnlyOnce",
|
| 194 |
+
"OpAssoc",
|
| 195 |
+
"Opt",
|
| 196 |
+
"Optional",
|
| 197 |
+
"Or",
|
| 198 |
+
"ParseBaseException",
|
| 199 |
+
"ParseElementEnhance",
|
| 200 |
+
"ParseException",
|
| 201 |
+
"ParseExpression",
|
| 202 |
+
"ParseFatalException",
|
| 203 |
+
"ParseResults",
|
| 204 |
+
"ParseSyntaxException",
|
| 205 |
+
"ParserElement",
|
| 206 |
+
"PositionToken",
|
| 207 |
+
"QuotedString",
|
| 208 |
+
"RecursiveGrammarException",
|
| 209 |
+
"Regex",
|
| 210 |
+
"SkipTo",
|
| 211 |
+
"StringEnd",
|
| 212 |
+
"StringStart",
|
| 213 |
+
"Suppress",
|
| 214 |
+
"Token",
|
| 215 |
+
"TokenConverter",
|
| 216 |
+
"White",
|
| 217 |
+
"Word",
|
| 218 |
+
"WordEnd",
|
| 219 |
+
"WordStart",
|
| 220 |
+
"ZeroOrMore",
|
| 221 |
+
"Char",
|
| 222 |
+
"alphanums",
|
| 223 |
+
"alphas",
|
| 224 |
+
"alphas8bit",
|
| 225 |
+
"any_close_tag",
|
| 226 |
+
"any_open_tag",
|
| 227 |
+
"c_style_comment",
|
| 228 |
+
"col",
|
| 229 |
+
"common_html_entity",
|
| 230 |
+
"counted_array",
|
| 231 |
+
"cpp_style_comment",
|
| 232 |
+
"dbl_quoted_string",
|
| 233 |
+
"dbl_slash_comment",
|
| 234 |
+
"delimited_list",
|
| 235 |
+
"dict_of",
|
| 236 |
+
"empty",
|
| 237 |
+
"hexnums",
|
| 238 |
+
"html_comment",
|
| 239 |
+
"identchars",
|
| 240 |
+
"identbodychars",
|
| 241 |
+
"java_style_comment",
|
| 242 |
+
"line",
|
| 243 |
+
"line_end",
|
| 244 |
+
"line_start",
|
| 245 |
+
"lineno",
|
| 246 |
+
"make_html_tags",
|
| 247 |
+
"make_xml_tags",
|
| 248 |
+
"match_only_at_col",
|
| 249 |
+
"match_previous_expr",
|
| 250 |
+
"match_previous_literal",
|
| 251 |
+
"nested_expr",
|
| 252 |
+
"null_debug_action",
|
| 253 |
+
"nums",
|
| 254 |
+
"one_of",
|
| 255 |
+
"printables",
|
| 256 |
+
"punc8bit",
|
| 257 |
+
"python_style_comment",
|
| 258 |
+
"quoted_string",
|
| 259 |
+
"remove_quotes",
|
| 260 |
+
"replace_with",
|
| 261 |
+
"replace_html_entity",
|
| 262 |
+
"rest_of_line",
|
| 263 |
+
"sgl_quoted_string",
|
| 264 |
+
"srange",
|
| 265 |
+
"string_end",
|
| 266 |
+
"string_start",
|
| 267 |
+
"trace_parse_action",
|
| 268 |
+
"unicode_string",
|
| 269 |
+
"with_attribute",
|
| 270 |
+
"indentedBlock",
|
| 271 |
+
"original_text_for",
|
| 272 |
+
"ungroup",
|
| 273 |
+
"infix_notation",
|
| 274 |
+
"locatedExpr",
|
| 275 |
+
"with_class",
|
| 276 |
+
"CloseMatch",
|
| 277 |
+
"token_map",
|
| 278 |
+
"pyparsing_common",
|
| 279 |
+
"pyparsing_unicode",
|
| 280 |
+
"unicode_set",
|
| 281 |
+
"condition_as_parse_action",
|
| 282 |
+
"pyparsing_test",
|
| 283 |
+
# pre-PEP8 compatibility names
|
| 284 |
+
"__versionTime__",
|
| 285 |
+
"anyCloseTag",
|
| 286 |
+
"anyOpenTag",
|
| 287 |
+
"cStyleComment",
|
| 288 |
+
"commonHTMLEntity",
|
| 289 |
+
"countedArray",
|
| 290 |
+
"cppStyleComment",
|
| 291 |
+
"dblQuotedString",
|
| 292 |
+
"dblSlashComment",
|
| 293 |
+
"delimitedList",
|
| 294 |
+
"dictOf",
|
| 295 |
+
"htmlComment",
|
| 296 |
+
"javaStyleComment",
|
| 297 |
+
"lineEnd",
|
| 298 |
+
"lineStart",
|
| 299 |
+
"makeHTMLTags",
|
| 300 |
+
"makeXMLTags",
|
| 301 |
+
"matchOnlyAtCol",
|
| 302 |
+
"matchPreviousExpr",
|
| 303 |
+
"matchPreviousLiteral",
|
| 304 |
+
"nestedExpr",
|
| 305 |
+
"nullDebugAction",
|
| 306 |
+
"oneOf",
|
| 307 |
+
"opAssoc",
|
| 308 |
+
"pythonStyleComment",
|
| 309 |
+
"quotedString",
|
| 310 |
+
"removeQuotes",
|
| 311 |
+
"replaceHTMLEntity",
|
| 312 |
+
"replaceWith",
|
| 313 |
+
"restOfLine",
|
| 314 |
+
"sglQuotedString",
|
| 315 |
+
"stringEnd",
|
| 316 |
+
"stringStart",
|
| 317 |
+
"traceParseAction",
|
| 318 |
+
"unicodeString",
|
| 319 |
+
"withAttribute",
|
| 320 |
+
"indentedBlock",
|
| 321 |
+
"originalTextFor",
|
| 322 |
+
"infixNotation",
|
| 323 |
+
"locatedExpr",
|
| 324 |
+
"withClass",
|
| 325 |
+
"tokenMap",
|
| 326 |
+
"conditionAsParseAction",
|
| 327 |
+
"autoname_elements",
|
| 328 |
+
]
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (7.13 kB). View file
|
|
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/actions.cpython-310.pyc
ADDED
|
Binary file (7.19 kB). View file
|
|
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/common.cpython-310.pyc
ADDED
|
Binary file (10.1 kB). View file
|
|
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/core.cpython-310.pyc
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d239c47f7cbcfdf266dccd2d792be78a67db53e8a2f242ecfcfcd81575b42cfa
|
| 3 |
+
size 175239
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/exceptions.cpython-310.pyc
ADDED
|
Binary file (9.08 kB). View file
|
|
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/helpers.cpython-310.pyc
ADDED
|
Binary file (34.8 kB). View file
|
|
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/results.cpython-310.pyc
ADDED
|
Binary file (24.8 kB). View file
|
|
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/testing.cpython-310.pyc
ADDED
|
Binary file (12.1 kB). View file
|
|
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/unicode.cpython-310.pyc
ADDED
|
Binary file (9.82 kB). View file
|
|
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/__pycache__/util.cpython-310.pyc
ADDED
|
Binary file (8.61 kB). View file
|
|
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/actions.py
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# actions.py
|
| 2 |
+
|
| 3 |
+
from .exceptions import ParseException
|
| 4 |
+
from .util import col
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
class OnlyOnce:
|
| 8 |
+
"""
|
| 9 |
+
Wrapper for parse actions, to ensure they are only called once.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
def __init__(self, method_call):
|
| 13 |
+
from .core import _trim_arity
|
| 14 |
+
|
| 15 |
+
self.callable = _trim_arity(method_call)
|
| 16 |
+
self.called = False
|
| 17 |
+
|
| 18 |
+
def __call__(self, s, l, t):
|
| 19 |
+
if not self.called:
|
| 20 |
+
results = self.callable(s, l, t)
|
| 21 |
+
self.called = True
|
| 22 |
+
return results
|
| 23 |
+
raise ParseException(s, l, "OnlyOnce obj called multiple times w/out reset")
|
| 24 |
+
|
| 25 |
+
def reset(self):
|
| 26 |
+
"""
|
| 27 |
+
Allow the associated parse action to be called once more.
|
| 28 |
+
"""
|
| 29 |
+
|
| 30 |
+
self.called = False
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
def match_only_at_col(n):
|
| 34 |
+
"""
|
| 35 |
+
Helper method for defining parse actions that require matching at
|
| 36 |
+
a specific column in the input text.
|
| 37 |
+
"""
|
| 38 |
+
|
| 39 |
+
def verify_col(strg, locn, toks):
|
| 40 |
+
if col(locn, strg) != n:
|
| 41 |
+
raise ParseException(strg, locn, "matched token not at column {}".format(n))
|
| 42 |
+
|
| 43 |
+
return verify_col
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
def replace_with(repl_str):
|
| 47 |
+
"""
|
| 48 |
+
Helper method for common parse actions that simply return
|
| 49 |
+
a literal value. Especially useful when used with
|
| 50 |
+
:class:`transform_string<ParserElement.transform_string>` ().
|
| 51 |
+
|
| 52 |
+
Example::
|
| 53 |
+
|
| 54 |
+
num = Word(nums).set_parse_action(lambda toks: int(toks[0]))
|
| 55 |
+
na = one_of("N/A NA").set_parse_action(replace_with(math.nan))
|
| 56 |
+
term = na | num
|
| 57 |
+
|
| 58 |
+
OneOrMore(term).parse_string("324 234 N/A 234") # -> [324, 234, nan, 234]
|
| 59 |
+
"""
|
| 60 |
+
return lambda s, l, t: [repl_str]
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
def remove_quotes(s, l, t):
|
| 64 |
+
"""
|
| 65 |
+
Helper parse action for removing quotation marks from parsed
|
| 66 |
+
quoted strings.
|
| 67 |
+
|
| 68 |
+
Example::
|
| 69 |
+
|
| 70 |
+
# by default, quotation marks are included in parsed results
|
| 71 |
+
quoted_string.parse_string("'Now is the Winter of our Discontent'") # -> ["'Now is the Winter of our Discontent'"]
|
| 72 |
+
|
| 73 |
+
# use remove_quotes to strip quotation marks from parsed results
|
| 74 |
+
quoted_string.set_parse_action(remove_quotes)
|
| 75 |
+
quoted_string.parse_string("'Now is the Winter of our Discontent'") # -> ["Now is the Winter of our Discontent"]
|
| 76 |
+
"""
|
| 77 |
+
return t[0][1:-1]
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
def with_attribute(*args, **attr_dict):
|
| 81 |
+
"""
|
| 82 |
+
Helper to create a validating parse action to be used with start
|
| 83 |
+
tags created with :class:`make_xml_tags` or
|
| 84 |
+
:class:`make_html_tags`. Use ``with_attribute`` to qualify
|
| 85 |
+
a starting tag with a required attribute value, to avoid false
|
| 86 |
+
matches on common tags such as ``<TD>`` or ``<DIV>``.
|
| 87 |
+
|
| 88 |
+
Call ``with_attribute`` with a series of attribute names and
|
| 89 |
+
values. Specify the list of filter attributes names and values as:
|
| 90 |
+
|
| 91 |
+
- keyword arguments, as in ``(align="right")``, or
|
| 92 |
+
- as an explicit dict with ``**`` operator, when an attribute
|
| 93 |
+
name is also a Python reserved word, as in ``**{"class":"Customer", "align":"right"}``
|
| 94 |
+
- a list of name-value tuples, as in ``(("ns1:class", "Customer"), ("ns2:align", "right"))``
|
| 95 |
+
|
| 96 |
+
For attribute names with a namespace prefix, you must use the second
|
| 97 |
+
form. Attribute names are matched insensitive to upper/lower case.
|
| 98 |
+
|
| 99 |
+
If just testing for ``class`` (with or without a namespace), use
|
| 100 |
+
:class:`with_class`.
|
| 101 |
+
|
| 102 |
+
To verify that the attribute exists, but without specifying a value,
|
| 103 |
+
pass ``with_attribute.ANY_VALUE`` as the value.
|
| 104 |
+
|
| 105 |
+
Example::
|
| 106 |
+
|
| 107 |
+
html = '''
|
| 108 |
+
<div>
|
| 109 |
+
Some text
|
| 110 |
+
<div type="grid">1 4 0 1 0</div>
|
| 111 |
+
<div type="graph">1,3 2,3 1,1</div>
|
| 112 |
+
<div>this has no type</div>
|
| 113 |
+
</div>
|
| 114 |
+
|
| 115 |
+
'''
|
| 116 |
+
div,div_end = make_html_tags("div")
|
| 117 |
+
|
| 118 |
+
# only match div tag having a type attribute with value "grid"
|
| 119 |
+
div_grid = div().set_parse_action(with_attribute(type="grid"))
|
| 120 |
+
grid_expr = div_grid + SkipTo(div | div_end)("body")
|
| 121 |
+
for grid_header in grid_expr.search_string(html):
|
| 122 |
+
print(grid_header.body)
|
| 123 |
+
|
| 124 |
+
# construct a match with any div tag having a type attribute, regardless of the value
|
| 125 |
+
div_any_type = div().set_parse_action(with_attribute(type=with_attribute.ANY_VALUE))
|
| 126 |
+
div_expr = div_any_type + SkipTo(div | div_end)("body")
|
| 127 |
+
for div_header in div_expr.search_string(html):
|
| 128 |
+
print(div_header.body)
|
| 129 |
+
|
| 130 |
+
prints::
|
| 131 |
+
|
| 132 |
+
1 4 0 1 0
|
| 133 |
+
|
| 134 |
+
1 4 0 1 0
|
| 135 |
+
1,3 2,3 1,1
|
| 136 |
+
"""
|
| 137 |
+
if args:
|
| 138 |
+
attrs = args[:]
|
| 139 |
+
else:
|
| 140 |
+
attrs = attr_dict.items()
|
| 141 |
+
attrs = [(k, v) for k, v in attrs]
|
| 142 |
+
|
| 143 |
+
def pa(s, l, tokens):
|
| 144 |
+
for attrName, attrValue in attrs:
|
| 145 |
+
if attrName not in tokens:
|
| 146 |
+
raise ParseException(s, l, "no matching attribute " + attrName)
|
| 147 |
+
if attrValue != with_attribute.ANY_VALUE and tokens[attrName] != attrValue:
|
| 148 |
+
raise ParseException(
|
| 149 |
+
s,
|
| 150 |
+
l,
|
| 151 |
+
"attribute {!r} has value {!r}, must be {!r}".format(
|
| 152 |
+
attrName, tokens[attrName], attrValue
|
| 153 |
+
),
|
| 154 |
+
)
|
| 155 |
+
|
| 156 |
+
return pa
|
| 157 |
+
|
| 158 |
+
|
| 159 |
+
with_attribute.ANY_VALUE = object()
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
def with_class(classname, namespace=""):
|
| 163 |
+
"""
|
| 164 |
+
Simplified version of :class:`with_attribute` when
|
| 165 |
+
matching on a div class - made difficult because ``class`` is
|
| 166 |
+
a reserved word in Python.
|
| 167 |
+
|
| 168 |
+
Example::
|
| 169 |
+
|
| 170 |
+
html = '''
|
| 171 |
+
<div>
|
| 172 |
+
Some text
|
| 173 |
+
<div class="grid">1 4 0 1 0</div>
|
| 174 |
+
<div class="graph">1,3 2,3 1,1</div>
|
| 175 |
+
<div>this <div> has no class</div>
|
| 176 |
+
</div>
|
| 177 |
+
|
| 178 |
+
'''
|
| 179 |
+
div,div_end = make_html_tags("div")
|
| 180 |
+
div_grid = div().set_parse_action(with_class("grid"))
|
| 181 |
+
|
| 182 |
+
grid_expr = div_grid + SkipTo(div | div_end)("body")
|
| 183 |
+
for grid_header in grid_expr.search_string(html):
|
| 184 |
+
print(grid_header.body)
|
| 185 |
+
|
| 186 |
+
div_any_type = div().set_parse_action(with_class(withAttribute.ANY_VALUE))
|
| 187 |
+
div_expr = div_any_type + SkipTo(div | div_end)("body")
|
| 188 |
+
for div_header in div_expr.search_string(html):
|
| 189 |
+
print(div_header.body)
|
| 190 |
+
|
| 191 |
+
prints::
|
| 192 |
+
|
| 193 |
+
1 4 0 1 0
|
| 194 |
+
|
| 195 |
+
1 4 0 1 0
|
| 196 |
+
1,3 2,3 1,1
|
| 197 |
+
"""
|
| 198 |
+
classattr = "{}:class".format(namespace) if namespace else "class"
|
| 199 |
+
return with_attribute(**{classattr: classname})
|
| 200 |
+
|
| 201 |
+
|
| 202 |
+
# pre-PEP8 compatibility symbols
|
| 203 |
+
replaceWith = replace_with
|
| 204 |
+
removeQuotes = remove_quotes
|
| 205 |
+
withAttribute = with_attribute
|
| 206 |
+
withClass = with_class
|
| 207 |
+
matchOnlyAtCol = match_only_at_col
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/common.py
ADDED
|
@@ -0,0 +1,424 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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ime import datetime
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
# some other useful expressions - using lower-case class name since we are really using this as a namespace
|
| 8 |
+
class pyparsing_common:
|
| 9 |
+
"""Here are some common low-level expressions that may be useful in
|
| 10 |
+
jump-starting parser development:
|
| 11 |
+
|
| 12 |
+
- numeric forms (:class:`integers<integer>`, :class:`reals<real>`,
|
| 13 |
+
:class:`scientific notation<sci_real>`)
|
| 14 |
+
- common :class:`programming identifiers<identifier>`
|
| 15 |
+
- network addresses (:class:`MAC<mac_address>`,
|
| 16 |
+
:class:`IPv4<ipv4_address>`, :class:`IPv6<ipv6_address>`)
|
| 17 |
+
- ISO8601 :class:`dates<iso8601_date>` and
|
| 18 |
+
:class:`datetime<iso8601_datetime>`
|
| 19 |
+
- :class:`UUID<uuid>`
|
| 20 |
+
- :class:`comma-separated list<comma_separated_list>`
|
| 21 |
+
- :class:`url`
|
| 22 |
+
|
| 23 |
+
Parse actions:
|
| 24 |
+
|
| 25 |
+
- :class:`convertToInteger`
|
| 26 |
+
- :class:`convertToFloat`
|
| 27 |
+
- :class:`convertToDate`
|
| 28 |
+
- :class:`convertToDatetime`
|
| 29 |
+
- :class:`stripHTMLTags`
|
| 30 |
+
- :class:`upcaseTokens`
|
| 31 |
+
- :class:`downcaseTokens`
|
| 32 |
+
|
| 33 |
+
Example::
|
| 34 |
+
|
| 35 |
+
pyparsing_common.number.runTests('''
|
| 36 |
+
# any int or real number, returned as the appropriate type
|
| 37 |
+
100
|
| 38 |
+
-100
|
| 39 |
+
+100
|
| 40 |
+
3.14159
|
| 41 |
+
6.02e23
|
| 42 |
+
1e-12
|
| 43 |
+
''')
|
| 44 |
+
|
| 45 |
+
pyparsing_common.fnumber.runTests('''
|
| 46 |
+
# any int or real number, returned as float
|
| 47 |
+
100
|
| 48 |
+
-100
|
| 49 |
+
+100
|
| 50 |
+
3.14159
|
| 51 |
+
6.02e23
|
| 52 |
+
1e-12
|
| 53 |
+
''')
|
| 54 |
+
|
| 55 |
+
pyparsing_common.hex_integer.runTests('''
|
| 56 |
+
# hex numbers
|
| 57 |
+
100
|
| 58 |
+
FF
|
| 59 |
+
''')
|
| 60 |
+
|
| 61 |
+
pyparsing_common.fraction.runTests('''
|
| 62 |
+
# fractions
|
| 63 |
+
1/2
|
| 64 |
+
-3/4
|
| 65 |
+
''')
|
| 66 |
+
|
| 67 |
+
pyparsing_common.mixed_integer.runTests('''
|
| 68 |
+
# mixed fractions
|
| 69 |
+
1
|
| 70 |
+
1/2
|
| 71 |
+
-3/4
|
| 72 |
+
1-3/4
|
| 73 |
+
''')
|
| 74 |
+
|
| 75 |
+
import uuid
|
| 76 |
+
pyparsing_common.uuid.setParseAction(tokenMap(uuid.UUID))
|
| 77 |
+
pyparsing_common.uuid.runTests('''
|
| 78 |
+
# uuid
|
| 79 |
+
12345678-1234-5678-1234-567812345678
|
| 80 |
+
''')
|
| 81 |
+
|
| 82 |
+
prints::
|
| 83 |
+
|
| 84 |
+
# any int or real number, returned as the appropriate type
|
| 85 |
+
100
|
| 86 |
+
[100]
|
| 87 |
+
|
| 88 |
+
-100
|
| 89 |
+
[-100]
|
| 90 |
+
|
| 91 |
+
+100
|
| 92 |
+
[100]
|
| 93 |
+
|
| 94 |
+
3.14159
|
| 95 |
+
[3.14159]
|
| 96 |
+
|
| 97 |
+
6.02e23
|
| 98 |
+
[6.02e+23]
|
| 99 |
+
|
| 100 |
+
1e-12
|
| 101 |
+
[1e-12]
|
| 102 |
+
|
| 103 |
+
# any int or real number, returned as float
|
| 104 |
+
100
|
| 105 |
+
[100.0]
|
| 106 |
+
|
| 107 |
+
-100
|
| 108 |
+
[-100.0]
|
| 109 |
+
|
| 110 |
+
+100
|
| 111 |
+
[100.0]
|
| 112 |
+
|
| 113 |
+
3.14159
|
| 114 |
+
[3.14159]
|
| 115 |
+
|
| 116 |
+
6.02e23
|
| 117 |
+
[6.02e+23]
|
| 118 |
+
|
| 119 |
+
1e-12
|
| 120 |
+
[1e-12]
|
| 121 |
+
|
| 122 |
+
# hex numbers
|
| 123 |
+
100
|
| 124 |
+
[256]
|
| 125 |
+
|
| 126 |
+
FF
|
| 127 |
+
[255]
|
| 128 |
+
|
| 129 |
+
# fractions
|
| 130 |
+
1/2
|
| 131 |
+
[0.5]
|
| 132 |
+
|
| 133 |
+
-3/4
|
| 134 |
+
[-0.75]
|
| 135 |
+
|
| 136 |
+
# mixed fractions
|
| 137 |
+
1
|
| 138 |
+
[1]
|
| 139 |
+
|
| 140 |
+
1/2
|
| 141 |
+
[0.5]
|
| 142 |
+
|
| 143 |
+
-3/4
|
| 144 |
+
[-0.75]
|
| 145 |
+
|
| 146 |
+
1-3/4
|
| 147 |
+
[1.75]
|
| 148 |
+
|
| 149 |
+
# uuid
|
| 150 |
+
12345678-1234-5678-1234-567812345678
|
| 151 |
+
[UUID('12345678-1234-5678-1234-567812345678')]
|
| 152 |
+
"""
|
| 153 |
+
|
| 154 |
+
convert_to_integer = token_map(int)
|
| 155 |
+
"""
|
| 156 |
+
Parse action for converting parsed integers to Python int
|
| 157 |
+
"""
|
| 158 |
+
|
| 159 |
+
convert_to_float = token_map(float)
|
| 160 |
+
"""
|
| 161 |
+
Parse action for converting parsed numbers to Python float
|
| 162 |
+
"""
|
| 163 |
+
|
| 164 |
+
integer = Word(nums).set_name("integer").set_parse_action(convert_to_integer)
|
| 165 |
+
"""expression that parses an unsigned integer, returns an int"""
|
| 166 |
+
|
| 167 |
+
hex_integer = (
|
| 168 |
+
Word(hexnums).set_name("hex integer").set_parse_action(token_map(int, 16))
|
| 169 |
+
)
|
| 170 |
+
"""expression that parses a hexadecimal integer, returns an int"""
|
| 171 |
+
|
| 172 |
+
signed_integer = (
|
| 173 |
+
Regex(r"[+-]?\d+")
|
| 174 |
+
.set_name("signed integer")
|
| 175 |
+
.set_parse_action(convert_to_integer)
|
| 176 |
+
)
|
| 177 |
+
"""expression that parses an integer with optional leading sign, returns an int"""
|
| 178 |
+
|
| 179 |
+
fraction = (
|
| 180 |
+
signed_integer().set_parse_action(convert_to_float)
|
| 181 |
+
+ "/"
|
| 182 |
+
+ signed_integer().set_parse_action(convert_to_float)
|
| 183 |
+
).set_name("fraction")
|
| 184 |
+
"""fractional expression of an integer divided by an integer, returns a float"""
|
| 185 |
+
fraction.add_parse_action(lambda tt: tt[0] / tt[-1])
|
| 186 |
+
|
| 187 |
+
mixed_integer = (
|
| 188 |
+
fraction | signed_integer + Opt(Opt("-").suppress() + fraction)
|
| 189 |
+
).set_name("fraction or mixed integer-fraction")
|
| 190 |
+
"""mixed integer of the form 'integer - fraction', with optional leading integer, returns float"""
|
| 191 |
+
mixed_integer.add_parse_action(sum)
|
| 192 |
+
|
| 193 |
+
real = (
|
| 194 |
+
Regex(r"[+-]?(?:\d+\.\d*|\.\d+)")
|
| 195 |
+
.set_name("real number")
|
| 196 |
+
.set_parse_action(convert_to_float)
|
| 197 |
+
)
|
| 198 |
+
"""expression that parses a floating point number and returns a float"""
|
| 199 |
+
|
| 200 |
+
sci_real = (
|
| 201 |
+
Regex(r"[+-]?(?:\d+(?:[eE][+-]?\d+)|(?:\d+\.\d*|\.\d+)(?:[eE][+-]?\d+)?)")
|
| 202 |
+
.set_name("real number with scientific notation")
|
| 203 |
+
.set_parse_action(convert_to_float)
|
| 204 |
+
)
|
| 205 |
+
"""expression that parses a floating point number with optional
|
| 206 |
+
scientific notation and returns a float"""
|
| 207 |
+
|
| 208 |
+
# streamlining this expression makes the docs nicer-looking
|
| 209 |
+
number = (sci_real | real | signed_integer).setName("number").streamline()
|
| 210 |
+
"""any numeric expression, returns the corresponding Python type"""
|
| 211 |
+
|
| 212 |
+
fnumber = (
|
| 213 |
+
Regex(r"[+-]?\d+\.?\d*([eE][+-]?\d+)?")
|
| 214 |
+
.set_name("fnumber")
|
| 215 |
+
.set_parse_action(convert_to_float)
|
| 216 |
+
)
|
| 217 |
+
"""any int or real number, returned as float"""
|
| 218 |
+
|
| 219 |
+
identifier = Word(identchars, identbodychars).set_name("identifier")
|
| 220 |
+
"""typical code identifier (leading alpha or '_', followed by 0 or more alphas, nums, or '_')"""
|
| 221 |
+
|
| 222 |
+
ipv4_address = Regex(
|
| 223 |
+
r"(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}"
|
| 224 |
+
).set_name("IPv4 address")
|
| 225 |
+
"IPv4 address (``0.0.0.0 - 255.255.255.255``)"
|
| 226 |
+
|
| 227 |
+
_ipv6_part = Regex(r"[0-9a-fA-F]{1,4}").set_name("hex_integer")
|
| 228 |
+
_full_ipv6_address = (_ipv6_part + (":" + _ipv6_part) * 7).set_name(
|
| 229 |
+
"full IPv6 address"
|
| 230 |
+
)
|
| 231 |
+
_short_ipv6_address = (
|
| 232 |
+
Opt(_ipv6_part + (":" + _ipv6_part) * (0, 6))
|
| 233 |
+
+ "::"
|
| 234 |
+
+ Opt(_ipv6_part + (":" + _ipv6_part) * (0, 6))
|
| 235 |
+
).set_name("short IPv6 address")
|
| 236 |
+
_short_ipv6_address.add_condition(
|
| 237 |
+
lambda t: sum(1 for tt in t if pyparsing_common._ipv6_part.matches(tt)) < 8
|
| 238 |
+
)
|
| 239 |
+
_mixed_ipv6_address = ("::ffff:" + ipv4_address).set_name("mixed IPv6 address")
|
| 240 |
+
ipv6_address = Combine(
|
| 241 |
+
(_full_ipv6_address | _mixed_ipv6_address | _short_ipv6_address).set_name(
|
| 242 |
+
"IPv6 address"
|
| 243 |
+
)
|
| 244 |
+
).set_name("IPv6 address")
|
| 245 |
+
"IPv6 address (long, short, or mixed form)"
|
| 246 |
+
|
| 247 |
+
mac_address = Regex(
|
| 248 |
+
r"[0-9a-fA-F]{2}([:.-])[0-9a-fA-F]{2}(?:\1[0-9a-fA-F]{2}){4}"
|
| 249 |
+
).set_name("MAC address")
|
| 250 |
+
"MAC address xx:xx:xx:xx:xx (may also have '-' or '.' delimiters)"
|
| 251 |
+
|
| 252 |
+
@staticmethod
|
| 253 |
+
def convert_to_date(fmt: str = "%Y-%m-%d"):
|
| 254 |
+
"""
|
| 255 |
+
Helper to create a parse action for converting parsed date string to Python datetime.date
|
| 256 |
+
|
| 257 |
+
Params -
|
| 258 |
+
- fmt - format to be passed to datetime.strptime (default= ``"%Y-%m-%d"``)
|
| 259 |
+
|
| 260 |
+
Example::
|
| 261 |
+
|
| 262 |
+
date_expr = pyparsing_common.iso8601_date.copy()
|
| 263 |
+
date_expr.setParseAction(pyparsing_common.convertToDate())
|
| 264 |
+
print(date_expr.parseString("1999-12-31"))
|
| 265 |
+
|
| 266 |
+
prints::
|
| 267 |
+
|
| 268 |
+
[datetime.date(1999, 12, 31)]
|
| 269 |
+
"""
|
| 270 |
+
|
| 271 |
+
def cvt_fn(ss, ll, tt):
|
| 272 |
+
try:
|
| 273 |
+
return datetime.strptime(tt[0], fmt).date()
|
| 274 |
+
except ValueError as ve:
|
| 275 |
+
raise ParseException(ss, ll, str(ve))
|
| 276 |
+
|
| 277 |
+
return cvt_fn
|
| 278 |
+
|
| 279 |
+
@staticmethod
|
| 280 |
+
def convert_to_datetime(fmt: str = "%Y-%m-%dT%H:%M:%S.%f"):
|
| 281 |
+
"""Helper to create a parse action for converting parsed
|
| 282 |
+
datetime string to Python datetime.datetime
|
| 283 |
+
|
| 284 |
+
Params -
|
| 285 |
+
- fmt - format to be passed to datetime.strptime (default= ``"%Y-%m-%dT%H:%M:%S.%f"``)
|
| 286 |
+
|
| 287 |
+
Example::
|
| 288 |
+
|
| 289 |
+
dt_expr = pyparsing_common.iso8601_datetime.copy()
|
| 290 |
+
dt_expr.setParseAction(pyparsing_common.convertToDatetime())
|
| 291 |
+
print(dt_expr.parseString("1999-12-31T23:59:59.999"))
|
| 292 |
+
|
| 293 |
+
prints::
|
| 294 |
+
|
| 295 |
+
[datetime.datetime(1999, 12, 31, 23, 59, 59, 999000)]
|
| 296 |
+
"""
|
| 297 |
+
|
| 298 |
+
def cvt_fn(s, l, t):
|
| 299 |
+
try:
|
| 300 |
+
return datetime.strptime(t[0], fmt)
|
| 301 |
+
except ValueError as ve:
|
| 302 |
+
raise ParseException(s, l, str(ve))
|
| 303 |
+
|
| 304 |
+
return cvt_fn
|
| 305 |
+
|
| 306 |
+
iso8601_date = Regex(
|
| 307 |
+
r"(?P<year>\d{4})(?:-(?P<month>\d\d)(?:-(?P<day>\d\d))?)?"
|
| 308 |
+
).set_name("ISO8601 date")
|
| 309 |
+
"ISO8601 date (``yyyy-mm-dd``)"
|
| 310 |
+
|
| 311 |
+
iso8601_datetime = Regex(
|
| 312 |
+
r"(?P<year>\d{4})-(?P<month>\d\d)-(?P<day>\d\d)[T ](?P<hour>\d\d):(?P<minute>\d\d)(:(?P<second>\d\d(\.\d*)?)?)?(?P<tz>Z|[+-]\d\d:?\d\d)?"
|
| 313 |
+
).set_name("ISO8601 datetime")
|
| 314 |
+
"ISO8601 datetime (``yyyy-mm-ddThh:mm:ss.s(Z|+-00:00)``) - trailing seconds, milliseconds, and timezone optional; accepts separating ``'T'`` or ``' '``"
|
| 315 |
+
|
| 316 |
+
uuid = Regex(r"[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}").set_name("UUID")
|
| 317 |
+
"UUID (``xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx``)"
|
| 318 |
+
|
| 319 |
+
_html_stripper = any_open_tag.suppress() | any_close_tag.suppress()
|
| 320 |
+
|
| 321 |
+
@staticmethod
|
| 322 |
+
def strip_html_tags(s: str, l: int, tokens: ParseResults):
|
| 323 |
+
"""Parse action to remove HTML tags from web page HTML source
|
| 324 |
+
|
| 325 |
+
Example::
|
| 326 |
+
|
| 327 |
+
# strip HTML links from normal text
|
| 328 |
+
text = '<td>More info at the <a href="https://github.com/pyparsing/pyparsing/wiki">pyparsing</a> wiki page</td>'
|
| 329 |
+
td, td_end = makeHTMLTags("TD")
|
| 330 |
+
table_text = td + SkipTo(td_end).setParseAction(pyparsing_common.stripHTMLTags)("body") + td_end
|
| 331 |
+
print(table_text.parseString(text).body)
|
| 332 |
+
|
| 333 |
+
Prints::
|
| 334 |
+
|
| 335 |
+
More info at the pyparsing wiki page
|
| 336 |
+
"""
|
| 337 |
+
return pyparsing_common._html_stripper.transform_string(tokens[0])
|
| 338 |
+
|
| 339 |
+
_commasepitem = (
|
| 340 |
+
Combine(
|
| 341 |
+
OneOrMore(
|
| 342 |
+
~Literal(",")
|
| 343 |
+
+ ~LineEnd()
|
| 344 |
+
+ Word(printables, exclude_chars=",")
|
| 345 |
+
+ Opt(White(" \t") + ~FollowedBy(LineEnd() | ","))
|
| 346 |
+
)
|
| 347 |
+
)
|
| 348 |
+
.streamline()
|
| 349 |
+
.set_name("commaItem")
|
| 350 |
+
)
|
| 351 |
+
comma_separated_list = delimited_list(
|
| 352 |
+
Opt(quoted_string.copy() | _commasepitem, default="")
|
| 353 |
+
).set_name("comma separated list")
|
| 354 |
+
"""Predefined expression of 1 or more printable words or quoted strings, separated by commas."""
|
| 355 |
+
|
| 356 |
+
upcase_tokens = staticmethod(token_map(lambda t: t.upper()))
|
| 357 |
+
"""Parse action to convert tokens to upper case."""
|
| 358 |
+
|
| 359 |
+
downcase_tokens = staticmethod(token_map(lambda t: t.lower()))
|
| 360 |
+
"""Parse action to convert tokens to lower case."""
|
| 361 |
+
|
| 362 |
+
# fmt: off
|
| 363 |
+
url = Regex(
|
| 364 |
+
# https://mathiasbynens.be/demo/url-regex
|
| 365 |
+
# https://gist.github.com/dperini/729294
|
| 366 |
+
r"^" +
|
| 367 |
+
# protocol identifier (optional)
|
| 368 |
+
# short syntax // still required
|
| 369 |
+
r"(?:(?:(?P<scheme>https?|ftp):)?\/\/)" +
|
| 370 |
+
# user:pass BasicAuth (optional)
|
| 371 |
+
r"(?:(?P<auth>\S+(?::\S*)?)@)?" +
|
| 372 |
+
r"(?P<host>" +
|
| 373 |
+
# IP address exclusion
|
| 374 |
+
# private & local networks
|
| 375 |
+
r"(?!(?:10|127)(?:\.\d{1,3}){3})" +
|
| 376 |
+
r"(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})" +
|
| 377 |
+
r"(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})" +
|
| 378 |
+
# IP address dotted notation octets
|
| 379 |
+
# excludes loopback network 0.0.0.0
|
| 380 |
+
# excludes reserved space >= 224.0.0.0
|
| 381 |
+
# excludes network & broadcast addresses
|
| 382 |
+
# (first & last IP address of each class)
|
| 383 |
+
r"(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])" +
|
| 384 |
+
r"(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}" +
|
| 385 |
+
r"(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))" +
|
| 386 |
+
r"|" +
|
| 387 |
+
# host & domain names, may end with dot
|
| 388 |
+
# can be replaced by a shortest alternative
|
| 389 |
+
# (?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.)+
|
| 390 |
+
r"(?:" +
|
| 391 |
+
r"(?:" +
|
| 392 |
+
r"[a-z0-9\u00a1-\uffff]" +
|
| 393 |
+
r"[a-z0-9\u00a1-\uffff_-]{0,62}" +
|
| 394 |
+
r")?" +
|
| 395 |
+
r"[a-z0-9\u00a1-\uffff]\." +
|
| 396 |
+
r")+" +
|
| 397 |
+
# TLD identifier name, may end with dot
|
| 398 |
+
r"(?:[a-z\u00a1-\uffff]{2,}\.?)" +
|
| 399 |
+
r")" +
|
| 400 |
+
# port number (optional)
|
| 401 |
+
r"(:(?P<port>\d{2,5}))?" +
|
| 402 |
+
# resource path (optional)
|
| 403 |
+
r"(?P<path>\/[^?# ]*)?" +
|
| 404 |
+
# query string (optional)
|
| 405 |
+
r"(\?(?P<query>[^#]*))?" +
|
| 406 |
+
# fragment (optional)
|
| 407 |
+
r"(#(?P<fragment>\S*))?" +
|
| 408 |
+
r"$"
|
| 409 |
+
).set_name("url")
|
| 410 |
+
# fmt: on
|
| 411 |
+
|
| 412 |
+
# pre-PEP8 compatibility names
|
| 413 |
+
convertToInteger = convert_to_integer
|
| 414 |
+
convertToFloat = convert_to_float
|
| 415 |
+
convertToDate = convert_to_date
|
| 416 |
+
convertToDatetime = convert_to_datetime
|
| 417 |
+
stripHTMLTags = strip_html_tags
|
| 418 |
+
upcaseTokens = upcase_tokens
|
| 419 |
+
downcaseTokens = downcase_tokens
|
| 420 |
+
|
| 421 |
+
|
| 422 |
+
_builtin_exprs = [
|
| 423 |
+
v for v in vars(pyparsing_common).values() if isinstance(v, ParserElement)
|
| 424 |
+
]
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/core.py
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/diagram/__init__.py
ADDED
|
@@ -0,0 +1,593 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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generic,
|
| 9 |
+
TypeVar,
|
| 10 |
+
Dict,
|
| 11 |
+
Callable,
|
| 12 |
+
Set,
|
| 13 |
+
Iterable,
|
| 14 |
+
)
|
| 15 |
+
from jinja2 import Template
|
| 16 |
+
from io import StringIO
|
| 17 |
+
import inspect
|
| 18 |
+
|
| 19 |
+
with open(resource_filename(__name__, "template.jinja2"), encoding="utf-8") as fp:
|
| 20 |
+
template = Template(fp.read())
|
| 21 |
+
|
| 22 |
+
# Note: ideally this would be a dataclass, but we're supporting Python 3.5+ so we can't do this yet
|
| 23 |
+
NamedDiagram = NamedTuple(
|
| 24 |
+
"NamedDiagram",
|
| 25 |
+
[("name", str), ("diagram", Optional[railroad.DiagramItem]), ("index", int)],
|
| 26 |
+
)
|
| 27 |
+
"""
|
| 28 |
+
A simple structure for associating a name with a railroad diagram
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
T = TypeVar("T")
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
class EachItem(railroad.Group):
|
| 35 |
+
"""
|
| 36 |
+
Custom railroad item to compose a:
|
| 37 |
+
- Group containing a
|
| 38 |
+
- OneOrMore containing a
|
| 39 |
+
- Choice of the elements in the Each
|
| 40 |
+
with the group label indicating that all must be matched
|
| 41 |
+
"""
|
| 42 |
+
|
| 43 |
+
all_label = "[ALL]"
|
| 44 |
+
|
| 45 |
+
def __init__(self, *items):
|
| 46 |
+
choice_item = railroad.Choice(len(items) - 1, *items)
|
| 47 |
+
one_or_more_item = railroad.OneOrMore(item=choice_item)
|
| 48 |
+
super().__init__(one_or_more_item, label=self.all_label)
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
class AnnotatedItem(railroad.Group):
|
| 52 |
+
"""
|
| 53 |
+
Simple subclass of Group that creates an annotation label
|
| 54 |
+
"""
|
| 55 |
+
|
| 56 |
+
def __init__(self, label: str, item):
|
| 57 |
+
super().__init__(item=item, label="[{}]".format(label))
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
class EditablePartial(Generic[T]):
|
| 61 |
+
"""
|
| 62 |
+
Acts like a functools.partial, but can be edited. In other words, it represents a type that hasn't yet been
|
| 63 |
+
constructed.
|
| 64 |
+
"""
|
| 65 |
+
|
| 66 |
+
# We need this here because the railroad constructors actually transform the data, so can't be called until the
|
| 67 |
+
# entire tree is assembled
|
| 68 |
+
|
| 69 |
+
def __init__(self, func: Callable[..., T], args: list, kwargs: dict):
|
| 70 |
+
self.func = func
|
| 71 |
+
self.args = args
|
| 72 |
+
self.kwargs = kwargs
|
| 73 |
+
|
| 74 |
+
@classmethod
|
| 75 |
+
def from_call(cls, func: Callable[..., T], *args, **kwargs) -> "EditablePartial[T]":
|
| 76 |
+
"""
|
| 77 |
+
If you call this function in the same way that you would call the constructor, it will store the arguments
|
| 78 |
+
as you expect. For example EditablePartial.from_call(Fraction, 1, 3)() == Fraction(1, 3)
|
| 79 |
+
"""
|
| 80 |
+
return EditablePartial(func=func, args=list(args), kwargs=kwargs)
|
| 81 |
+
|
| 82 |
+
@property
|
| 83 |
+
def name(self):
|
| 84 |
+
return self.kwargs["name"]
|
| 85 |
+
|
| 86 |
+
def __call__(self) -> T:
|
| 87 |
+
"""
|
| 88 |
+
Evaluate the partial and return the result
|
| 89 |
+
"""
|
| 90 |
+
args = self.args.copy()
|
| 91 |
+
kwargs = self.kwargs.copy()
|
| 92 |
+
|
| 93 |
+
# This is a helpful hack to allow you to specify varargs parameters (e.g. *args) as keyword args (e.g.
|
| 94 |
+
# args=['list', 'of', 'things'])
|
| 95 |
+
arg_spec = inspect.getfullargspec(self.func)
|
| 96 |
+
if arg_spec.varargs in self.kwargs:
|
| 97 |
+
args += kwargs.pop(arg_spec.varargs)
|
| 98 |
+
|
| 99 |
+
return self.func(*args, **kwargs)
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
def railroad_to_html(diagrams: List[NamedDiagram], **kwargs) -> str:
|
| 103 |
+
"""
|
| 104 |
+
Given a list of NamedDiagram, produce a single HTML string that visualises those diagrams
|
| 105 |
+
:params kwargs: kwargs to be passed in to the template
|
| 106 |
+
"""
|
| 107 |
+
data = []
|
| 108 |
+
for diagram in diagrams:
|
| 109 |
+
io = StringIO()
|
| 110 |
+
diagram.diagram.writeSvg(io.write)
|
| 111 |
+
title = diagram.name
|
| 112 |
+
if diagram.index == 0:
|
| 113 |
+
title += " (root)"
|
| 114 |
+
data.append({"title": title, "text": "", "svg": io.getvalue()})
|
| 115 |
+
|
| 116 |
+
return template.render(diagrams=data, **kwargs)
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
def resolve_partial(partial: "EditablePartial[T]") -> T:
|
| 120 |
+
"""
|
| 121 |
+
Recursively resolves a collection of Partials into whatever type they are
|
| 122 |
+
"""
|
| 123 |
+
if isinstance(partial, EditablePartial):
|
| 124 |
+
partial.args = resolve_partial(partial.args)
|
| 125 |
+
partial.kwargs = resolve_partial(partial.kwargs)
|
| 126 |
+
return partial()
|
| 127 |
+
elif isinstance(partial, list):
|
| 128 |
+
return [resolve_partial(x) for x in partial]
|
| 129 |
+
elif isinstance(partial, dict):
|
| 130 |
+
return {key: resolve_partial(x) for key, x in partial.items()}
|
| 131 |
+
else:
|
| 132 |
+
return partial
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
def to_railroad(
|
| 136 |
+
element: pyparsing.ParserElement,
|
| 137 |
+
diagram_kwargs: Optional[dict] = None,
|
| 138 |
+
vertical: int = 3,
|
| 139 |
+
show_results_names: bool = False,
|
| 140 |
+
) -> List[NamedDiagram]:
|
| 141 |
+
"""
|
| 142 |
+
Convert a pyparsing element tree into a list of diagrams. This is the recommended entrypoint to diagram
|
| 143 |
+
creation if you want to access the Railroad tree before it is converted to HTML
|
| 144 |
+
:param element: base element of the parser being diagrammed
|
| 145 |
+
:param diagram_kwargs: kwargs to pass to the Diagram() constructor
|
| 146 |
+
:param vertical: (optional) - int - limit at which number of alternatives should be
|
| 147 |
+
shown vertically instead of horizontally
|
| 148 |
+
:param show_results_names - bool to indicate whether results name annotations should be
|
| 149 |
+
included in the diagram
|
| 150 |
+
"""
|
| 151 |
+
# Convert the whole tree underneath the root
|
| 152 |
+
lookup = ConverterState(diagram_kwargs=diagram_kwargs or {})
|
| 153 |
+
_to_diagram_element(
|
| 154 |
+
element,
|
| 155 |
+
lookup=lookup,
|
| 156 |
+
parent=None,
|
| 157 |
+
vertical=vertical,
|
| 158 |
+
show_results_names=show_results_names,
|
| 159 |
+
)
|
| 160 |
+
|
| 161 |
+
root_id = id(element)
|
| 162 |
+
# Convert the root if it hasn't been already
|
| 163 |
+
if root_id in lookup:
|
| 164 |
+
if not element.customName:
|
| 165 |
+
lookup[root_id].name = ""
|
| 166 |
+
lookup[root_id].mark_for_extraction(root_id, lookup, force=True)
|
| 167 |
+
|
| 168 |
+
# Now that we're finished, we can convert from intermediate structures into Railroad elements
|
| 169 |
+
diags = list(lookup.diagrams.values())
|
| 170 |
+
if len(diags) > 1:
|
| 171 |
+
# collapse out duplicate diags with the same name
|
| 172 |
+
seen = set()
|
| 173 |
+
deduped_diags = []
|
| 174 |
+
for d in diags:
|
| 175 |
+
# don't extract SkipTo elements, they are uninformative as subdiagrams
|
| 176 |
+
if d.name == "...":
|
| 177 |
+
continue
|
| 178 |
+
if d.name is not None and d.name not in seen:
|
| 179 |
+
seen.add(d.name)
|
| 180 |
+
deduped_diags.append(d)
|
| 181 |
+
resolved = [resolve_partial(partial) for partial in deduped_diags]
|
| 182 |
+
else:
|
| 183 |
+
# special case - if just one diagram, always display it, even if
|
| 184 |
+
# it has no name
|
| 185 |
+
resolved = [resolve_partial(partial) for partial in diags]
|
| 186 |
+
return sorted(resolved, key=lambda diag: diag.index)
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
def _should_vertical(
|
| 190 |
+
specification: int, exprs: Iterable[pyparsing.ParserElement]
|
| 191 |
+
) -> bool:
|
| 192 |
+
"""
|
| 193 |
+
Returns true if we should return a vertical list of elements
|
| 194 |
+
"""
|
| 195 |
+
if specification is None:
|
| 196 |
+
return False
|
| 197 |
+
else:
|
| 198 |
+
return len(_visible_exprs(exprs)) >= specification
|
| 199 |
+
|
| 200 |
+
|
| 201 |
+
class ElementState:
|
| 202 |
+
"""
|
| 203 |
+
State recorded for an individual pyparsing Element
|
| 204 |
+
"""
|
| 205 |
+
|
| 206 |
+
# Note: this should be a dataclass, but we have to support Python 3.5
|
| 207 |
+
def __init__(
|
| 208 |
+
self,
|
| 209 |
+
element: pyparsing.ParserElement,
|
| 210 |
+
converted: EditablePartial,
|
| 211 |
+
parent: EditablePartial,
|
| 212 |
+
number: int,
|
| 213 |
+
name: str = None,
|
| 214 |
+
parent_index: Optional[int] = None,
|
| 215 |
+
):
|
| 216 |
+
#: The pyparsing element that this represents
|
| 217 |
+
self.element: pyparsing.ParserElement = element
|
| 218 |
+
#: The name of the element
|
| 219 |
+
self.name: str = name
|
| 220 |
+
#: The output Railroad element in an unconverted state
|
| 221 |
+
self.converted: EditablePartial = converted
|
| 222 |
+
#: The parent Railroad element, which we store so that we can extract this if it's duplicated
|
| 223 |
+
self.parent: EditablePartial = parent
|
| 224 |
+
#: The order in which we found this element, used for sorting diagrams if this is extracted into a diagram
|
| 225 |
+
self.number: int = number
|
| 226 |
+
#: The index of this inside its parent
|
| 227 |
+
self.parent_index: Optional[int] = parent_index
|
| 228 |
+
#: If true, we should extract this out into a subdiagram
|
| 229 |
+
self.extract: bool = False
|
| 230 |
+
#: If true, all of this element's children have been filled out
|
| 231 |
+
self.complete: bool = False
|
| 232 |
+
|
| 233 |
+
def mark_for_extraction(
|
| 234 |
+
self, el_id: int, state: "ConverterState", name: str = None, force: bool = False
|
| 235 |
+
):
|
| 236 |
+
"""
|
| 237 |
+
Called when this instance has been seen twice, and thus should eventually be extracted into a sub-diagram
|
| 238 |
+
:param el_id: id of the element
|
| 239 |
+
:param state: element/diagram state tracker
|
| 240 |
+
:param name: name to use for this element's text
|
| 241 |
+
:param force: If true, force extraction now, regardless of the state of this. Only useful for extracting the
|
| 242 |
+
root element when we know we're finished
|
| 243 |
+
"""
|
| 244 |
+
self.extract = True
|
| 245 |
+
|
| 246 |
+
# Set the name
|
| 247 |
+
if not self.name:
|
| 248 |
+
if name:
|
| 249 |
+
# Allow forcing a custom name
|
| 250 |
+
self.name = name
|
| 251 |
+
elif self.element.customName:
|
| 252 |
+
self.name = self.element.customName
|
| 253 |
+
else:
|
| 254 |
+
self.name = ""
|
| 255 |
+
|
| 256 |
+
# Just because this is marked for extraction doesn't mean we can do it yet. We may have to wait for children
|
| 257 |
+
# to be added
|
| 258 |
+
# Also, if this is just a string literal etc, don't bother extracting it
|
| 259 |
+
if force or (self.complete and _worth_extracting(self.element)):
|
| 260 |
+
state.extract_into_diagram(el_id)
|
| 261 |
+
|
| 262 |
+
|
| 263 |
+
class ConverterState:
|
| 264 |
+
"""
|
| 265 |
+
Stores some state that persists between recursions into the element tree
|
| 266 |
+
"""
|
| 267 |
+
|
| 268 |
+
def __init__(self, diagram_kwargs: Optional[dict] = None):
|
| 269 |
+
#: A dictionary mapping ParserElements to state relating to them
|
| 270 |
+
self._element_diagram_states: Dict[int, ElementState] = {}
|
| 271 |
+
#: A dictionary mapping ParserElement IDs to subdiagrams generated from them
|
| 272 |
+
self.diagrams: Dict[int, EditablePartial[NamedDiagram]] = {}
|
| 273 |
+
#: The index of the next unnamed element
|
| 274 |
+
self.unnamed_index: int = 1
|
| 275 |
+
#: The index of the next element. This is used for sorting
|
| 276 |
+
self.index: int = 0
|
| 277 |
+
#: Shared kwargs that are used to customize the construction of diagrams
|
| 278 |
+
self.diagram_kwargs: dict = diagram_kwargs or {}
|
| 279 |
+
self.extracted_diagram_names: Set[str] = set()
|
| 280 |
+
|
| 281 |
+
def __setitem__(self, key: int, value: ElementState):
|
| 282 |
+
self._element_diagram_states[key] = value
|
| 283 |
+
|
| 284 |
+
def __getitem__(self, key: int) -> ElementState:
|
| 285 |
+
return self._element_diagram_states[key]
|
| 286 |
+
|
| 287 |
+
def __delitem__(self, key: int):
|
| 288 |
+
del self._element_diagram_states[key]
|
| 289 |
+
|
| 290 |
+
def __contains__(self, key: int):
|
| 291 |
+
return key in self._element_diagram_states
|
| 292 |
+
|
| 293 |
+
def generate_unnamed(self) -> int:
|
| 294 |
+
"""
|
| 295 |
+
Generate a number used in the name of an otherwise unnamed diagram
|
| 296 |
+
"""
|
| 297 |
+
self.unnamed_index += 1
|
| 298 |
+
return self.unnamed_index
|
| 299 |
+
|
| 300 |
+
def generate_index(self) -> int:
|
| 301 |
+
"""
|
| 302 |
+
Generate a number used to index a diagram
|
| 303 |
+
"""
|
| 304 |
+
self.index += 1
|
| 305 |
+
return self.index
|
| 306 |
+
|
| 307 |
+
def extract_into_diagram(self, el_id: int):
|
| 308 |
+
"""
|
| 309 |
+
Used when we encounter the same token twice in the same tree. When this
|
| 310 |
+
happens, we replace all instances of that token with a terminal, and
|
| 311 |
+
create a new subdiagram for the token
|
| 312 |
+
"""
|
| 313 |
+
position = self[el_id]
|
| 314 |
+
|
| 315 |
+
# Replace the original definition of this element with a regular block
|
| 316 |
+
if position.parent:
|
| 317 |
+
ret = EditablePartial.from_call(railroad.NonTerminal, text=position.name)
|
| 318 |
+
if "item" in position.parent.kwargs:
|
| 319 |
+
position.parent.kwargs["item"] = ret
|
| 320 |
+
elif "items" in position.parent.kwargs:
|
| 321 |
+
position.parent.kwargs["items"][position.parent_index] = ret
|
| 322 |
+
|
| 323 |
+
# If the element we're extracting is a group, skip to its content but keep the title
|
| 324 |
+
if position.converted.func == railroad.Group:
|
| 325 |
+
content = position.converted.kwargs["item"]
|
| 326 |
+
else:
|
| 327 |
+
content = position.converted
|
| 328 |
+
|
| 329 |
+
self.diagrams[el_id] = EditablePartial.from_call(
|
| 330 |
+
NamedDiagram,
|
| 331 |
+
name=position.name,
|
| 332 |
+
diagram=EditablePartial.from_call(
|
| 333 |
+
railroad.Diagram, content, **self.diagram_kwargs
|
| 334 |
+
),
|
| 335 |
+
index=position.number,
|
| 336 |
+
)
|
| 337 |
+
|
| 338 |
+
del self[el_id]
|
| 339 |
+
|
| 340 |
+
|
| 341 |
+
def _worth_extracting(element: pyparsing.ParserElement) -> bool:
|
| 342 |
+
"""
|
| 343 |
+
Returns true if this element is worth having its own sub-diagram. Simply, if any of its children
|
| 344 |
+
themselves have children, then its complex enough to extract
|
| 345 |
+
"""
|
| 346 |
+
children = element.recurse()
|
| 347 |
+
return any(child.recurse() for child in children)
|
| 348 |
+
|
| 349 |
+
|
| 350 |
+
def _apply_diagram_item_enhancements(fn):
|
| 351 |
+
"""
|
| 352 |
+
decorator to ensure enhancements to a diagram item (such as results name annotations)
|
| 353 |
+
get applied on return from _to_diagram_element (we do this since there are several
|
| 354 |
+
returns in _to_diagram_element)
|
| 355 |
+
"""
|
| 356 |
+
|
| 357 |
+
def _inner(
|
| 358 |
+
element: pyparsing.ParserElement,
|
| 359 |
+
parent: Optional[EditablePartial],
|
| 360 |
+
lookup: ConverterState = None,
|
| 361 |
+
vertical: int = None,
|
| 362 |
+
index: int = 0,
|
| 363 |
+
name_hint: str = None,
|
| 364 |
+
show_results_names: bool = False,
|
| 365 |
+
) -> Optional[EditablePartial]:
|
| 366 |
+
|
| 367 |
+
ret = fn(
|
| 368 |
+
element,
|
| 369 |
+
parent,
|
| 370 |
+
lookup,
|
| 371 |
+
vertical,
|
| 372 |
+
index,
|
| 373 |
+
name_hint,
|
| 374 |
+
show_results_names,
|
| 375 |
+
)
|
| 376 |
+
|
| 377 |
+
# apply annotation for results name, if present
|
| 378 |
+
if show_results_names and ret is not None:
|
| 379 |
+
element_results_name = element.resultsName
|
| 380 |
+
if element_results_name:
|
| 381 |
+
# add "*" to indicate if this is a "list all results" name
|
| 382 |
+
element_results_name += "" if element.modalResults else "*"
|
| 383 |
+
ret = EditablePartial.from_call(
|
| 384 |
+
railroad.Group, item=ret, label=element_results_name
|
| 385 |
+
)
|
| 386 |
+
|
| 387 |
+
return ret
|
| 388 |
+
|
| 389 |
+
return _inner
|
| 390 |
+
|
| 391 |
+
|
| 392 |
+
def _visible_exprs(exprs: Iterable[pyparsing.ParserElement]):
|
| 393 |
+
non_diagramming_exprs = (
|
| 394 |
+
pyparsing.ParseElementEnhance,
|
| 395 |
+
pyparsing.PositionToken,
|
| 396 |
+
pyparsing.And._ErrorStop,
|
| 397 |
+
)
|
| 398 |
+
return [
|
| 399 |
+
e
|
| 400 |
+
for e in exprs
|
| 401 |
+
if not (e.customName or e.resultsName or isinstance(e, non_diagramming_exprs))
|
| 402 |
+
]
|
| 403 |
+
|
| 404 |
+
|
| 405 |
+
@_apply_diagram_item_enhancements
|
| 406 |
+
def _to_diagram_element(
|
| 407 |
+
element: pyparsing.ParserElement,
|
| 408 |
+
parent: Optional[EditablePartial],
|
| 409 |
+
lookup: ConverterState = None,
|
| 410 |
+
vertical: int = None,
|
| 411 |
+
index: int = 0,
|
| 412 |
+
name_hint: str = None,
|
| 413 |
+
show_results_names: bool = False,
|
| 414 |
+
) -> Optional[EditablePartial]:
|
| 415 |
+
"""
|
| 416 |
+
Recursively converts a PyParsing Element to a railroad Element
|
| 417 |
+
:param lookup: The shared converter state that keeps track of useful things
|
| 418 |
+
:param index: The index of this element within the parent
|
| 419 |
+
:param parent: The parent of this element in the output tree
|
| 420 |
+
:param vertical: Controls at what point we make a list of elements vertical. If this is an integer (the default),
|
| 421 |
+
it sets the threshold of the number of items before we go vertical. If True, always go vertical, if False, never
|
| 422 |
+
do so
|
| 423 |
+
:param name_hint: If provided, this will override the generated name
|
| 424 |
+
:param show_results_names: bool flag indicating whether to add annotations for results names
|
| 425 |
+
:returns: The converted version of the input element, but as a Partial that hasn't yet been constructed
|
| 426 |
+
"""
|
| 427 |
+
exprs = element.recurse()
|
| 428 |
+
name = name_hint or element.customName or element.__class__.__name__
|
| 429 |
+
|
| 430 |
+
# Python's id() is used to provide a unique identifier for elements
|
| 431 |
+
el_id = id(element)
|
| 432 |
+
|
| 433 |
+
element_results_name = element.resultsName
|
| 434 |
+
|
| 435 |
+
# Here we basically bypass processing certain wrapper elements if they contribute nothing to the diagram
|
| 436 |
+
if not element.customName:
|
| 437 |
+
if isinstance(
|
| 438 |
+
element,
|
| 439 |
+
(
|
| 440 |
+
pyparsing.TokenConverter,
|
| 441 |
+
# pyparsing.Forward,
|
| 442 |
+
pyparsing.Located,
|
| 443 |
+
),
|
| 444 |
+
):
|
| 445 |
+
# However, if this element has a useful custom name, and its child does not, we can pass it on to the child
|
| 446 |
+
if exprs:
|
| 447 |
+
if not exprs[0].customName:
|
| 448 |
+
propagated_name = name
|
| 449 |
+
else:
|
| 450 |
+
propagated_name = None
|
| 451 |
+
|
| 452 |
+
return _to_diagram_element(
|
| 453 |
+
element.expr,
|
| 454 |
+
parent=parent,
|
| 455 |
+
lookup=lookup,
|
| 456 |
+
vertical=vertical,
|
| 457 |
+
index=index,
|
| 458 |
+
name_hint=propagated_name,
|
| 459 |
+
show_results_names=show_results_names,
|
| 460 |
+
)
|
| 461 |
+
|
| 462 |
+
# If the element isn't worth extracting, we always treat it as the first time we say it
|
| 463 |
+
if _worth_extracting(element):
|
| 464 |
+
if el_id in lookup:
|
| 465 |
+
# If we've seen this element exactly once before, we are only just now finding out that it's a duplicate,
|
| 466 |
+
# so we have to extract it into a new diagram.
|
| 467 |
+
looked_up = lookup[el_id]
|
| 468 |
+
looked_up.mark_for_extraction(el_id, lookup, name=name_hint)
|
| 469 |
+
ret = EditablePartial.from_call(railroad.NonTerminal, text=looked_up.name)
|
| 470 |
+
return ret
|
| 471 |
+
|
| 472 |
+
elif el_id in lookup.diagrams:
|
| 473 |
+
# If we have seen the element at least twice before, and have already extracted it into a subdiagram, we
|
| 474 |
+
# just put in a marker element that refers to the sub-diagram
|
| 475 |
+
ret = EditablePartial.from_call(
|
| 476 |
+
railroad.NonTerminal, text=lookup.diagrams[el_id].kwargs["name"]
|
| 477 |
+
)
|
| 478 |
+
return ret
|
| 479 |
+
|
| 480 |
+
# Recursively convert child elements
|
| 481 |
+
# Here we find the most relevant Railroad element for matching pyparsing Element
|
| 482 |
+
# We use ``items=[]`` here to hold the place for where the child elements will go once created
|
| 483 |
+
if isinstance(element, pyparsing.And):
|
| 484 |
+
# detect And's created with ``expr*N`` notation - for these use a OneOrMore with a repeat
|
| 485 |
+
# (all will have the same name, and resultsName)
|
| 486 |
+
if not exprs:
|
| 487 |
+
return None
|
| 488 |
+
if len(set((e.name, e.resultsName) for e in exprs)) == 1:
|
| 489 |
+
ret = EditablePartial.from_call(
|
| 490 |
+
railroad.OneOrMore, item="", repeat=str(len(exprs))
|
| 491 |
+
)
|
| 492 |
+
elif _should_vertical(vertical, exprs):
|
| 493 |
+
ret = EditablePartial.from_call(railroad.Stack, items=[])
|
| 494 |
+
else:
|
| 495 |
+
ret = EditablePartial.from_call(railroad.Sequence, items=[])
|
| 496 |
+
elif isinstance(element, (pyparsing.Or, pyparsing.MatchFirst)):
|
| 497 |
+
if not exprs:
|
| 498 |
+
return None
|
| 499 |
+
if _should_vertical(vertical, exprs):
|
| 500 |
+
ret = EditablePartial.from_call(railroad.Choice, 0, items=[])
|
| 501 |
+
else:
|
| 502 |
+
ret = EditablePartial.from_call(railroad.HorizontalChoice, items=[])
|
| 503 |
+
elif isinstance(element, pyparsing.Each):
|
| 504 |
+
if not exprs:
|
| 505 |
+
return None
|
| 506 |
+
ret = EditablePartial.from_call(EachItem, items=[])
|
| 507 |
+
elif isinstance(element, pyparsing.NotAny):
|
| 508 |
+
ret = EditablePartial.from_call(AnnotatedItem, label="NOT", item="")
|
| 509 |
+
elif isinstance(element, pyparsing.FollowedBy):
|
| 510 |
+
ret = EditablePartial.from_call(AnnotatedItem, label="LOOKAHEAD", item="")
|
| 511 |
+
elif isinstance(element, pyparsing.PrecededBy):
|
| 512 |
+
ret = EditablePartial.from_call(AnnotatedItem, label="LOOKBEHIND", item="")
|
| 513 |
+
elif isinstance(element, pyparsing.Opt):
|
| 514 |
+
ret = EditablePartial.from_call(railroad.Optional, item="")
|
| 515 |
+
elif isinstance(element, pyparsing.OneOrMore):
|
| 516 |
+
ret = EditablePartial.from_call(railroad.OneOrMore, item="")
|
| 517 |
+
elif isinstance(element, pyparsing.ZeroOrMore):
|
| 518 |
+
ret = EditablePartial.from_call(railroad.ZeroOrMore, item="")
|
| 519 |
+
elif isinstance(element, pyparsing.Group):
|
| 520 |
+
ret = EditablePartial.from_call(
|
| 521 |
+
railroad.Group, item=None, label=element_results_name
|
| 522 |
+
)
|
| 523 |
+
elif isinstance(element, pyparsing.Empty) and not element.customName:
|
| 524 |
+
# Skip unnamed "Empty" elements
|
| 525 |
+
ret = None
|
| 526 |
+
elif len(exprs) > 1:
|
| 527 |
+
ret = EditablePartial.from_call(railroad.Sequence, items=[])
|
| 528 |
+
elif len(exprs) > 0 and not element_results_name:
|
| 529 |
+
ret = EditablePartial.from_call(railroad.Group, item="", label=name)
|
| 530 |
+
else:
|
| 531 |
+
terminal = EditablePartial.from_call(railroad.Terminal, element.defaultName)
|
| 532 |
+
ret = terminal
|
| 533 |
+
|
| 534 |
+
if ret is None:
|
| 535 |
+
return
|
| 536 |
+
|
| 537 |
+
# Indicate this element's position in the tree so we can extract it if necessary
|
| 538 |
+
lookup[el_id] = ElementState(
|
| 539 |
+
element=element,
|
| 540 |
+
converted=ret,
|
| 541 |
+
parent=parent,
|
| 542 |
+
parent_index=index,
|
| 543 |
+
number=lookup.generate_index(),
|
| 544 |
+
)
|
| 545 |
+
if element.customName:
|
| 546 |
+
lookup[el_id].mark_for_extraction(el_id, lookup, element.customName)
|
| 547 |
+
|
| 548 |
+
i = 0
|
| 549 |
+
for expr in exprs:
|
| 550 |
+
# Add a placeholder index in case we have to extract the child before we even add it to the parent
|
| 551 |
+
if "items" in ret.kwargs:
|
| 552 |
+
ret.kwargs["items"].insert(i, None)
|
| 553 |
+
|
| 554 |
+
item = _to_diagram_element(
|
| 555 |
+
expr,
|
| 556 |
+
parent=ret,
|
| 557 |
+
lookup=lookup,
|
| 558 |
+
vertical=vertical,
|
| 559 |
+
index=i,
|
| 560 |
+
show_results_names=show_results_names,
|
| 561 |
+
)
|
| 562 |
+
|
| 563 |
+
# Some elements don't need to be shown in the diagram
|
| 564 |
+
if item is not None:
|
| 565 |
+
if "item" in ret.kwargs:
|
| 566 |
+
ret.kwargs["item"] = item
|
| 567 |
+
elif "items" in ret.kwargs:
|
| 568 |
+
# If we've already extracted the child, don't touch this index, since it's occupied by a nonterminal
|
| 569 |
+
ret.kwargs["items"][i] = item
|
| 570 |
+
i += 1
|
| 571 |
+
elif "items" in ret.kwargs:
|
| 572 |
+
# If we're supposed to skip this element, remove it from the parent
|
| 573 |
+
del ret.kwargs["items"][i]
|
| 574 |
+
|
| 575 |
+
# If all this items children are none, skip this item
|
| 576 |
+
if ret and (
|
| 577 |
+
("items" in ret.kwargs and len(ret.kwargs["items"]) == 0)
|
| 578 |
+
or ("item" in ret.kwargs and ret.kwargs["item"] is None)
|
| 579 |
+
):
|
| 580 |
+
ret = EditablePartial.from_call(railroad.Terminal, name)
|
| 581 |
+
|
| 582 |
+
# Mark this element as "complete", ie it has all of its children
|
| 583 |
+
if el_id in lookup:
|
| 584 |
+
lookup[el_id].complete = True
|
| 585 |
+
|
| 586 |
+
if el_id in lookup and lookup[el_id].extract and lookup[el_id].complete:
|
| 587 |
+
lookup.extract_into_diagram(el_id)
|
| 588 |
+
if ret is not None:
|
| 589 |
+
ret = EditablePartial.from_call(
|
| 590 |
+
railroad.NonTerminal, text=lookup.diagrams[el_id].kwargs["name"]
|
| 591 |
+
)
|
| 592 |
+
|
| 593 |
+
return ret
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/diagram/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (15.6 kB). View file
|
|
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/exceptions.py
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# exceptions.py
|
| 2 |
+
|
| 3 |
+
import re
|
| 4 |
+
import sys
|
| 5 |
+
from typing import Optional
|
| 6 |
+
|
| 7 |
+
from .util import col, line, lineno, _collapse_string_to_ranges
|
| 8 |
+
from .unicode import pyparsing_unicode as ppu
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class ExceptionWordUnicode(ppu.Latin1, ppu.LatinA, ppu.LatinB, ppu.Greek, ppu.Cyrillic):
|
| 12 |
+
pass
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
_extract_alphanums = _collapse_string_to_ranges(ExceptionWordUnicode.alphanums)
|
| 16 |
+
_exception_word_extractor = re.compile("([" + _extract_alphanums + "]{1,16})|.")
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class ParseBaseException(Exception):
|
| 20 |
+
"""base exception class for all parsing runtime exceptions"""
|
| 21 |
+
|
| 22 |
+
# Performance tuning: we construct a *lot* of these, so keep this
|
| 23 |
+
# constructor as small and fast as possible
|
| 24 |
+
def __init__(
|
| 25 |
+
self,
|
| 26 |
+
pstr: str,
|
| 27 |
+
loc: int = 0,
|
| 28 |
+
msg: Optional[str] = None,
|
| 29 |
+
elem=None,
|
| 30 |
+
):
|
| 31 |
+
self.loc = loc
|
| 32 |
+
if msg is None:
|
| 33 |
+
self.msg = pstr
|
| 34 |
+
self.pstr = ""
|
| 35 |
+
else:
|
| 36 |
+
self.msg = msg
|
| 37 |
+
self.pstr = pstr
|
| 38 |
+
self.parser_element = self.parserElement = elem
|
| 39 |
+
self.args = (pstr, loc, msg)
|
| 40 |
+
|
| 41 |
+
@staticmethod
|
| 42 |
+
def explain_exception(exc, depth=16):
|
| 43 |
+
"""
|
| 44 |
+
Method to take an exception and translate the Python internal traceback into a list
|
| 45 |
+
of the pyparsing expressions that caused the exception to be raised.
|
| 46 |
+
|
| 47 |
+
Parameters:
|
| 48 |
+
|
| 49 |
+
- exc - exception raised during parsing (need not be a ParseException, in support
|
| 50 |
+
of Python exceptions that might be raised in a parse action)
|
| 51 |
+
- depth (default=16) - number of levels back in the stack trace to list expression
|
| 52 |
+
and function names; if None, the full stack trace names will be listed; if 0, only
|
| 53 |
+
the failing input line, marker, and exception string will be shown
|
| 54 |
+
|
| 55 |
+
Returns a multi-line string listing the ParserElements and/or function names in the
|
| 56 |
+
exception's stack trace.
|
| 57 |
+
"""
|
| 58 |
+
import inspect
|
| 59 |
+
from .core import ParserElement
|
| 60 |
+
|
| 61 |
+
if depth is None:
|
| 62 |
+
depth = sys.getrecursionlimit()
|
| 63 |
+
ret = []
|
| 64 |
+
if isinstance(exc, ParseBaseException):
|
| 65 |
+
ret.append(exc.line)
|
| 66 |
+
ret.append(" " * (exc.column - 1) + "^")
|
| 67 |
+
ret.append("{}: {}".format(type(exc).__name__, exc))
|
| 68 |
+
|
| 69 |
+
if depth > 0:
|
| 70 |
+
callers = inspect.getinnerframes(exc.__traceback__, context=depth)
|
| 71 |
+
seen = set()
|
| 72 |
+
for i, ff in enumerate(callers[-depth:]):
|
| 73 |
+
frm = ff[0]
|
| 74 |
+
|
| 75 |
+
f_self = frm.f_locals.get("self", None)
|
| 76 |
+
if isinstance(f_self, ParserElement):
|
| 77 |
+
if frm.f_code.co_name not in ("parseImpl", "_parseNoCache"):
|
| 78 |
+
continue
|
| 79 |
+
if id(f_self) in seen:
|
| 80 |
+
continue
|
| 81 |
+
seen.add(id(f_self))
|
| 82 |
+
|
| 83 |
+
self_type = type(f_self)
|
| 84 |
+
ret.append(
|
| 85 |
+
"{}.{} - {}".format(
|
| 86 |
+
self_type.__module__, self_type.__name__, f_self
|
| 87 |
+
)
|
| 88 |
+
)
|
| 89 |
+
|
| 90 |
+
elif f_self is not None:
|
| 91 |
+
self_type = type(f_self)
|
| 92 |
+
ret.append("{}.{}".format(self_type.__module__, self_type.__name__))
|
| 93 |
+
|
| 94 |
+
else:
|
| 95 |
+
code = frm.f_code
|
| 96 |
+
if code.co_name in ("wrapper", "<module>"):
|
| 97 |
+
continue
|
| 98 |
+
|
| 99 |
+
ret.append("{}".format(code.co_name))
|
| 100 |
+
|
| 101 |
+
depth -= 1
|
| 102 |
+
if not depth:
|
| 103 |
+
break
|
| 104 |
+
|
| 105 |
+
return "\n".join(ret)
|
| 106 |
+
|
| 107 |
+
@classmethod
|
| 108 |
+
def _from_exception(cls, pe):
|
| 109 |
+
"""
|
| 110 |
+
internal factory method to simplify creating one type of ParseException
|
| 111 |
+
from another - avoids having __init__ signature conflicts among subclasses
|
| 112 |
+
"""
|
| 113 |
+
return cls(pe.pstr, pe.loc, pe.msg, pe.parserElement)
|
| 114 |
+
|
| 115 |
+
@property
|
| 116 |
+
def line(self) -> str:
|
| 117 |
+
"""
|
| 118 |
+
Return the line of text where the exception occurred.
|
| 119 |
+
"""
|
| 120 |
+
return line(self.loc, self.pstr)
|
| 121 |
+
|
| 122 |
+
@property
|
| 123 |
+
def lineno(self) -> int:
|
| 124 |
+
"""
|
| 125 |
+
Return the 1-based line number of text where the exception occurred.
|
| 126 |
+
"""
|
| 127 |
+
return lineno(self.loc, self.pstr)
|
| 128 |
+
|
| 129 |
+
@property
|
| 130 |
+
def col(self) -> int:
|
| 131 |
+
"""
|
| 132 |
+
Return the 1-based column on the line of text where the exception occurred.
|
| 133 |
+
"""
|
| 134 |
+
return col(self.loc, self.pstr)
|
| 135 |
+
|
| 136 |
+
@property
|
| 137 |
+
def column(self) -> int:
|
| 138 |
+
"""
|
| 139 |
+
Return the 1-based column on the line of text where the exception occurred.
|
| 140 |
+
"""
|
| 141 |
+
return col(self.loc, self.pstr)
|
| 142 |
+
|
| 143 |
+
def __str__(self) -> str:
|
| 144 |
+
if self.pstr:
|
| 145 |
+
if self.loc >= len(self.pstr):
|
| 146 |
+
foundstr = ", found end of text"
|
| 147 |
+
else:
|
| 148 |
+
# pull out next word at error location
|
| 149 |
+
found_match = _exception_word_extractor.match(self.pstr, self.loc)
|
| 150 |
+
if found_match is not None:
|
| 151 |
+
found = found_match.group(0)
|
| 152 |
+
else:
|
| 153 |
+
found = self.pstr[self.loc : self.loc + 1]
|
| 154 |
+
foundstr = (", found %r" % found).replace(r"\\", "\\")
|
| 155 |
+
else:
|
| 156 |
+
foundstr = ""
|
| 157 |
+
return "{}{} (at char {}), (line:{}, col:{})".format(
|
| 158 |
+
self.msg, foundstr, self.loc, self.lineno, self.column
|
| 159 |
+
)
|
| 160 |
+
|
| 161 |
+
def __repr__(self):
|
| 162 |
+
return str(self)
|
| 163 |
+
|
| 164 |
+
def mark_input_line(self, marker_string: str = None, *, markerString=">!<") -> str:
|
| 165 |
+
"""
|
| 166 |
+
Extracts the exception line from the input string, and marks
|
| 167 |
+
the location of the exception with a special symbol.
|
| 168 |
+
"""
|
| 169 |
+
markerString = marker_string if marker_string is not None else markerString
|
| 170 |
+
line_str = self.line
|
| 171 |
+
line_column = self.column - 1
|
| 172 |
+
if markerString:
|
| 173 |
+
line_str = "".join(
|
| 174 |
+
(line_str[:line_column], markerString, line_str[line_column:])
|
| 175 |
+
)
|
| 176 |
+
return line_str.strip()
|
| 177 |
+
|
| 178 |
+
def explain(self, depth=16) -> str:
|
| 179 |
+
"""
|
| 180 |
+
Method to translate the Python internal traceback into a list
|
| 181 |
+
of the pyparsing expressions that caused the exception to be raised.
|
| 182 |
+
|
| 183 |
+
Parameters:
|
| 184 |
+
|
| 185 |
+
- depth (default=16) - number of levels back in the stack trace to list expression
|
| 186 |
+
and function names; if None, the full stack trace names will be listed; if 0, only
|
| 187 |
+
the failing input line, marker, and exception string will be shown
|
| 188 |
+
|
| 189 |
+
Returns a multi-line string listing the ParserElements and/or function names in the
|
| 190 |
+
exception's stack trace.
|
| 191 |
+
|
| 192 |
+
Example::
|
| 193 |
+
|
| 194 |
+
expr = pp.Word(pp.nums) * 3
|
| 195 |
+
try:
|
| 196 |
+
expr.parse_string("123 456 A789")
|
| 197 |
+
except pp.ParseException as pe:
|
| 198 |
+
print(pe.explain(depth=0))
|
| 199 |
+
|
| 200 |
+
prints::
|
| 201 |
+
|
| 202 |
+
123 456 A789
|
| 203 |
+
^
|
| 204 |
+
ParseException: Expected W:(0-9), found 'A' (at char 8), (line:1, col:9)
|
| 205 |
+
|
| 206 |
+
Note: the diagnostic output will include string representations of the expressions
|
| 207 |
+
that failed to parse. These representations will be more helpful if you use `set_name` to
|
| 208 |
+
give identifiable names to your expressions. Otherwise they will use the default string
|
| 209 |
+
forms, which may be cryptic to read.
|
| 210 |
+
|
| 211 |
+
Note: pyparsing's default truncation of exception tracebacks may also truncate the
|
| 212 |
+
stack of expressions that are displayed in the ``explain`` output. To get the full listing
|
| 213 |
+
of parser expressions, you may have to set ``ParserElement.verbose_stacktrace = True``
|
| 214 |
+
"""
|
| 215 |
+
return self.explain_exception(self, depth)
|
| 216 |
+
|
| 217 |
+
markInputline = mark_input_line
|
| 218 |
+
|
| 219 |
+
|
| 220 |
+
class ParseException(ParseBaseException):
|
| 221 |
+
"""
|
| 222 |
+
Exception thrown when a parse expression doesn't match the input string
|
| 223 |
+
|
| 224 |
+
Example::
|
| 225 |
+
|
| 226 |
+
try:
|
| 227 |
+
Word(nums).set_name("integer").parse_string("ABC")
|
| 228 |
+
except ParseException as pe:
|
| 229 |
+
print(pe)
|
| 230 |
+
print("column: {}".format(pe.column))
|
| 231 |
+
|
| 232 |
+
prints::
|
| 233 |
+
|
| 234 |
+
Expected integer (at char 0), (line:1, col:1)
|
| 235 |
+
column: 1
|
| 236 |
+
|
| 237 |
+
"""
|
| 238 |
+
|
| 239 |
+
|
| 240 |
+
class ParseFatalException(ParseBaseException):
|
| 241 |
+
"""
|
| 242 |
+
User-throwable exception thrown when inconsistent parse content
|
| 243 |
+
is found; stops all parsing immediately
|
| 244 |
+
"""
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
class ParseSyntaxException(ParseFatalException):
|
| 248 |
+
"""
|
| 249 |
+
Just like :class:`ParseFatalException`, but thrown internally
|
| 250 |
+
when an :class:`ErrorStop<And._ErrorStop>` ('-' operator) indicates
|
| 251 |
+
that parsing is to stop immediately because an unbacktrackable
|
| 252 |
+
syntax error has been found.
|
| 253 |
+
"""
|
| 254 |
+
|
| 255 |
+
|
| 256 |
+
class RecursiveGrammarException(Exception):
|
| 257 |
+
"""
|
| 258 |
+
Exception thrown by :class:`ParserElement.validate` if the
|
| 259 |
+
grammar could be left-recursive; parser may need to enable
|
| 260 |
+
left recursion using :class:`ParserElement.enable_left_recursion<ParserElement.enable_left_recursion>`
|
| 261 |
+
"""
|
| 262 |
+
|
| 263 |
+
def __init__(self, parseElementList):
|
| 264 |
+
self.parseElementTrace = parseElementList
|
| 265 |
+
|
| 266 |
+
def __str__(self) -> str:
|
| 267 |
+
return "RecursiveGrammarException: {}".format(self.parseElementTrace)
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/helpers.py
ADDED
|
@@ -0,0 +1,1069 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# helpers.py
|
| 2 |
+
import html.entities
|
| 3 |
+
import re
|
| 4 |
+
|
| 5 |
+
from . import __diag__
|
| 6 |
+
from .core import *
|
| 7 |
+
from .util import _bslash, _flatten, _escape_regex_range_chars
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
#
|
| 11 |
+
# global helpers
|
| 12 |
+
#
|
| 13 |
+
def delimited_list(
|
| 14 |
+
expr: Union[str, ParserElement],
|
| 15 |
+
delim: Union[str, ParserElement] = ",",
|
| 16 |
+
combine: bool = False,
|
| 17 |
+
min: OptionalType[int] = None,
|
| 18 |
+
max: OptionalType[int] = None,
|
| 19 |
+
*,
|
| 20 |
+
allow_trailing_delim: bool = False,
|
| 21 |
+
) -> ParserElement:
|
| 22 |
+
"""Helper to define a delimited list of expressions - the delimiter
|
| 23 |
+
defaults to ','. By default, the list elements and delimiters can
|
| 24 |
+
have intervening whitespace, and comments, but this can be
|
| 25 |
+
overridden by passing ``combine=True`` in the constructor. If
|
| 26 |
+
``combine`` is set to ``True``, the matching tokens are
|
| 27 |
+
returned as a single token string, with the delimiters included;
|
| 28 |
+
otherwise, the matching tokens are returned as a list of tokens,
|
| 29 |
+
with the delimiters suppressed.
|
| 30 |
+
|
| 31 |
+
If ``allow_trailing_delim`` is set to True, then the list may end with
|
| 32 |
+
a delimiter.
|
| 33 |
+
|
| 34 |
+
Example::
|
| 35 |
+
|
| 36 |
+
delimited_list(Word(alphas)).parse_string("aa,bb,cc") # -> ['aa', 'bb', 'cc']
|
| 37 |
+
delimited_list(Word(hexnums), delim=':', combine=True).parse_string("AA:BB:CC:DD:EE") # -> ['AA:BB:CC:DD:EE']
|
| 38 |
+
"""
|
| 39 |
+
if isinstance(expr, str_type):
|
| 40 |
+
expr = ParserElement._literalStringClass(expr)
|
| 41 |
+
|
| 42 |
+
dlName = "{expr} [{delim} {expr}]...{end}".format(
|
| 43 |
+
expr=str(expr.copy().streamline()),
|
| 44 |
+
delim=str(delim),
|
| 45 |
+
end=" [{}]".format(str(delim)) if allow_trailing_delim else "",
|
| 46 |
+
)
|
| 47 |
+
|
| 48 |
+
if not combine:
|
| 49 |
+
delim = Suppress(delim)
|
| 50 |
+
|
| 51 |
+
if min is not None:
|
| 52 |
+
if min < 1:
|
| 53 |
+
raise ValueError("min must be greater than 0")
|
| 54 |
+
min -= 1
|
| 55 |
+
if max is not None:
|
| 56 |
+
if min is not None and max <= min:
|
| 57 |
+
raise ValueError("max must be greater than, or equal to min")
|
| 58 |
+
max -= 1
|
| 59 |
+
delimited_list_expr = expr + (delim + expr)[min, max]
|
| 60 |
+
|
| 61 |
+
if allow_trailing_delim:
|
| 62 |
+
delimited_list_expr += Opt(delim)
|
| 63 |
+
|
| 64 |
+
if combine:
|
| 65 |
+
return Combine(delimited_list_expr).set_name(dlName)
|
| 66 |
+
else:
|
| 67 |
+
return delimited_list_expr.set_name(dlName)
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
def counted_array(
|
| 71 |
+
expr: ParserElement,
|
| 72 |
+
int_expr: OptionalType[ParserElement] = None,
|
| 73 |
+
*,
|
| 74 |
+
intExpr: OptionalType[ParserElement] = None,
|
| 75 |
+
) -> ParserElement:
|
| 76 |
+
"""Helper to define a counted list of expressions.
|
| 77 |
+
|
| 78 |
+
This helper defines a pattern of the form::
|
| 79 |
+
|
| 80 |
+
integer expr expr expr...
|
| 81 |
+
|
| 82 |
+
where the leading integer tells how many expr expressions follow.
|
| 83 |
+
The matched tokens returns the array of expr tokens as a list - the
|
| 84 |
+
leading count token is suppressed.
|
| 85 |
+
|
| 86 |
+
If ``int_expr`` is specified, it should be a pyparsing expression
|
| 87 |
+
that produces an integer value.
|
| 88 |
+
|
| 89 |
+
Example::
|
| 90 |
+
|
| 91 |
+
counted_array(Word(alphas)).parse_string('2 ab cd ef') # -> ['ab', 'cd']
|
| 92 |
+
|
| 93 |
+
# in this parser, the leading integer value is given in binary,
|
| 94 |
+
# '10' indicating that 2 values are in the array
|
| 95 |
+
binary_constant = Word('01').set_parse_action(lambda t: int(t[0], 2))
|
| 96 |
+
counted_array(Word(alphas), int_expr=binary_constant).parse_string('10 ab cd ef') # -> ['ab', 'cd']
|
| 97 |
+
|
| 98 |
+
# if other fields must be parsed after the count but before the
|
| 99 |
+
# list items, give the fields results names and they will
|
| 100 |
+
# be preserved in the returned ParseResults:
|
| 101 |
+
count_with_metadata = integer + Word(alphas)("type")
|
| 102 |
+
typed_array = counted_array(Word(alphanums), int_expr=count_with_metadata)("items")
|
| 103 |
+
result = typed_array.parse_string("3 bool True True False")
|
| 104 |
+
print(result.dump())
|
| 105 |
+
|
| 106 |
+
# prints
|
| 107 |
+
# ['True', 'True', 'False']
|
| 108 |
+
# - items: ['True', 'True', 'False']
|
| 109 |
+
# - type: 'bool'
|
| 110 |
+
"""
|
| 111 |
+
intExpr = intExpr or int_expr
|
| 112 |
+
array_expr = Forward()
|
| 113 |
+
|
| 114 |
+
def count_field_parse_action(s, l, t):
|
| 115 |
+
nonlocal array_expr
|
| 116 |
+
n = t[0]
|
| 117 |
+
array_expr <<= (expr * n) if n else Empty()
|
| 118 |
+
# clear list contents, but keep any named results
|
| 119 |
+
del t[:]
|
| 120 |
+
|
| 121 |
+
if intExpr is None:
|
| 122 |
+
intExpr = Word(nums).set_parse_action(lambda t: int(t[0]))
|
| 123 |
+
else:
|
| 124 |
+
intExpr = intExpr.copy()
|
| 125 |
+
intExpr.set_name("arrayLen")
|
| 126 |
+
intExpr.add_parse_action(count_field_parse_action, call_during_try=True)
|
| 127 |
+
return (intExpr + array_expr).set_name("(len) " + str(expr) + "...")
|
| 128 |
+
|
| 129 |
+
|
| 130 |
+
def match_previous_literal(expr: ParserElement) -> ParserElement:
|
| 131 |
+
"""Helper to define an expression that is indirectly defined from
|
| 132 |
+
the tokens matched in a previous expression, that is, it looks for
|
| 133 |
+
a 'repeat' of a previous expression. For example::
|
| 134 |
+
|
| 135 |
+
first = Word(nums)
|
| 136 |
+
second = match_previous_literal(first)
|
| 137 |
+
match_expr = first + ":" + second
|
| 138 |
+
|
| 139 |
+
will match ``"1:1"``, but not ``"1:2"``. Because this
|
| 140 |
+
matches a previous literal, will also match the leading
|
| 141 |
+
``"1:1"`` in ``"1:10"``. If this is not desired, use
|
| 142 |
+
:class:`match_previous_expr`. Do *not* use with packrat parsing
|
| 143 |
+
enabled.
|
| 144 |
+
"""
|
| 145 |
+
rep = Forward()
|
| 146 |
+
|
| 147 |
+
def copy_token_to_repeater(s, l, t):
|
| 148 |
+
if t:
|
| 149 |
+
if len(t) == 1:
|
| 150 |
+
rep << t[0]
|
| 151 |
+
else:
|
| 152 |
+
# flatten t tokens
|
| 153 |
+
tflat = _flatten(t.as_list())
|
| 154 |
+
rep << And(Literal(tt) for tt in tflat)
|
| 155 |
+
else:
|
| 156 |
+
rep << Empty()
|
| 157 |
+
|
| 158 |
+
expr.add_parse_action(copy_token_to_repeater, callDuringTry=True)
|
| 159 |
+
rep.set_name("(prev) " + str(expr))
|
| 160 |
+
return rep
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
def match_previous_expr(expr: ParserElement) -> ParserElement:
|
| 164 |
+
"""Helper to define an expression that is indirectly defined from
|
| 165 |
+
the tokens matched in a previous expression, that is, it looks for
|
| 166 |
+
a 'repeat' of a previous expression. For example::
|
| 167 |
+
|
| 168 |
+
first = Word(nums)
|
| 169 |
+
second = match_previous_expr(first)
|
| 170 |
+
match_expr = first + ":" + second
|
| 171 |
+
|
| 172 |
+
will match ``"1:1"``, but not ``"1:2"``. Because this
|
| 173 |
+
matches by expressions, will *not* match the leading ``"1:1"``
|
| 174 |
+
in ``"1:10"``; the expressions are evaluated first, and then
|
| 175 |
+
compared, so ``"1"`` is compared with ``"10"``. Do *not* use
|
| 176 |
+
with packrat parsing enabled.
|
| 177 |
+
"""
|
| 178 |
+
rep = Forward()
|
| 179 |
+
e2 = expr.copy()
|
| 180 |
+
rep <<= e2
|
| 181 |
+
|
| 182 |
+
def copy_token_to_repeater(s, l, t):
|
| 183 |
+
matchTokens = _flatten(t.as_list())
|
| 184 |
+
|
| 185 |
+
def must_match_these_tokens(s, l, t):
|
| 186 |
+
theseTokens = _flatten(t.as_list())
|
| 187 |
+
if theseTokens != matchTokens:
|
| 188 |
+
raise ParseException(s, l, "Expected {}, found{}".format(matchTokens, theseTokens))
|
| 189 |
+
|
| 190 |
+
rep.set_parse_action(must_match_these_tokens, callDuringTry=True)
|
| 191 |
+
|
| 192 |
+
expr.add_parse_action(copy_token_to_repeater, callDuringTry=True)
|
| 193 |
+
rep.set_name("(prev) " + str(expr))
|
| 194 |
+
return rep
|
| 195 |
+
|
| 196 |
+
|
| 197 |
+
def one_of(
|
| 198 |
+
strs: Union[IterableType[str], str],
|
| 199 |
+
caseless: bool = False,
|
| 200 |
+
use_regex: bool = True,
|
| 201 |
+
as_keyword: bool = False,
|
| 202 |
+
*,
|
| 203 |
+
useRegex: bool = True,
|
| 204 |
+
asKeyword: bool = False,
|
| 205 |
+
) -> ParserElement:
|
| 206 |
+
"""Helper to quickly define a set of alternative :class:`Literal` s,
|
| 207 |
+
and makes sure to do longest-first testing when there is a conflict,
|
| 208 |
+
regardless of the input order, but returns
|
| 209 |
+
a :class:`MatchFirst` for best performance.
|
| 210 |
+
|
| 211 |
+
Parameters:
|
| 212 |
+
|
| 213 |
+
- ``strs`` - a string of space-delimited literals, or a collection of
|
| 214 |
+
string literals
|
| 215 |
+
- ``caseless`` - treat all literals as caseless - (default= ``False``)
|
| 216 |
+
- ``use_regex`` - as an optimization, will
|
| 217 |
+
generate a :class:`Regex` object; otherwise, will generate
|
| 218 |
+
a :class:`MatchFirst` object (if ``caseless=True`` or ``asKeyword=True``, or if
|
| 219 |
+
creating a :class:`Regex` raises an exception) - (default= ``True``)
|
| 220 |
+
- ``as_keyword`` - enforce :class:`Keyword`-style matching on the
|
| 221 |
+
generated expressions - (default= ``False``)
|
| 222 |
+
- ``asKeyword`` and ``useRegex`` are retained for pre-PEP8 compatibility,
|
| 223 |
+
but will be removed in a future release
|
| 224 |
+
|
| 225 |
+
Example::
|
| 226 |
+
|
| 227 |
+
comp_oper = one_of("< = > <= >= !=")
|
| 228 |
+
var = Word(alphas)
|
| 229 |
+
number = Word(nums)
|
| 230 |
+
term = var | number
|
| 231 |
+
comparison_expr = term + comp_oper + term
|
| 232 |
+
print(comparison_expr.search_string("B = 12 AA=23 B<=AA AA>12"))
|
| 233 |
+
|
| 234 |
+
prints::
|
| 235 |
+
|
| 236 |
+
[['B', '=', '12'], ['AA', '=', '23'], ['B', '<=', 'AA'], ['AA', '>', '12']]
|
| 237 |
+
"""
|
| 238 |
+
asKeyword = asKeyword or as_keyword
|
| 239 |
+
useRegex = useRegex and use_regex
|
| 240 |
+
|
| 241 |
+
if (
|
| 242 |
+
isinstance(caseless, str_type)
|
| 243 |
+
and __diag__.warn_on_multiple_string_args_to_oneof
|
| 244 |
+
):
|
| 245 |
+
warnings.warn(
|
| 246 |
+
"More than one string argument passed to one_of, pass"
|
| 247 |
+
" choices as a list or space-delimited string",
|
| 248 |
+
stacklevel=2,
|
| 249 |
+
)
|
| 250 |
+
|
| 251 |
+
if caseless:
|
| 252 |
+
isequal = lambda a, b: a.upper() == b.upper()
|
| 253 |
+
masks = lambda a, b: b.upper().startswith(a.upper())
|
| 254 |
+
parseElementClass = CaselessKeyword if asKeyword else CaselessLiteral
|
| 255 |
+
else:
|
| 256 |
+
isequal = lambda a, b: a == b
|
| 257 |
+
masks = lambda a, b: b.startswith(a)
|
| 258 |
+
parseElementClass = Keyword if asKeyword else Literal
|
| 259 |
+
|
| 260 |
+
symbols: List[str] = []
|
| 261 |
+
if isinstance(strs, str_type):
|
| 262 |
+
symbols = strs.split()
|
| 263 |
+
elif isinstance(strs, Iterable):
|
| 264 |
+
symbols = list(strs)
|
| 265 |
+
else:
|
| 266 |
+
raise TypeError("Invalid argument to one_of, expected string or iterable")
|
| 267 |
+
if not symbols:
|
| 268 |
+
return NoMatch()
|
| 269 |
+
|
| 270 |
+
# reorder given symbols to take care to avoid masking longer choices with shorter ones
|
| 271 |
+
# (but only if the given symbols are not just single characters)
|
| 272 |
+
if any(len(sym) > 1 for sym in symbols):
|
| 273 |
+
i = 0
|
| 274 |
+
while i < len(symbols) - 1:
|
| 275 |
+
cur = symbols[i]
|
| 276 |
+
for j, other in enumerate(symbols[i + 1 :]):
|
| 277 |
+
if isequal(other, cur):
|
| 278 |
+
del symbols[i + j + 1]
|
| 279 |
+
break
|
| 280 |
+
elif masks(cur, other):
|
| 281 |
+
del symbols[i + j + 1]
|
| 282 |
+
symbols.insert(i, other)
|
| 283 |
+
break
|
| 284 |
+
else:
|
| 285 |
+
i += 1
|
| 286 |
+
|
| 287 |
+
if useRegex:
|
| 288 |
+
re_flags: int = re.IGNORECASE if caseless else 0
|
| 289 |
+
|
| 290 |
+
try:
|
| 291 |
+
if all(len(sym) == 1 for sym in symbols):
|
| 292 |
+
# symbols are just single characters, create range regex pattern
|
| 293 |
+
patt = "[{}]".format(
|
| 294 |
+
"".join(_escape_regex_range_chars(sym) for sym in symbols)
|
| 295 |
+
)
|
| 296 |
+
else:
|
| 297 |
+
patt = "|".join(re.escape(sym) for sym in symbols)
|
| 298 |
+
|
| 299 |
+
# wrap with \b word break markers if defining as keywords
|
| 300 |
+
if asKeyword:
|
| 301 |
+
patt = r"\b(?:{})\b".format(patt)
|
| 302 |
+
|
| 303 |
+
ret = Regex(patt, flags=re_flags).set_name(" | ".join(symbols))
|
| 304 |
+
|
| 305 |
+
if caseless:
|
| 306 |
+
# add parse action to return symbols as specified, not in random
|
| 307 |
+
# casing as found in input string
|
| 308 |
+
symbol_map = {sym.lower(): sym for sym in symbols}
|
| 309 |
+
ret.add_parse_action(lambda s, l, t: symbol_map[t[0].lower()])
|
| 310 |
+
|
| 311 |
+
return ret
|
| 312 |
+
|
| 313 |
+
except sre_constants.error:
|
| 314 |
+
warnings.warn(
|
| 315 |
+
"Exception creating Regex for one_of, building MatchFirst", stacklevel=2
|
| 316 |
+
)
|
| 317 |
+
|
| 318 |
+
# last resort, just use MatchFirst
|
| 319 |
+
return MatchFirst(parseElementClass(sym) for sym in symbols).set_name(
|
| 320 |
+
" | ".join(symbols)
|
| 321 |
+
)
|
| 322 |
+
|
| 323 |
+
|
| 324 |
+
def dict_of(key: ParserElement, value: ParserElement) -> ParserElement:
|
| 325 |
+
"""Helper to easily and clearly define a dictionary by specifying
|
| 326 |
+
the respective patterns for the key and value. Takes care of
|
| 327 |
+
defining the :class:`Dict`, :class:`ZeroOrMore`, and
|
| 328 |
+
:class:`Group` tokens in the proper order. The key pattern
|
| 329 |
+
can include delimiting markers or punctuation, as long as they are
|
| 330 |
+
suppressed, thereby leaving the significant key text. The value
|
| 331 |
+
pattern can include named results, so that the :class:`Dict` results
|
| 332 |
+
can include named token fields.
|
| 333 |
+
|
| 334 |
+
Example::
|
| 335 |
+
|
| 336 |
+
text = "shape: SQUARE posn: upper left color: light blue texture: burlap"
|
| 337 |
+
attr_expr = (label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join))
|
| 338 |
+
print(OneOrMore(attr_expr).parse_string(text).dump())
|
| 339 |
+
|
| 340 |
+
attr_label = label
|
| 341 |
+
attr_value = Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)
|
| 342 |
+
|
| 343 |
+
# similar to Dict, but simpler call format
|
| 344 |
+
result = dict_of(attr_label, attr_value).parse_string(text)
|
| 345 |
+
print(result.dump())
|
| 346 |
+
print(result['shape'])
|
| 347 |
+
print(result.shape) # object attribute access works too
|
| 348 |
+
print(result.as_dict())
|
| 349 |
+
|
| 350 |
+
prints::
|
| 351 |
+
|
| 352 |
+
[['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']]
|
| 353 |
+
- color: light blue
|
| 354 |
+
- posn: upper left
|
| 355 |
+
- shape: SQUARE
|
| 356 |
+
- texture: burlap
|
| 357 |
+
SQUARE
|
| 358 |
+
SQUARE
|
| 359 |
+
{'color': 'light blue', 'shape': 'SQUARE', 'posn': 'upper left', 'texture': 'burlap'}
|
| 360 |
+
"""
|
| 361 |
+
return Dict(OneOrMore(Group(key + value)))
|
| 362 |
+
|
| 363 |
+
|
| 364 |
+
def original_text_for(
|
| 365 |
+
expr: ParserElement, as_string: bool = True, *, asString: bool = True
|
| 366 |
+
) -> ParserElement:
|
| 367 |
+
"""Helper to return the original, untokenized text for a given
|
| 368 |
+
expression. Useful to restore the parsed fields of an HTML start
|
| 369 |
+
tag into the raw tag text itself, or to revert separate tokens with
|
| 370 |
+
intervening whitespace back to the original matching input text. By
|
| 371 |
+
default, returns astring containing the original parsed text.
|
| 372 |
+
|
| 373 |
+
If the optional ``as_string`` argument is passed as
|
| 374 |
+
``False``, then the return value is
|
| 375 |
+
a :class:`ParseResults` containing any results names that
|
| 376 |
+
were originally matched, and a single token containing the original
|
| 377 |
+
matched text from the input string. So if the expression passed to
|
| 378 |
+
:class:`original_text_for` contains expressions with defined
|
| 379 |
+
results names, you must set ``as_string`` to ``False`` if you
|
| 380 |
+
want to preserve those results name values.
|
| 381 |
+
|
| 382 |
+
The ``asString`` pre-PEP8 argument is retained for compatibility,
|
| 383 |
+
but will be removed in a future release.
|
| 384 |
+
|
| 385 |
+
Example::
|
| 386 |
+
|
| 387 |
+
src = "this is test <b> bold <i>text</i> </b> normal text "
|
| 388 |
+
for tag in ("b", "i"):
|
| 389 |
+
opener, closer = make_html_tags(tag)
|
| 390 |
+
patt = original_text_for(opener + SkipTo(closer) + closer)
|
| 391 |
+
print(patt.search_string(src)[0])
|
| 392 |
+
|
| 393 |
+
prints::
|
| 394 |
+
|
| 395 |
+
['<b> bold <i>text</i> </b>']
|
| 396 |
+
['<i>text</i>']
|
| 397 |
+
"""
|
| 398 |
+
asString = asString and as_string
|
| 399 |
+
|
| 400 |
+
locMarker = Empty().set_parse_action(lambda s, loc, t: loc)
|
| 401 |
+
endlocMarker = locMarker.copy()
|
| 402 |
+
endlocMarker.callPreparse = False
|
| 403 |
+
matchExpr = locMarker("_original_start") + expr + endlocMarker("_original_end")
|
| 404 |
+
if asString:
|
| 405 |
+
extractText = lambda s, l, t: s[t._original_start : t._original_end]
|
| 406 |
+
else:
|
| 407 |
+
|
| 408 |
+
def extractText(s, l, t):
|
| 409 |
+
t[:] = [s[t.pop("_original_start") : t.pop("_original_end")]]
|
| 410 |
+
|
| 411 |
+
matchExpr.set_parse_action(extractText)
|
| 412 |
+
matchExpr.ignoreExprs = expr.ignoreExprs
|
| 413 |
+
matchExpr.suppress_warning(Diagnostics.warn_ungrouped_named_tokens_in_collection)
|
| 414 |
+
return matchExpr
|
| 415 |
+
|
| 416 |
+
|
| 417 |
+
def ungroup(expr: ParserElement) -> ParserElement:
|
| 418 |
+
"""Helper to undo pyparsing's default grouping of And expressions,
|
| 419 |
+
even if all but one are non-empty.
|
| 420 |
+
"""
|
| 421 |
+
return TokenConverter(expr).add_parse_action(lambda t: t[0])
|
| 422 |
+
|
| 423 |
+
|
| 424 |
+
def locatedExpr(expr: ParserElement) -> ParserElement:
|
| 425 |
+
"""
|
| 426 |
+
(DEPRECATED - future code should use the Located class)
|
| 427 |
+
Helper to decorate a returned token with its starting and ending
|
| 428 |
+
locations in the input string.
|
| 429 |
+
|
| 430 |
+
This helper adds the following results names:
|
| 431 |
+
|
| 432 |
+
- ``locn_start`` - location where matched expression begins
|
| 433 |
+
- ``locn_end`` - location where matched expression ends
|
| 434 |
+
- ``value`` - the actual parsed results
|
| 435 |
+
|
| 436 |
+
Be careful if the input text contains ``<TAB>`` characters, you
|
| 437 |
+
may want to call :class:`ParserElement.parseWithTabs`
|
| 438 |
+
|
| 439 |
+
Example::
|
| 440 |
+
|
| 441 |
+
wd = Word(alphas)
|
| 442 |
+
for match in locatedExpr(wd).searchString("ljsdf123lksdjjf123lkkjj1222"):
|
| 443 |
+
print(match)
|
| 444 |
+
|
| 445 |
+
prints::
|
| 446 |
+
|
| 447 |
+
[[0, 'ljsdf', 5]]
|
| 448 |
+
[[8, 'lksdjjf', 15]]
|
| 449 |
+
[[18, 'lkkjj', 23]]
|
| 450 |
+
"""
|
| 451 |
+
locator = Empty().set_parse_action(lambda ss, ll, tt: ll)
|
| 452 |
+
return Group(
|
| 453 |
+
locator("locn_start")
|
| 454 |
+
+ expr("value")
|
| 455 |
+
+ locator.copy().leaveWhitespace()("locn_end")
|
| 456 |
+
)
|
| 457 |
+
|
| 458 |
+
|
| 459 |
+
def nested_expr(
|
| 460 |
+
opener: Union[str, ParserElement] = "(",
|
| 461 |
+
closer: Union[str, ParserElement] = ")",
|
| 462 |
+
content: OptionalType[ParserElement] = None,
|
| 463 |
+
ignore_expr: ParserElement = quoted_string(),
|
| 464 |
+
*,
|
| 465 |
+
ignoreExpr: ParserElement = quoted_string(),
|
| 466 |
+
) -> ParserElement:
|
| 467 |
+
"""Helper method for defining nested lists enclosed in opening and
|
| 468 |
+
closing delimiters (``"("`` and ``")"`` are the default).
|
| 469 |
+
|
| 470 |
+
Parameters:
|
| 471 |
+
- ``opener`` - opening character for a nested list
|
| 472 |
+
(default= ``"("``); can also be a pyparsing expression
|
| 473 |
+
- ``closer`` - closing character for a nested list
|
| 474 |
+
(default= ``")"``); can also be a pyparsing expression
|
| 475 |
+
- ``content`` - expression for items within the nested lists
|
| 476 |
+
(default= ``None``)
|
| 477 |
+
- ``ignore_expr`` - expression for ignoring opening and closing delimiters
|
| 478 |
+
(default= :class:`quoted_string`)
|
| 479 |
+
- ``ignoreExpr`` - this pre-PEP8 argument is retained for compatibility
|
| 480 |
+
but will be removed in a future release
|
| 481 |
+
|
| 482 |
+
If an expression is not provided for the content argument, the
|
| 483 |
+
nested expression will capture all whitespace-delimited content
|
| 484 |
+
between delimiters as a list of separate values.
|
| 485 |
+
|
| 486 |
+
Use the ``ignore_expr`` argument to define expressions that may
|
| 487 |
+
contain opening or closing characters that should not be treated as
|
| 488 |
+
opening or closing characters for nesting, such as quoted_string or
|
| 489 |
+
a comment expression. Specify multiple expressions using an
|
| 490 |
+
:class:`Or` or :class:`MatchFirst`. The default is
|
| 491 |
+
:class:`quoted_string`, but if no expressions are to be ignored, then
|
| 492 |
+
pass ``None`` for this argument.
|
| 493 |
+
|
| 494 |
+
Example::
|
| 495 |
+
|
| 496 |
+
data_type = one_of("void int short long char float double")
|
| 497 |
+
decl_data_type = Combine(data_type + Opt(Word('*')))
|
| 498 |
+
ident = Word(alphas+'_', alphanums+'_')
|
| 499 |
+
number = pyparsing_common.number
|
| 500 |
+
arg = Group(decl_data_type + ident)
|
| 501 |
+
LPAR, RPAR = map(Suppress, "()")
|
| 502 |
+
|
| 503 |
+
code_body = nested_expr('{', '}', ignore_expr=(quoted_string | c_style_comment))
|
| 504 |
+
|
| 505 |
+
c_function = (decl_data_type("type")
|
| 506 |
+
+ ident("name")
|
| 507 |
+
+ LPAR + Opt(delimited_list(arg), [])("args") + RPAR
|
| 508 |
+
+ code_body("body"))
|
| 509 |
+
c_function.ignore(c_style_comment)
|
| 510 |
+
|
| 511 |
+
source_code = '''
|
| 512 |
+
int is_odd(int x) {
|
| 513 |
+
return (x%2);
|
| 514 |
+
}
|
| 515 |
+
|
| 516 |
+
int dec_to_hex(char hchar) {
|
| 517 |
+
if (hchar >= '0' && hchar <= '9') {
|
| 518 |
+
return (ord(hchar)-ord('0'));
|
| 519 |
+
} else {
|
| 520 |
+
return (10+ord(hchar)-ord('A'));
|
| 521 |
+
}
|
| 522 |
+
}
|
| 523 |
+
'''
|
| 524 |
+
for func in c_function.search_string(source_code):
|
| 525 |
+
print("%(name)s (%(type)s) args: %(args)s" % func)
|
| 526 |
+
|
| 527 |
+
|
| 528 |
+
prints::
|
| 529 |
+
|
| 530 |
+
is_odd (int) args: [['int', 'x']]
|
| 531 |
+
dec_to_hex (int) args: [['char', 'hchar']]
|
| 532 |
+
"""
|
| 533 |
+
if ignoreExpr != ignore_expr:
|
| 534 |
+
ignoreExpr = ignore_expr if ignoreExpr == quoted_string() else ignoreExpr
|
| 535 |
+
if opener == closer:
|
| 536 |
+
raise ValueError("opening and closing strings cannot be the same")
|
| 537 |
+
if content is None:
|
| 538 |
+
if isinstance(opener, str_type) and isinstance(closer, str_type):
|
| 539 |
+
if len(opener) == 1 and len(closer) == 1:
|
| 540 |
+
if ignoreExpr is not None:
|
| 541 |
+
content = Combine(
|
| 542 |
+
OneOrMore(
|
| 543 |
+
~ignoreExpr
|
| 544 |
+
+ CharsNotIn(
|
| 545 |
+
opener + closer + ParserElement.DEFAULT_WHITE_CHARS,
|
| 546 |
+
exact=1,
|
| 547 |
+
)
|
| 548 |
+
)
|
| 549 |
+
).set_parse_action(lambda t: t[0].strip())
|
| 550 |
+
else:
|
| 551 |
+
content = empty.copy() + CharsNotIn(
|
| 552 |
+
opener + closer + ParserElement.DEFAULT_WHITE_CHARS
|
| 553 |
+
).set_parse_action(lambda t: t[0].strip())
|
| 554 |
+
else:
|
| 555 |
+
if ignoreExpr is not None:
|
| 556 |
+
content = Combine(
|
| 557 |
+
OneOrMore(
|
| 558 |
+
~ignoreExpr
|
| 559 |
+
+ ~Literal(opener)
|
| 560 |
+
+ ~Literal(closer)
|
| 561 |
+
+ CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS, exact=1)
|
| 562 |
+
)
|
| 563 |
+
).set_parse_action(lambda t: t[0].strip())
|
| 564 |
+
else:
|
| 565 |
+
content = Combine(
|
| 566 |
+
OneOrMore(
|
| 567 |
+
~Literal(opener)
|
| 568 |
+
+ ~Literal(closer)
|
| 569 |
+
+ CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS, exact=1)
|
| 570 |
+
)
|
| 571 |
+
).set_parse_action(lambda t: t[0].strip())
|
| 572 |
+
else:
|
| 573 |
+
raise ValueError(
|
| 574 |
+
"opening and closing arguments must be strings if no content expression is given"
|
| 575 |
+
)
|
| 576 |
+
ret = Forward()
|
| 577 |
+
if ignoreExpr is not None:
|
| 578 |
+
ret <<= Group(
|
| 579 |
+
Suppress(opener) + ZeroOrMore(ignoreExpr | ret | content) + Suppress(closer)
|
| 580 |
+
)
|
| 581 |
+
else:
|
| 582 |
+
ret <<= Group(Suppress(opener) + ZeroOrMore(ret | content) + Suppress(closer))
|
| 583 |
+
ret.set_name("nested %s%s expression" % (opener, closer))
|
| 584 |
+
return ret
|
| 585 |
+
|
| 586 |
+
|
| 587 |
+
def _makeTags(tagStr, xml, suppress_LT=Suppress("<"), suppress_GT=Suppress(">")):
|
| 588 |
+
"""Internal helper to construct opening and closing tag expressions, given a tag name"""
|
| 589 |
+
if isinstance(tagStr, str_type):
|
| 590 |
+
resname = tagStr
|
| 591 |
+
tagStr = Keyword(tagStr, caseless=not xml)
|
| 592 |
+
else:
|
| 593 |
+
resname = tagStr.name
|
| 594 |
+
|
| 595 |
+
tagAttrName = Word(alphas, alphanums + "_-:")
|
| 596 |
+
if xml:
|
| 597 |
+
tagAttrValue = dbl_quoted_string.copy().set_parse_action(remove_quotes)
|
| 598 |
+
openTag = (
|
| 599 |
+
suppress_LT
|
| 600 |
+
+ tagStr("tag")
|
| 601 |
+
+ Dict(ZeroOrMore(Group(tagAttrName + Suppress("=") + tagAttrValue)))
|
| 602 |
+
+ Opt("/", default=[False])("empty").set_parse_action(
|
| 603 |
+
lambda s, l, t: t[0] == "/"
|
| 604 |
+
)
|
| 605 |
+
+ suppress_GT
|
| 606 |
+
)
|
| 607 |
+
else:
|
| 608 |
+
tagAttrValue = quoted_string.copy().set_parse_action(remove_quotes) | Word(
|
| 609 |
+
printables, exclude_chars=">"
|
| 610 |
+
)
|
| 611 |
+
openTag = (
|
| 612 |
+
suppress_LT
|
| 613 |
+
+ tagStr("tag")
|
| 614 |
+
+ Dict(
|
| 615 |
+
ZeroOrMore(
|
| 616 |
+
Group(
|
| 617 |
+
tagAttrName.set_parse_action(lambda t: t[0].lower())
|
| 618 |
+
+ Opt(Suppress("=") + tagAttrValue)
|
| 619 |
+
)
|
| 620 |
+
)
|
| 621 |
+
)
|
| 622 |
+
+ Opt("/", default=[False])("empty").set_parse_action(
|
| 623 |
+
lambda s, l, t: t[0] == "/"
|
| 624 |
+
)
|
| 625 |
+
+ suppress_GT
|
| 626 |
+
)
|
| 627 |
+
closeTag = Combine(Literal("</") + tagStr + ">", adjacent=False)
|
| 628 |
+
|
| 629 |
+
openTag.set_name("<%s>" % resname)
|
| 630 |
+
# add start<tagname> results name in parse action now that ungrouped names are not reported at two levels
|
| 631 |
+
openTag.add_parse_action(
|
| 632 |
+
lambda t: t.__setitem__(
|
| 633 |
+
"start" + "".join(resname.replace(":", " ").title().split()), t.copy()
|
| 634 |
+
)
|
| 635 |
+
)
|
| 636 |
+
closeTag = closeTag(
|
| 637 |
+
"end" + "".join(resname.replace(":", " ").title().split())
|
| 638 |
+
).set_name("</%s>" % resname)
|
| 639 |
+
openTag.tag = resname
|
| 640 |
+
closeTag.tag = resname
|
| 641 |
+
openTag.tag_body = SkipTo(closeTag())
|
| 642 |
+
return openTag, closeTag
|
| 643 |
+
|
| 644 |
+
|
| 645 |
+
def make_html_tags(
|
| 646 |
+
tag_str: Union[str, ParserElement]
|
| 647 |
+
) -> Tuple[ParserElement, ParserElement]:
|
| 648 |
+
"""Helper to construct opening and closing tag expressions for HTML,
|
| 649 |
+
given a tag name. Matches tags in either upper or lower case,
|
| 650 |
+
attributes with namespaces and with quoted or unquoted values.
|
| 651 |
+
|
| 652 |
+
Example::
|
| 653 |
+
|
| 654 |
+
text = '<td>More info at the <a href="https://github.com/pyparsing/pyparsing/wiki">pyparsing</a> wiki page</td>'
|
| 655 |
+
# make_html_tags returns pyparsing expressions for the opening and
|
| 656 |
+
# closing tags as a 2-tuple
|
| 657 |
+
a, a_end = make_html_tags("A")
|
| 658 |
+
link_expr = a + SkipTo(a_end)("link_text") + a_end
|
| 659 |
+
|
| 660 |
+
for link in link_expr.search_string(text):
|
| 661 |
+
# attributes in the <A> tag (like "href" shown here) are
|
| 662 |
+
# also accessible as named results
|
| 663 |
+
print(link.link_text, '->', link.href)
|
| 664 |
+
|
| 665 |
+
prints::
|
| 666 |
+
|
| 667 |
+
pyparsing -> https://github.com/pyparsing/pyparsing/wiki
|
| 668 |
+
"""
|
| 669 |
+
return _makeTags(tag_str, False)
|
| 670 |
+
|
| 671 |
+
|
| 672 |
+
def make_xml_tags(
|
| 673 |
+
tag_str: Union[str, ParserElement]
|
| 674 |
+
) -> Tuple[ParserElement, ParserElement]:
|
| 675 |
+
"""Helper to construct opening and closing tag expressions for XML,
|
| 676 |
+
given a tag name. Matches tags only in the given upper/lower case.
|
| 677 |
+
|
| 678 |
+
Example: similar to :class:`make_html_tags`
|
| 679 |
+
"""
|
| 680 |
+
return _makeTags(tag_str, True)
|
| 681 |
+
|
| 682 |
+
|
| 683 |
+
any_open_tag, any_close_tag = make_html_tags(
|
| 684 |
+
Word(alphas, alphanums + "_:").set_name("any tag")
|
| 685 |
+
)
|
| 686 |
+
|
| 687 |
+
_htmlEntityMap = {k.rstrip(";"): v for k, v in html.entities.html5.items()}
|
| 688 |
+
common_html_entity = Regex("&(?P<entity>" + "|".join(_htmlEntityMap) + ");").set_name(
|
| 689 |
+
"common HTML entity"
|
| 690 |
+
)
|
| 691 |
+
|
| 692 |
+
|
| 693 |
+
def replace_html_entity(t):
|
| 694 |
+
"""Helper parser action to replace common HTML entities with their special characters"""
|
| 695 |
+
return _htmlEntityMap.get(t.entity)
|
| 696 |
+
|
| 697 |
+
|
| 698 |
+
class OpAssoc(Enum):
|
| 699 |
+
LEFT = 1
|
| 700 |
+
RIGHT = 2
|
| 701 |
+
|
| 702 |
+
|
| 703 |
+
InfixNotationOperatorArgType = Union[
|
| 704 |
+
ParserElement, str, Tuple[Union[ParserElement, str], Union[ParserElement, str]]
|
| 705 |
+
]
|
| 706 |
+
InfixNotationOperatorSpec = Union[
|
| 707 |
+
Tuple[
|
| 708 |
+
InfixNotationOperatorArgType,
|
| 709 |
+
int,
|
| 710 |
+
OpAssoc,
|
| 711 |
+
OptionalType[ParseAction],
|
| 712 |
+
],
|
| 713 |
+
Tuple[
|
| 714 |
+
InfixNotationOperatorArgType,
|
| 715 |
+
int,
|
| 716 |
+
OpAssoc,
|
| 717 |
+
],
|
| 718 |
+
]
|
| 719 |
+
|
| 720 |
+
|
| 721 |
+
def infix_notation(
|
| 722 |
+
base_expr: ParserElement,
|
| 723 |
+
op_list: List[InfixNotationOperatorSpec],
|
| 724 |
+
lpar: Union[str, ParserElement] = Suppress("("),
|
| 725 |
+
rpar: Union[str, ParserElement] = Suppress(")"),
|
| 726 |
+
) -> ParserElement:
|
| 727 |
+
"""Helper method for constructing grammars of expressions made up of
|
| 728 |
+
operators working in a precedence hierarchy. Operators may be unary
|
| 729 |
+
or binary, left- or right-associative. Parse actions can also be
|
| 730 |
+
attached to operator expressions. The generated parser will also
|
| 731 |
+
recognize the use of parentheses to override operator precedences
|
| 732 |
+
(see example below).
|
| 733 |
+
|
| 734 |
+
Note: if you define a deep operator list, you may see performance
|
| 735 |
+
issues when using infix_notation. See
|
| 736 |
+
:class:`ParserElement.enable_packrat` for a mechanism to potentially
|
| 737 |
+
improve your parser performance.
|
| 738 |
+
|
| 739 |
+
Parameters:
|
| 740 |
+
- ``base_expr`` - expression representing the most basic operand to
|
| 741 |
+
be used in the expression
|
| 742 |
+
- ``op_list`` - list of tuples, one for each operator precedence level
|
| 743 |
+
in the expression grammar; each tuple is of the form ``(op_expr,
|
| 744 |
+
num_operands, right_left_assoc, (optional)parse_action)``, where:
|
| 745 |
+
|
| 746 |
+
- ``op_expr`` is the pyparsing expression for the operator; may also
|
| 747 |
+
be a string, which will be converted to a Literal; if ``num_operands``
|
| 748 |
+
is 3, ``op_expr`` is a tuple of two expressions, for the two
|
| 749 |
+
operators separating the 3 terms
|
| 750 |
+
- ``num_operands`` is the number of terms for this operator (must be 1,
|
| 751 |
+
2, or 3)
|
| 752 |
+
- ``right_left_assoc`` is the indicator whether the operator is right
|
| 753 |
+
or left associative, using the pyparsing-defined constants
|
| 754 |
+
``OpAssoc.RIGHT`` and ``OpAssoc.LEFT``.
|
| 755 |
+
- ``parse_action`` is the parse action to be associated with
|
| 756 |
+
expressions matching this operator expression (the parse action
|
| 757 |
+
tuple member may be omitted); if the parse action is passed
|
| 758 |
+
a tuple or list of functions, this is equivalent to calling
|
| 759 |
+
``set_parse_action(*fn)``
|
| 760 |
+
(:class:`ParserElement.set_parse_action`)
|
| 761 |
+
- ``lpar`` - expression for matching left-parentheses
|
| 762 |
+
(default= ``Suppress('(')``)
|
| 763 |
+
- ``rpar`` - expression for matching right-parentheses
|
| 764 |
+
(default= ``Suppress(')')``)
|
| 765 |
+
|
| 766 |
+
Example::
|
| 767 |
+
|
| 768 |
+
# simple example of four-function arithmetic with ints and
|
| 769 |
+
# variable names
|
| 770 |
+
integer = pyparsing_common.signed_integer
|
| 771 |
+
varname = pyparsing_common.identifier
|
| 772 |
+
|
| 773 |
+
arith_expr = infix_notation(integer | varname,
|
| 774 |
+
[
|
| 775 |
+
('-', 1, OpAssoc.RIGHT),
|
| 776 |
+
(one_of('* /'), 2, OpAssoc.LEFT),
|
| 777 |
+
(one_of('+ -'), 2, OpAssoc.LEFT),
|
| 778 |
+
])
|
| 779 |
+
|
| 780 |
+
arith_expr.run_tests('''
|
| 781 |
+
5+3*6
|
| 782 |
+
(5+3)*6
|
| 783 |
+
-2--11
|
| 784 |
+
''', full_dump=False)
|
| 785 |
+
|
| 786 |
+
prints::
|
| 787 |
+
|
| 788 |
+
5+3*6
|
| 789 |
+
[[5, '+', [3, '*', 6]]]
|
| 790 |
+
|
| 791 |
+
(5+3)*6
|
| 792 |
+
[[[5, '+', 3], '*', 6]]
|
| 793 |
+
|
| 794 |
+
-2--11
|
| 795 |
+
[[['-', 2], '-', ['-', 11]]]
|
| 796 |
+
"""
|
| 797 |
+
# captive version of FollowedBy that does not do parse actions or capture results names
|
| 798 |
+
class _FB(FollowedBy):
|
| 799 |
+
def parseImpl(self, instring, loc, doActions=True):
|
| 800 |
+
self.expr.try_parse(instring, loc)
|
| 801 |
+
return loc, []
|
| 802 |
+
|
| 803 |
+
_FB.__name__ = "FollowedBy>"
|
| 804 |
+
|
| 805 |
+
ret = Forward()
|
| 806 |
+
lpar = Suppress(lpar)
|
| 807 |
+
rpar = Suppress(rpar)
|
| 808 |
+
lastExpr = base_expr | (lpar + ret + rpar)
|
| 809 |
+
for i, operDef in enumerate(op_list):
|
| 810 |
+
opExpr, arity, rightLeftAssoc, pa = (operDef + (None,))[:4]
|
| 811 |
+
if isinstance(opExpr, str_type):
|
| 812 |
+
opExpr = ParserElement._literalStringClass(opExpr)
|
| 813 |
+
if arity == 3:
|
| 814 |
+
if not isinstance(opExpr, (tuple, list)) or len(opExpr) != 2:
|
| 815 |
+
raise ValueError(
|
| 816 |
+
"if numterms=3, opExpr must be a tuple or list of two expressions"
|
| 817 |
+
)
|
| 818 |
+
opExpr1, opExpr2 = opExpr
|
| 819 |
+
term_name = "{}{} term".format(opExpr1, opExpr2)
|
| 820 |
+
else:
|
| 821 |
+
term_name = "{} term".format(opExpr)
|
| 822 |
+
|
| 823 |
+
if not 1 <= arity <= 3:
|
| 824 |
+
raise ValueError("operator must be unary (1), binary (2), or ternary (3)")
|
| 825 |
+
|
| 826 |
+
if rightLeftAssoc not in (OpAssoc.LEFT, OpAssoc.RIGHT):
|
| 827 |
+
raise ValueError("operator must indicate right or left associativity")
|
| 828 |
+
|
| 829 |
+
thisExpr = Forward().set_name(term_name)
|
| 830 |
+
if rightLeftAssoc is OpAssoc.LEFT:
|
| 831 |
+
if arity == 1:
|
| 832 |
+
matchExpr = _FB(lastExpr + opExpr) + Group(lastExpr + opExpr[1, ...])
|
| 833 |
+
elif arity == 2:
|
| 834 |
+
if opExpr is not None:
|
| 835 |
+
matchExpr = _FB(lastExpr + opExpr + lastExpr) + Group(
|
| 836 |
+
lastExpr + (opExpr + lastExpr)[1, ...]
|
| 837 |
+
)
|
| 838 |
+
else:
|
| 839 |
+
matchExpr = _FB(lastExpr + lastExpr) + Group(lastExpr[2, ...])
|
| 840 |
+
elif arity == 3:
|
| 841 |
+
matchExpr = _FB(
|
| 842 |
+
lastExpr + opExpr1 + lastExpr + opExpr2 + lastExpr
|
| 843 |
+
) + Group(lastExpr + OneOrMore(opExpr1 + lastExpr + opExpr2 + lastExpr))
|
| 844 |
+
elif rightLeftAssoc is OpAssoc.RIGHT:
|
| 845 |
+
if arity == 1:
|
| 846 |
+
# try to avoid LR with this extra test
|
| 847 |
+
if not isinstance(opExpr, Opt):
|
| 848 |
+
opExpr = Opt(opExpr)
|
| 849 |
+
matchExpr = _FB(opExpr.expr + thisExpr) + Group(opExpr + thisExpr)
|
| 850 |
+
elif arity == 2:
|
| 851 |
+
if opExpr is not None:
|
| 852 |
+
matchExpr = _FB(lastExpr + opExpr + thisExpr) + Group(
|
| 853 |
+
lastExpr + (opExpr + thisExpr)[1, ...]
|
| 854 |
+
)
|
| 855 |
+
else:
|
| 856 |
+
matchExpr = _FB(lastExpr + thisExpr) + Group(
|
| 857 |
+
lastExpr + thisExpr[1, ...]
|
| 858 |
+
)
|
| 859 |
+
elif arity == 3:
|
| 860 |
+
matchExpr = _FB(
|
| 861 |
+
lastExpr + opExpr1 + thisExpr + opExpr2 + thisExpr
|
| 862 |
+
) + Group(lastExpr + opExpr1 + thisExpr + opExpr2 + thisExpr)
|
| 863 |
+
if pa:
|
| 864 |
+
if isinstance(pa, (tuple, list)):
|
| 865 |
+
matchExpr.set_parse_action(*pa)
|
| 866 |
+
else:
|
| 867 |
+
matchExpr.set_parse_action(pa)
|
| 868 |
+
thisExpr <<= (matchExpr | lastExpr).setName(term_name)
|
| 869 |
+
lastExpr = thisExpr
|
| 870 |
+
ret <<= lastExpr
|
| 871 |
+
return ret
|
| 872 |
+
|
| 873 |
+
|
| 874 |
+
def indentedBlock(blockStatementExpr, indentStack, indent=True, backup_stacks=[]):
|
| 875 |
+
"""
|
| 876 |
+
(DEPRECATED - use IndentedBlock class instead)
|
| 877 |
+
Helper method for defining space-delimited indentation blocks,
|
| 878 |
+
such as those used to define block statements in Python source code.
|
| 879 |
+
|
| 880 |
+
Parameters:
|
| 881 |
+
|
| 882 |
+
- ``blockStatementExpr`` - expression defining syntax of statement that
|
| 883 |
+
is repeated within the indented block
|
| 884 |
+
- ``indentStack`` - list created by caller to manage indentation stack
|
| 885 |
+
(multiple ``statementWithIndentedBlock`` expressions within a single
|
| 886 |
+
grammar should share a common ``indentStack``)
|
| 887 |
+
- ``indent`` - boolean indicating whether block must be indented beyond
|
| 888 |
+
the current level; set to ``False`` for block of left-most statements
|
| 889 |
+
(default= ``True``)
|
| 890 |
+
|
| 891 |
+
A valid block must contain at least one ``blockStatement``.
|
| 892 |
+
|
| 893 |
+
(Note that indentedBlock uses internal parse actions which make it
|
| 894 |
+
incompatible with packrat parsing.)
|
| 895 |
+
|
| 896 |
+
Example::
|
| 897 |
+
|
| 898 |
+
data = '''
|
| 899 |
+
def A(z):
|
| 900 |
+
A1
|
| 901 |
+
B = 100
|
| 902 |
+
G = A2
|
| 903 |
+
A2
|
| 904 |
+
A3
|
| 905 |
+
B
|
| 906 |
+
def BB(a,b,c):
|
| 907 |
+
BB1
|
| 908 |
+
def BBA():
|
| 909 |
+
bba1
|
| 910 |
+
bba2
|
| 911 |
+
bba3
|
| 912 |
+
C
|
| 913 |
+
D
|
| 914 |
+
def spam(x,y):
|
| 915 |
+
def eggs(z):
|
| 916 |
+
pass
|
| 917 |
+
'''
|
| 918 |
+
|
| 919 |
+
|
| 920 |
+
indentStack = [1]
|
| 921 |
+
stmt = Forward()
|
| 922 |
+
|
| 923 |
+
identifier = Word(alphas, alphanums)
|
| 924 |
+
funcDecl = ("def" + identifier + Group("(" + Opt(delimitedList(identifier)) + ")") + ":")
|
| 925 |
+
func_body = indentedBlock(stmt, indentStack)
|
| 926 |
+
funcDef = Group(funcDecl + func_body)
|
| 927 |
+
|
| 928 |
+
rvalue = Forward()
|
| 929 |
+
funcCall = Group(identifier + "(" + Opt(delimitedList(rvalue)) + ")")
|
| 930 |
+
rvalue << (funcCall | identifier | Word(nums))
|
| 931 |
+
assignment = Group(identifier + "=" + rvalue)
|
| 932 |
+
stmt << (funcDef | assignment | identifier)
|
| 933 |
+
|
| 934 |
+
module_body = OneOrMore(stmt)
|
| 935 |
+
|
| 936 |
+
parseTree = module_body.parseString(data)
|
| 937 |
+
parseTree.pprint()
|
| 938 |
+
|
| 939 |
+
prints::
|
| 940 |
+
|
| 941 |
+
[['def',
|
| 942 |
+
'A',
|
| 943 |
+
['(', 'z', ')'],
|
| 944 |
+
':',
|
| 945 |
+
[['A1'], [['B', '=', '100']], [['G', '=', 'A2']], ['A2'], ['A3']]],
|
| 946 |
+
'B',
|
| 947 |
+
['def',
|
| 948 |
+
'BB',
|
| 949 |
+
['(', 'a', 'b', 'c', ')'],
|
| 950 |
+
':',
|
| 951 |
+
[['BB1'], [['def', 'BBA', ['(', ')'], ':', [['bba1'], ['bba2'], ['bba3']]]]]],
|
| 952 |
+
'C',
|
| 953 |
+
'D',
|
| 954 |
+
['def',
|
| 955 |
+
'spam',
|
| 956 |
+
['(', 'x', 'y', ')'],
|
| 957 |
+
':',
|
| 958 |
+
[[['def', 'eggs', ['(', 'z', ')'], ':', [['pass']]]]]]]
|
| 959 |
+
"""
|
| 960 |
+
backup_stacks.append(indentStack[:])
|
| 961 |
+
|
| 962 |
+
def reset_stack():
|
| 963 |
+
indentStack[:] = backup_stacks[-1]
|
| 964 |
+
|
| 965 |
+
def checkPeerIndent(s, l, t):
|
| 966 |
+
if l >= len(s):
|
| 967 |
+
return
|
| 968 |
+
curCol = col(l, s)
|
| 969 |
+
if curCol != indentStack[-1]:
|
| 970 |
+
if curCol > indentStack[-1]:
|
| 971 |
+
raise ParseException(s, l, "illegal nesting")
|
| 972 |
+
raise ParseException(s, l, "not a peer entry")
|
| 973 |
+
|
| 974 |
+
def checkSubIndent(s, l, t):
|
| 975 |
+
curCol = col(l, s)
|
| 976 |
+
if curCol > indentStack[-1]:
|
| 977 |
+
indentStack.append(curCol)
|
| 978 |
+
else:
|
| 979 |
+
raise ParseException(s, l, "not a subentry")
|
| 980 |
+
|
| 981 |
+
def checkUnindent(s, l, t):
|
| 982 |
+
if l >= len(s):
|
| 983 |
+
return
|
| 984 |
+
curCol = col(l, s)
|
| 985 |
+
if not (indentStack and curCol in indentStack):
|
| 986 |
+
raise ParseException(s, l, "not an unindent")
|
| 987 |
+
if curCol < indentStack[-1]:
|
| 988 |
+
indentStack.pop()
|
| 989 |
+
|
| 990 |
+
NL = OneOrMore(LineEnd().set_whitespace_chars("\t ").suppress())
|
| 991 |
+
INDENT = (Empty() + Empty().set_parse_action(checkSubIndent)).set_name("INDENT")
|
| 992 |
+
PEER = Empty().set_parse_action(checkPeerIndent).set_name("")
|
| 993 |
+
UNDENT = Empty().set_parse_action(checkUnindent).set_name("UNINDENT")
|
| 994 |
+
if indent:
|
| 995 |
+
smExpr = Group(
|
| 996 |
+
Opt(NL)
|
| 997 |
+
+ INDENT
|
| 998 |
+
+ OneOrMore(PEER + Group(blockStatementExpr) + Opt(NL))
|
| 999 |
+
+ UNDENT
|
| 1000 |
+
)
|
| 1001 |
+
else:
|
| 1002 |
+
smExpr = Group(
|
| 1003 |
+
Opt(NL)
|
| 1004 |
+
+ OneOrMore(PEER + Group(blockStatementExpr) + Opt(NL))
|
| 1005 |
+
+ Opt(UNDENT)
|
| 1006 |
+
)
|
| 1007 |
+
|
| 1008 |
+
# add a parse action to remove backup_stack from list of backups
|
| 1009 |
+
smExpr.add_parse_action(
|
| 1010 |
+
lambda: backup_stacks.pop(-1) and None if backup_stacks else None
|
| 1011 |
+
)
|
| 1012 |
+
smExpr.set_fail_action(lambda a, b, c, d: reset_stack())
|
| 1013 |
+
blockStatementExpr.ignore(_bslash + LineEnd())
|
| 1014 |
+
return smExpr.set_name("indented block")
|
| 1015 |
+
|
| 1016 |
+
|
| 1017 |
+
# it's easy to get these comment structures wrong - they're very common, so may as well make them available
|
| 1018 |
+
c_style_comment = Combine(Regex(r"/\*(?:[^*]|\*(?!/))*") + "*/").set_name(
|
| 1019 |
+
"C style comment"
|
| 1020 |
+
)
|
| 1021 |
+
"Comment of the form ``/* ... */``"
|
| 1022 |
+
|
| 1023 |
+
html_comment = Regex(r"<!--[\s\S]*?-->").set_name("HTML comment")
|
| 1024 |
+
"Comment of the form ``<!-- ... -->``"
|
| 1025 |
+
|
| 1026 |
+
rest_of_line = Regex(r".*").leave_whitespace().set_name("rest of line")
|
| 1027 |
+
dbl_slash_comment = Regex(r"//(?:\\\n|[^\n])*").set_name("// comment")
|
| 1028 |
+
"Comment of the form ``// ... (to end of line)``"
|
| 1029 |
+
|
| 1030 |
+
cpp_style_comment = Combine(
|
| 1031 |
+
Regex(r"/\*(?:[^*]|\*(?!/))*") + "*/" | dbl_slash_comment
|
| 1032 |
+
).set_name("C++ style comment")
|
| 1033 |
+
"Comment of either form :class:`c_style_comment` or :class:`dbl_slash_comment`"
|
| 1034 |
+
|
| 1035 |
+
java_style_comment = cpp_style_comment
|
| 1036 |
+
"Same as :class:`cpp_style_comment`"
|
| 1037 |
+
|
| 1038 |
+
python_style_comment = Regex(r"#.*").set_name("Python style comment")
|
| 1039 |
+
"Comment of the form ``# ... (to end of line)``"
|
| 1040 |
+
|
| 1041 |
+
|
| 1042 |
+
# build list of built-in expressions, for future reference if a global default value
|
| 1043 |
+
# gets updated
|
| 1044 |
+
_builtin_exprs = [v for v in vars().values() if isinstance(v, ParserElement)]
|
| 1045 |
+
|
| 1046 |
+
|
| 1047 |
+
# pre-PEP8 compatible names
|
| 1048 |
+
delimitedList = delimited_list
|
| 1049 |
+
countedArray = counted_array
|
| 1050 |
+
matchPreviousLiteral = match_previous_literal
|
| 1051 |
+
matchPreviousExpr = match_previous_expr
|
| 1052 |
+
oneOf = one_of
|
| 1053 |
+
dictOf = dict_of
|
| 1054 |
+
originalTextFor = original_text_for
|
| 1055 |
+
nestedExpr = nested_expr
|
| 1056 |
+
makeHTMLTags = make_html_tags
|
| 1057 |
+
makeXMLTags = make_xml_tags
|
| 1058 |
+
anyOpenTag, anyCloseTag = any_open_tag, any_close_tag
|
| 1059 |
+
commonHTMLEntity = common_html_entity
|
| 1060 |
+
replaceHTMLEntity = replace_html_entity
|
| 1061 |
+
opAssoc = OpAssoc
|
| 1062 |
+
infixNotation = infix_notation
|
| 1063 |
+
cStyleComment = c_style_comment
|
| 1064 |
+
htmlComment = html_comment
|
| 1065 |
+
restOfLine = rest_of_line
|
| 1066 |
+
dblSlashComment = dbl_slash_comment
|
| 1067 |
+
cppStyleComment = cpp_style_comment
|
| 1068 |
+
javaStyleComment = java_style_comment
|
| 1069 |
+
pythonStyleComment = python_style_comment
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/results.py
ADDED
|
@@ -0,0 +1,760 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# results.py
|
| 2 |
+
from collections.abc import MutableMapping, Mapping, MutableSequence, Iterator
|
| 3 |
+
import pprint
|
| 4 |
+
from weakref import ref as wkref
|
| 5 |
+
from typing import Tuple, Any
|
| 6 |
+
|
| 7 |
+
str_type: Tuple[type, ...] = (str, bytes)
|
| 8 |
+
_generator_type = type((_ for _ in ()))
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class _ParseResultsWithOffset:
|
| 12 |
+
__slots__ = ["tup"]
|
| 13 |
+
|
| 14 |
+
def __init__(self, p1, p2):
|
| 15 |
+
self.tup = (p1, p2)
|
| 16 |
+
|
| 17 |
+
def __getitem__(self, i):
|
| 18 |
+
return self.tup[i]
|
| 19 |
+
|
| 20 |
+
def __getstate__(self):
|
| 21 |
+
return self.tup
|
| 22 |
+
|
| 23 |
+
def __setstate__(self, *args):
|
| 24 |
+
self.tup = args[0]
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
class ParseResults:
|
| 28 |
+
"""Structured parse results, to provide multiple means of access to
|
| 29 |
+
the parsed data:
|
| 30 |
+
|
| 31 |
+
- as a list (``len(results)``)
|
| 32 |
+
- by list index (``results[0], results[1]``, etc.)
|
| 33 |
+
- by attribute (``results.<results_name>`` - see :class:`ParserElement.set_results_name`)
|
| 34 |
+
|
| 35 |
+
Example::
|
| 36 |
+
|
| 37 |
+
integer = Word(nums)
|
| 38 |
+
date_str = (integer.set_results_name("year") + '/'
|
| 39 |
+
+ integer.set_results_name("month") + '/'
|
| 40 |
+
+ integer.set_results_name("day"))
|
| 41 |
+
# equivalent form:
|
| 42 |
+
# date_str = (integer("year") + '/'
|
| 43 |
+
# + integer("month") + '/'
|
| 44 |
+
# + integer("day"))
|
| 45 |
+
|
| 46 |
+
# parse_string returns a ParseResults object
|
| 47 |
+
result = date_str.parse_string("1999/12/31")
|
| 48 |
+
|
| 49 |
+
def test(s, fn=repr):
|
| 50 |
+
print("{} -> {}".format(s, fn(eval(s))))
|
| 51 |
+
test("list(result)")
|
| 52 |
+
test("result[0]")
|
| 53 |
+
test("result['month']")
|
| 54 |
+
test("result.day")
|
| 55 |
+
test("'month' in result")
|
| 56 |
+
test("'minutes' in result")
|
| 57 |
+
test("result.dump()", str)
|
| 58 |
+
|
| 59 |
+
prints::
|
| 60 |
+
|
| 61 |
+
list(result) -> ['1999', '/', '12', '/', '31']
|
| 62 |
+
result[0] -> '1999'
|
| 63 |
+
result['month'] -> '12'
|
| 64 |
+
result.day -> '31'
|
| 65 |
+
'month' in result -> True
|
| 66 |
+
'minutes' in result -> False
|
| 67 |
+
result.dump() -> ['1999', '/', '12', '/', '31']
|
| 68 |
+
- day: 31
|
| 69 |
+
- month: 12
|
| 70 |
+
- year: 1999
|
| 71 |
+
"""
|
| 72 |
+
|
| 73 |
+
_null_values: Tuple[Any, ...] = (None, [], "", ())
|
| 74 |
+
|
| 75 |
+
__slots__ = [
|
| 76 |
+
"_name",
|
| 77 |
+
"_parent",
|
| 78 |
+
"_all_names",
|
| 79 |
+
"_modal",
|
| 80 |
+
"_toklist",
|
| 81 |
+
"_tokdict",
|
| 82 |
+
"__weakref__",
|
| 83 |
+
]
|
| 84 |
+
|
| 85 |
+
class List(list):
|
| 86 |
+
"""
|
| 87 |
+
Simple wrapper class to distinguish parsed list results that should be preserved
|
| 88 |
+
as actual Python lists, instead of being converted to :class:`ParseResults`:
|
| 89 |
+
|
| 90 |
+
LBRACK, RBRACK = map(pp.Suppress, "[]")
|
| 91 |
+
element = pp.Forward()
|
| 92 |
+
item = ppc.integer
|
| 93 |
+
element_list = LBRACK + pp.delimited_list(element) + RBRACK
|
| 94 |
+
|
| 95 |
+
# add parse actions to convert from ParseResults to actual Python collection types
|
| 96 |
+
def as_python_list(t):
|
| 97 |
+
return pp.ParseResults.List(t.as_list())
|
| 98 |
+
element_list.add_parse_action(as_python_list)
|
| 99 |
+
|
| 100 |
+
element <<= item | element_list
|
| 101 |
+
|
| 102 |
+
element.run_tests('''
|
| 103 |
+
100
|
| 104 |
+
[2,3,4]
|
| 105 |
+
[[2, 1],3,4]
|
| 106 |
+
[(2, 1),3,4]
|
| 107 |
+
(2,3,4)
|
| 108 |
+
''', post_parse=lambda s, r: (r[0], type(r[0])))
|
| 109 |
+
|
| 110 |
+
prints:
|
| 111 |
+
|
| 112 |
+
100
|
| 113 |
+
(100, <class 'int'>)
|
| 114 |
+
|
| 115 |
+
[2,3,4]
|
| 116 |
+
([2, 3, 4], <class 'list'>)
|
| 117 |
+
|
| 118 |
+
[[2, 1],3,4]
|
| 119 |
+
([[2, 1], 3, 4], <class 'list'>)
|
| 120 |
+
|
| 121 |
+
(Used internally by :class:`Group` when `aslist=True`.)
|
| 122 |
+
"""
|
| 123 |
+
|
| 124 |
+
def __new__(cls, contained=None):
|
| 125 |
+
if contained is None:
|
| 126 |
+
contained = []
|
| 127 |
+
|
| 128 |
+
if not isinstance(contained, list):
|
| 129 |
+
raise TypeError(
|
| 130 |
+
"{} may only be constructed with a list,"
|
| 131 |
+
" not {}".format(cls.__name__, type(contained).__name__)
|
| 132 |
+
)
|
| 133 |
+
|
| 134 |
+
return list.__new__(cls)
|
| 135 |
+
|
| 136 |
+
def __new__(cls, toklist=None, name=None, **kwargs):
|
| 137 |
+
if isinstance(toklist, ParseResults):
|
| 138 |
+
return toklist
|
| 139 |
+
self = object.__new__(cls)
|
| 140 |
+
self._name = None
|
| 141 |
+
self._parent = None
|
| 142 |
+
self._all_names = set()
|
| 143 |
+
|
| 144 |
+
if toklist is None:
|
| 145 |
+
self._toklist = []
|
| 146 |
+
elif isinstance(toklist, (list, _generator_type)):
|
| 147 |
+
self._toklist = (
|
| 148 |
+
[toklist[:]]
|
| 149 |
+
if isinstance(toklist, ParseResults.List)
|
| 150 |
+
else list(toklist)
|
| 151 |
+
)
|
| 152 |
+
else:
|
| 153 |
+
self._toklist = [toklist]
|
| 154 |
+
self._tokdict = dict()
|
| 155 |
+
return self
|
| 156 |
+
|
| 157 |
+
# Performance tuning: we construct a *lot* of these, so keep this
|
| 158 |
+
# constructor as small and fast as possible
|
| 159 |
+
def __init__(
|
| 160 |
+
self, toklist=None, name=None, asList=True, modal=True, isinstance=isinstance
|
| 161 |
+
):
|
| 162 |
+
self._modal = modal
|
| 163 |
+
if name is not None and name != "":
|
| 164 |
+
if isinstance(name, int):
|
| 165 |
+
name = str(name)
|
| 166 |
+
if not modal:
|
| 167 |
+
self._all_names = {name}
|
| 168 |
+
self._name = name
|
| 169 |
+
if toklist not in self._null_values:
|
| 170 |
+
if isinstance(toklist, (str_type, type)):
|
| 171 |
+
toklist = [toklist]
|
| 172 |
+
if asList:
|
| 173 |
+
if isinstance(toklist, ParseResults):
|
| 174 |
+
self[name] = _ParseResultsWithOffset(
|
| 175 |
+
ParseResults(toklist._toklist), 0
|
| 176 |
+
)
|
| 177 |
+
else:
|
| 178 |
+
self[name] = _ParseResultsWithOffset(
|
| 179 |
+
ParseResults(toklist[0]), 0
|
| 180 |
+
)
|
| 181 |
+
self[name]._name = name
|
| 182 |
+
else:
|
| 183 |
+
try:
|
| 184 |
+
self[name] = toklist[0]
|
| 185 |
+
except (KeyError, TypeError, IndexError):
|
| 186 |
+
if toklist is not self:
|
| 187 |
+
self[name] = toklist
|
| 188 |
+
else:
|
| 189 |
+
self._name = name
|
| 190 |
+
|
| 191 |
+
def __getitem__(self, i):
|
| 192 |
+
if isinstance(i, (int, slice)):
|
| 193 |
+
return self._toklist[i]
|
| 194 |
+
else:
|
| 195 |
+
if i not in self._all_names:
|
| 196 |
+
return self._tokdict[i][-1][0]
|
| 197 |
+
else:
|
| 198 |
+
return ParseResults([v[0] for v in self._tokdict[i]])
|
| 199 |
+
|
| 200 |
+
def __setitem__(self, k, v, isinstance=isinstance):
|
| 201 |
+
if isinstance(v, _ParseResultsWithOffset):
|
| 202 |
+
self._tokdict[k] = self._tokdict.get(k, list()) + [v]
|
| 203 |
+
sub = v[0]
|
| 204 |
+
elif isinstance(k, (int, slice)):
|
| 205 |
+
self._toklist[k] = v
|
| 206 |
+
sub = v
|
| 207 |
+
else:
|
| 208 |
+
self._tokdict[k] = self._tokdict.get(k, list()) + [
|
| 209 |
+
_ParseResultsWithOffset(v, 0)
|
| 210 |
+
]
|
| 211 |
+
sub = v
|
| 212 |
+
if isinstance(sub, ParseResults):
|
| 213 |
+
sub._parent = wkref(self)
|
| 214 |
+
|
| 215 |
+
def __delitem__(self, i):
|
| 216 |
+
if isinstance(i, (int, slice)):
|
| 217 |
+
mylen = len(self._toklist)
|
| 218 |
+
del self._toklist[i]
|
| 219 |
+
|
| 220 |
+
# convert int to slice
|
| 221 |
+
if isinstance(i, int):
|
| 222 |
+
if i < 0:
|
| 223 |
+
i += mylen
|
| 224 |
+
i = slice(i, i + 1)
|
| 225 |
+
# get removed indices
|
| 226 |
+
removed = list(range(*i.indices(mylen)))
|
| 227 |
+
removed.reverse()
|
| 228 |
+
# fixup indices in token dictionary
|
| 229 |
+
for name, occurrences in self._tokdict.items():
|
| 230 |
+
for j in removed:
|
| 231 |
+
for k, (value, position) in enumerate(occurrences):
|
| 232 |
+
occurrences[k] = _ParseResultsWithOffset(
|
| 233 |
+
value, position - (position > j)
|
| 234 |
+
)
|
| 235 |
+
else:
|
| 236 |
+
del self._tokdict[i]
|
| 237 |
+
|
| 238 |
+
def __contains__(self, k) -> bool:
|
| 239 |
+
return k in self._tokdict
|
| 240 |
+
|
| 241 |
+
def __len__(self) -> int:
|
| 242 |
+
return len(self._toklist)
|
| 243 |
+
|
| 244 |
+
def __bool__(self) -> bool:
|
| 245 |
+
return not not (self._toklist or self._tokdict)
|
| 246 |
+
|
| 247 |
+
def __iter__(self) -> Iterator:
|
| 248 |
+
return iter(self._toklist)
|
| 249 |
+
|
| 250 |
+
def __reversed__(self) -> Iterator:
|
| 251 |
+
return iter(self._toklist[::-1])
|
| 252 |
+
|
| 253 |
+
def keys(self):
|
| 254 |
+
return iter(self._tokdict)
|
| 255 |
+
|
| 256 |
+
def values(self):
|
| 257 |
+
return (self[k] for k in self.keys())
|
| 258 |
+
|
| 259 |
+
def items(self):
|
| 260 |
+
return ((k, self[k]) for k in self.keys())
|
| 261 |
+
|
| 262 |
+
def haskeys(self) -> bool:
|
| 263 |
+
"""
|
| 264 |
+
Since ``keys()`` returns an iterator, this method is helpful in bypassing
|
| 265 |
+
code that looks for the existence of any defined results names."""
|
| 266 |
+
return bool(self._tokdict)
|
| 267 |
+
|
| 268 |
+
def pop(self, *args, **kwargs):
|
| 269 |
+
"""
|
| 270 |
+
Removes and returns item at specified index (default= ``last``).
|
| 271 |
+
Supports both ``list`` and ``dict`` semantics for ``pop()``. If
|
| 272 |
+
passed no argument or an integer argument, it will use ``list``
|
| 273 |
+
semantics and pop tokens from the list of parsed tokens. If passed
|
| 274 |
+
a non-integer argument (most likely a string), it will use ``dict``
|
| 275 |
+
semantics and pop the corresponding value from any defined results
|
| 276 |
+
names. A second default return value argument is supported, just as in
|
| 277 |
+
``dict.pop()``.
|
| 278 |
+
|
| 279 |
+
Example::
|
| 280 |
+
|
| 281 |
+
numlist = Word(nums)[...]
|
| 282 |
+
print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321']
|
| 283 |
+
|
| 284 |
+
def remove_first(tokens):
|
| 285 |
+
tokens.pop(0)
|
| 286 |
+
numlist.add_parse_action(remove_first)
|
| 287 |
+
print(numlist.parse_string("0 123 321")) # -> ['123', '321']
|
| 288 |
+
|
| 289 |
+
label = Word(alphas)
|
| 290 |
+
patt = label("LABEL") + OneOrMore(Word(nums))
|
| 291 |
+
print(patt.parse_string("AAB 123 321").dump())
|
| 292 |
+
|
| 293 |
+
# Use pop() in a parse action to remove named result (note that corresponding value is not
|
| 294 |
+
# removed from list form of results)
|
| 295 |
+
def remove_LABEL(tokens):
|
| 296 |
+
tokens.pop("LABEL")
|
| 297 |
+
return tokens
|
| 298 |
+
patt.add_parse_action(remove_LABEL)
|
| 299 |
+
print(patt.parse_string("AAB 123 321").dump())
|
| 300 |
+
|
| 301 |
+
prints::
|
| 302 |
+
|
| 303 |
+
['AAB', '123', '321']
|
| 304 |
+
- LABEL: AAB
|
| 305 |
+
|
| 306 |
+
['AAB', '123', '321']
|
| 307 |
+
"""
|
| 308 |
+
if not args:
|
| 309 |
+
args = [-1]
|
| 310 |
+
for k, v in kwargs.items():
|
| 311 |
+
if k == "default":
|
| 312 |
+
args = (args[0], v)
|
| 313 |
+
else:
|
| 314 |
+
raise TypeError(
|
| 315 |
+
"pop() got an unexpected keyword argument {!r}".format(k)
|
| 316 |
+
)
|
| 317 |
+
if isinstance(args[0], int) or len(args) == 1 or args[0] in self:
|
| 318 |
+
index = args[0]
|
| 319 |
+
ret = self[index]
|
| 320 |
+
del self[index]
|
| 321 |
+
return ret
|
| 322 |
+
else:
|
| 323 |
+
defaultvalue = args[1]
|
| 324 |
+
return defaultvalue
|
| 325 |
+
|
| 326 |
+
def get(self, key, default_value=None):
|
| 327 |
+
"""
|
| 328 |
+
Returns named result matching the given key, or if there is no
|
| 329 |
+
such name, then returns the given ``default_value`` or ``None`` if no
|
| 330 |
+
``default_value`` is specified.
|
| 331 |
+
|
| 332 |
+
Similar to ``dict.get()``.
|
| 333 |
+
|
| 334 |
+
Example::
|
| 335 |
+
|
| 336 |
+
integer = Word(nums)
|
| 337 |
+
date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
|
| 338 |
+
|
| 339 |
+
result = date_str.parse_string("1999/12/31")
|
| 340 |
+
print(result.get("year")) # -> '1999'
|
| 341 |
+
print(result.get("hour", "not specified")) # -> 'not specified'
|
| 342 |
+
print(result.get("hour")) # -> None
|
| 343 |
+
"""
|
| 344 |
+
if key in self:
|
| 345 |
+
return self[key]
|
| 346 |
+
else:
|
| 347 |
+
return default_value
|
| 348 |
+
|
| 349 |
+
def insert(self, index, ins_string):
|
| 350 |
+
"""
|
| 351 |
+
Inserts new element at location index in the list of parsed tokens.
|
| 352 |
+
|
| 353 |
+
Similar to ``list.insert()``.
|
| 354 |
+
|
| 355 |
+
Example::
|
| 356 |
+
|
| 357 |
+
numlist = Word(nums)[...]
|
| 358 |
+
print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321']
|
| 359 |
+
|
| 360 |
+
# use a parse action to insert the parse location in the front of the parsed results
|
| 361 |
+
def insert_locn(locn, tokens):
|
| 362 |
+
tokens.insert(0, locn)
|
| 363 |
+
numlist.add_parse_action(insert_locn)
|
| 364 |
+
print(numlist.parse_string("0 123 321")) # -> [0, '0', '123', '321']
|
| 365 |
+
"""
|
| 366 |
+
self._toklist.insert(index, ins_string)
|
| 367 |
+
# fixup indices in token dictionary
|
| 368 |
+
for name, occurrences in self._tokdict.items():
|
| 369 |
+
for k, (value, position) in enumerate(occurrences):
|
| 370 |
+
occurrences[k] = _ParseResultsWithOffset(
|
| 371 |
+
value, position + (position > index)
|
| 372 |
+
)
|
| 373 |
+
|
| 374 |
+
def append(self, item):
|
| 375 |
+
"""
|
| 376 |
+
Add single element to end of ``ParseResults`` list of elements.
|
| 377 |
+
|
| 378 |
+
Example::
|
| 379 |
+
|
| 380 |
+
numlist = Word(nums)[...]
|
| 381 |
+
print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321']
|
| 382 |
+
|
| 383 |
+
# use a parse action to compute the sum of the parsed integers, and add it to the end
|
| 384 |
+
def append_sum(tokens):
|
| 385 |
+
tokens.append(sum(map(int, tokens)))
|
| 386 |
+
numlist.add_parse_action(append_sum)
|
| 387 |
+
print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321', 444]
|
| 388 |
+
"""
|
| 389 |
+
self._toklist.append(item)
|
| 390 |
+
|
| 391 |
+
def extend(self, itemseq):
|
| 392 |
+
"""
|
| 393 |
+
Add sequence of elements to end of ``ParseResults`` list of elements.
|
| 394 |
+
|
| 395 |
+
Example::
|
| 396 |
+
|
| 397 |
+
patt = OneOrMore(Word(alphas))
|
| 398 |
+
|
| 399 |
+
# use a parse action to append the reverse of the matched strings, to make a palindrome
|
| 400 |
+
def make_palindrome(tokens):
|
| 401 |
+
tokens.extend(reversed([t[::-1] for t in tokens]))
|
| 402 |
+
return ''.join(tokens)
|
| 403 |
+
patt.add_parse_action(make_palindrome)
|
| 404 |
+
print(patt.parse_string("lskdj sdlkjf lksd")) # -> 'lskdjsdlkjflksddsklfjkldsjdksl'
|
| 405 |
+
"""
|
| 406 |
+
if isinstance(itemseq, ParseResults):
|
| 407 |
+
self.__iadd__(itemseq)
|
| 408 |
+
else:
|
| 409 |
+
self._toklist.extend(itemseq)
|
| 410 |
+
|
| 411 |
+
def clear(self):
|
| 412 |
+
"""
|
| 413 |
+
Clear all elements and results names.
|
| 414 |
+
"""
|
| 415 |
+
del self._toklist[:]
|
| 416 |
+
self._tokdict.clear()
|
| 417 |
+
|
| 418 |
+
def __getattr__(self, name):
|
| 419 |
+
try:
|
| 420 |
+
return self[name]
|
| 421 |
+
except KeyError:
|
| 422 |
+
if name.startswith("__"):
|
| 423 |
+
raise AttributeError(name)
|
| 424 |
+
return ""
|
| 425 |
+
|
| 426 |
+
def __add__(self, other) -> "ParseResults":
|
| 427 |
+
ret = self.copy()
|
| 428 |
+
ret += other
|
| 429 |
+
return ret
|
| 430 |
+
|
| 431 |
+
def __iadd__(self, other) -> "ParseResults":
|
| 432 |
+
if other._tokdict:
|
| 433 |
+
offset = len(self._toklist)
|
| 434 |
+
addoffset = lambda a: offset if a < 0 else a + offset
|
| 435 |
+
otheritems = other._tokdict.items()
|
| 436 |
+
otherdictitems = [
|
| 437 |
+
(k, _ParseResultsWithOffset(v[0], addoffset(v[1])))
|
| 438 |
+
for k, vlist in otheritems
|
| 439 |
+
for v in vlist
|
| 440 |
+
]
|
| 441 |
+
for k, v in otherdictitems:
|
| 442 |
+
self[k] = v
|
| 443 |
+
if isinstance(v[0], ParseResults):
|
| 444 |
+
v[0]._parent = wkref(self)
|
| 445 |
+
|
| 446 |
+
self._toklist += other._toklist
|
| 447 |
+
self._all_names |= other._all_names
|
| 448 |
+
return self
|
| 449 |
+
|
| 450 |
+
def __radd__(self, other) -> "ParseResults":
|
| 451 |
+
if isinstance(other, int) and other == 0:
|
| 452 |
+
# useful for merging many ParseResults using sum() builtin
|
| 453 |
+
return self.copy()
|
| 454 |
+
else:
|
| 455 |
+
# this may raise a TypeError - so be it
|
| 456 |
+
return other + self
|
| 457 |
+
|
| 458 |
+
def __repr__(self) -> str:
|
| 459 |
+
return "{}({!r}, {})".format(type(self).__name__, self._toklist, self.as_dict())
|
| 460 |
+
|
| 461 |
+
def __str__(self) -> str:
|
| 462 |
+
return (
|
| 463 |
+
"["
|
| 464 |
+
+ ", ".join(
|
| 465 |
+
[
|
| 466 |
+
str(i) if isinstance(i, ParseResults) else repr(i)
|
| 467 |
+
for i in self._toklist
|
| 468 |
+
]
|
| 469 |
+
)
|
| 470 |
+
+ "]"
|
| 471 |
+
)
|
| 472 |
+
|
| 473 |
+
def _asStringList(self, sep=""):
|
| 474 |
+
out = []
|
| 475 |
+
for item in self._toklist:
|
| 476 |
+
if out and sep:
|
| 477 |
+
out.append(sep)
|
| 478 |
+
if isinstance(item, ParseResults):
|
| 479 |
+
out += item._asStringList()
|
| 480 |
+
else:
|
| 481 |
+
out.append(str(item))
|
| 482 |
+
return out
|
| 483 |
+
|
| 484 |
+
def as_list(self) -> list:
|
| 485 |
+
"""
|
| 486 |
+
Returns the parse results as a nested list of matching tokens, all converted to strings.
|
| 487 |
+
|
| 488 |
+
Example::
|
| 489 |
+
|
| 490 |
+
patt = OneOrMore(Word(alphas))
|
| 491 |
+
result = patt.parse_string("sldkj lsdkj sldkj")
|
| 492 |
+
# even though the result prints in string-like form, it is actually a pyparsing ParseResults
|
| 493 |
+
print(type(result), result) # -> <class 'pyparsing.ParseResults'> ['sldkj', 'lsdkj', 'sldkj']
|
| 494 |
+
|
| 495 |
+
# Use as_list() to create an actual list
|
| 496 |
+
result_list = result.as_list()
|
| 497 |
+
print(type(result_list), result_list) # -> <class 'list'> ['sldkj', 'lsdkj', 'sldkj']
|
| 498 |
+
"""
|
| 499 |
+
return [
|
| 500 |
+
res.as_list() if isinstance(res, ParseResults) else res
|
| 501 |
+
for res in self._toklist
|
| 502 |
+
]
|
| 503 |
+
|
| 504 |
+
def as_dict(self) -> dict:
|
| 505 |
+
"""
|
| 506 |
+
Returns the named parse results as a nested dictionary.
|
| 507 |
+
|
| 508 |
+
Example::
|
| 509 |
+
|
| 510 |
+
integer = Word(nums)
|
| 511 |
+
date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
|
| 512 |
+
|
| 513 |
+
result = date_str.parse_string('12/31/1999')
|
| 514 |
+
print(type(result), repr(result)) # -> <class 'pyparsing.ParseResults'> (['12', '/', '31', '/', '1999'], {'day': [('1999', 4)], 'year': [('12', 0)], 'month': [('31', 2)]})
|
| 515 |
+
|
| 516 |
+
result_dict = result.as_dict()
|
| 517 |
+
print(type(result_dict), repr(result_dict)) # -> <class 'dict'> {'day': '1999', 'year': '12', 'month': '31'}
|
| 518 |
+
|
| 519 |
+
# even though a ParseResults supports dict-like access, sometime you just need to have a dict
|
| 520 |
+
import json
|
| 521 |
+
print(json.dumps(result)) # -> Exception: TypeError: ... is not JSON serializable
|
| 522 |
+
print(json.dumps(result.as_dict())) # -> {"month": "31", "day": "1999", "year": "12"}
|
| 523 |
+
"""
|
| 524 |
+
|
| 525 |
+
def to_item(obj):
|
| 526 |
+
if isinstance(obj, ParseResults):
|
| 527 |
+
return obj.as_dict() if obj.haskeys() else [to_item(v) for v in obj]
|
| 528 |
+
else:
|
| 529 |
+
return obj
|
| 530 |
+
|
| 531 |
+
return dict((k, to_item(v)) for k, v in self.items())
|
| 532 |
+
|
| 533 |
+
def copy(self) -> "ParseResults":
|
| 534 |
+
"""
|
| 535 |
+
Returns a new copy of a :class:`ParseResults` object.
|
| 536 |
+
"""
|
| 537 |
+
ret = ParseResults(self._toklist)
|
| 538 |
+
ret._tokdict = self._tokdict.copy()
|
| 539 |
+
ret._parent = self._parent
|
| 540 |
+
ret._all_names |= self._all_names
|
| 541 |
+
ret._name = self._name
|
| 542 |
+
return ret
|
| 543 |
+
|
| 544 |
+
def get_name(self):
|
| 545 |
+
r"""
|
| 546 |
+
Returns the results name for this token expression. Useful when several
|
| 547 |
+
different expressions might match at a particular location.
|
| 548 |
+
|
| 549 |
+
Example::
|
| 550 |
+
|
| 551 |
+
integer = Word(nums)
|
| 552 |
+
ssn_expr = Regex(r"\d\d\d-\d\d-\d\d\d\d")
|
| 553 |
+
house_number_expr = Suppress('#') + Word(nums, alphanums)
|
| 554 |
+
user_data = (Group(house_number_expr)("house_number")
|
| 555 |
+
| Group(ssn_expr)("ssn")
|
| 556 |
+
| Group(integer)("age"))
|
| 557 |
+
user_info = OneOrMore(user_data)
|
| 558 |
+
|
| 559 |
+
result = user_info.parse_string("22 111-22-3333 #221B")
|
| 560 |
+
for item in result:
|
| 561 |
+
print(item.get_name(), ':', item[0])
|
| 562 |
+
|
| 563 |
+
prints::
|
| 564 |
+
|
| 565 |
+
age : 22
|
| 566 |
+
ssn : 111-22-3333
|
| 567 |
+
house_number : 221B
|
| 568 |
+
"""
|
| 569 |
+
if self._name:
|
| 570 |
+
return self._name
|
| 571 |
+
elif self._parent:
|
| 572 |
+
par = self._parent()
|
| 573 |
+
|
| 574 |
+
def find_in_parent(sub):
|
| 575 |
+
return next(
|
| 576 |
+
(
|
| 577 |
+
k
|
| 578 |
+
for k, vlist in par._tokdict.items()
|
| 579 |
+
for v, loc in vlist
|
| 580 |
+
if sub is v
|
| 581 |
+
),
|
| 582 |
+
None,
|
| 583 |
+
)
|
| 584 |
+
|
| 585 |
+
return find_in_parent(self) if par else None
|
| 586 |
+
elif (
|
| 587 |
+
len(self) == 1
|
| 588 |
+
and len(self._tokdict) == 1
|
| 589 |
+
and next(iter(self._tokdict.values()))[0][1] in (0, -1)
|
| 590 |
+
):
|
| 591 |
+
return next(iter(self._tokdict.keys()))
|
| 592 |
+
else:
|
| 593 |
+
return None
|
| 594 |
+
|
| 595 |
+
def dump(self, indent="", full=True, include_list=True, _depth=0) -> str:
|
| 596 |
+
"""
|
| 597 |
+
Diagnostic method for listing out the contents of
|
| 598 |
+
a :class:`ParseResults`. Accepts an optional ``indent`` argument so
|
| 599 |
+
that this string can be embedded in a nested display of other data.
|
| 600 |
+
|
| 601 |
+
Example::
|
| 602 |
+
|
| 603 |
+
integer = Word(nums)
|
| 604 |
+
date_str = integer("year") + '/' + integer("month") + '/' + integer("day")
|
| 605 |
+
|
| 606 |
+
result = date_str.parse_string('12/31/1999')
|
| 607 |
+
print(result.dump())
|
| 608 |
+
|
| 609 |
+
prints::
|
| 610 |
+
|
| 611 |
+
['12', '/', '31', '/', '1999']
|
| 612 |
+
- day: 1999
|
| 613 |
+
- month: 31
|
| 614 |
+
- year: 12
|
| 615 |
+
"""
|
| 616 |
+
out = []
|
| 617 |
+
NL = "\n"
|
| 618 |
+
out.append(indent + str(self.as_list()) if include_list else "")
|
| 619 |
+
|
| 620 |
+
if full:
|
| 621 |
+
if self.haskeys():
|
| 622 |
+
items = sorted((str(k), v) for k, v in self.items())
|
| 623 |
+
for k, v in items:
|
| 624 |
+
if out:
|
| 625 |
+
out.append(NL)
|
| 626 |
+
out.append("{}{}- {}: ".format(indent, (" " * _depth), k))
|
| 627 |
+
if isinstance(v, ParseResults):
|
| 628 |
+
if v:
|
| 629 |
+
out.append(
|
| 630 |
+
v.dump(
|
| 631 |
+
indent=indent,
|
| 632 |
+
full=full,
|
| 633 |
+
include_list=include_list,
|
| 634 |
+
_depth=_depth + 1,
|
| 635 |
+
)
|
| 636 |
+
)
|
| 637 |
+
else:
|
| 638 |
+
out.append(str(v))
|
| 639 |
+
else:
|
| 640 |
+
out.append(repr(v))
|
| 641 |
+
if any(isinstance(vv, ParseResults) for vv in self):
|
| 642 |
+
v = self
|
| 643 |
+
for i, vv in enumerate(v):
|
| 644 |
+
if isinstance(vv, ParseResults):
|
| 645 |
+
out.append(
|
| 646 |
+
"\n{}{}[{}]:\n{}{}{}".format(
|
| 647 |
+
indent,
|
| 648 |
+
(" " * (_depth)),
|
| 649 |
+
i,
|
| 650 |
+
indent,
|
| 651 |
+
(" " * (_depth + 1)),
|
| 652 |
+
vv.dump(
|
| 653 |
+
indent=indent,
|
| 654 |
+
full=full,
|
| 655 |
+
include_list=include_list,
|
| 656 |
+
_depth=_depth + 1,
|
| 657 |
+
),
|
| 658 |
+
)
|
| 659 |
+
)
|
| 660 |
+
else:
|
| 661 |
+
out.append(
|
| 662 |
+
"\n%s%s[%d]:\n%s%s%s"
|
| 663 |
+
% (
|
| 664 |
+
indent,
|
| 665 |
+
(" " * (_depth)),
|
| 666 |
+
i,
|
| 667 |
+
indent,
|
| 668 |
+
(" " * (_depth + 1)),
|
| 669 |
+
str(vv),
|
| 670 |
+
)
|
| 671 |
+
)
|
| 672 |
+
|
| 673 |
+
return "".join(out)
|
| 674 |
+
|
| 675 |
+
def pprint(self, *args, **kwargs):
|
| 676 |
+
"""
|
| 677 |
+
Pretty-printer for parsed results as a list, using the
|
| 678 |
+
`pprint <https://docs.python.org/3/library/pprint.html>`_ module.
|
| 679 |
+
Accepts additional positional or keyword args as defined for
|
| 680 |
+
`pprint.pprint <https://docs.python.org/3/library/pprint.html#pprint.pprint>`_ .
|
| 681 |
+
|
| 682 |
+
Example::
|
| 683 |
+
|
| 684 |
+
ident = Word(alphas, alphanums)
|
| 685 |
+
num = Word(nums)
|
| 686 |
+
func = Forward()
|
| 687 |
+
term = ident | num | Group('(' + func + ')')
|
| 688 |
+
func <<= ident + Group(Optional(delimited_list(term)))
|
| 689 |
+
result = func.parse_string("fna a,b,(fnb c,d,200),100")
|
| 690 |
+
result.pprint(width=40)
|
| 691 |
+
|
| 692 |
+
prints::
|
| 693 |
+
|
| 694 |
+
['fna',
|
| 695 |
+
['a',
|
| 696 |
+
'b',
|
| 697 |
+
['(', 'fnb', ['c', 'd', '200'], ')'],
|
| 698 |
+
'100']]
|
| 699 |
+
"""
|
| 700 |
+
pprint.pprint(self.as_list(), *args, **kwargs)
|
| 701 |
+
|
| 702 |
+
# add support for pickle protocol
|
| 703 |
+
def __getstate__(self):
|
| 704 |
+
return (
|
| 705 |
+
self._toklist,
|
| 706 |
+
(
|
| 707 |
+
self._tokdict.copy(),
|
| 708 |
+
self._parent is not None and self._parent() or None,
|
| 709 |
+
self._all_names,
|
| 710 |
+
self._name,
|
| 711 |
+
),
|
| 712 |
+
)
|
| 713 |
+
|
| 714 |
+
def __setstate__(self, state):
|
| 715 |
+
self._toklist, (self._tokdict, par, inAccumNames, self._name) = state
|
| 716 |
+
self._all_names = set(inAccumNames)
|
| 717 |
+
if par is not None:
|
| 718 |
+
self._parent = wkref(par)
|
| 719 |
+
else:
|
| 720 |
+
self._parent = None
|
| 721 |
+
|
| 722 |
+
def __getnewargs__(self):
|
| 723 |
+
return self._toklist, self._name
|
| 724 |
+
|
| 725 |
+
def __dir__(self):
|
| 726 |
+
return dir(type(self)) + list(self.keys())
|
| 727 |
+
|
| 728 |
+
@classmethod
|
| 729 |
+
def from_dict(cls, other, name=None) -> "ParseResults":
|
| 730 |
+
"""
|
| 731 |
+
Helper classmethod to construct a ``ParseResults`` from a ``dict``, preserving the
|
| 732 |
+
name-value relations as results names. If an optional ``name`` argument is
|
| 733 |
+
given, a nested ``ParseResults`` will be returned.
|
| 734 |
+
"""
|
| 735 |
+
|
| 736 |
+
def is_iterable(obj):
|
| 737 |
+
try:
|
| 738 |
+
iter(obj)
|
| 739 |
+
except Exception:
|
| 740 |
+
return False
|
| 741 |
+
else:
|
| 742 |
+
return not isinstance(obj, str_type)
|
| 743 |
+
|
| 744 |
+
ret = cls([])
|
| 745 |
+
for k, v in other.items():
|
| 746 |
+
if isinstance(v, Mapping):
|
| 747 |
+
ret += cls.from_dict(v, name=k)
|
| 748 |
+
else:
|
| 749 |
+
ret += cls([v], name=k, asList=is_iterable(v))
|
| 750 |
+
if name is not None:
|
| 751 |
+
ret = cls([ret], name=name)
|
| 752 |
+
return ret
|
| 753 |
+
|
| 754 |
+
asList = as_list
|
| 755 |
+
asDict = as_dict
|
| 756 |
+
getName = get_name
|
| 757 |
+
|
| 758 |
+
|
| 759 |
+
MutableMapping.register(ParseResults)
|
| 760 |
+
MutableSequence.register(ParseResults)
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/testing.py
ADDED
|
@@ -0,0 +1,331 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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|
+
Keyword,
|
| 10 |
+
__diag__,
|
| 11 |
+
__compat__,
|
| 12 |
+
)
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
class pyparsing_test:
|
| 16 |
+
"""
|
| 17 |
+
namespace class for classes useful in writing unit tests
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
class reset_pyparsing_context:
|
| 21 |
+
"""
|
| 22 |
+
Context manager to be used when writing unit tests that modify pyparsing config values:
|
| 23 |
+
- packrat parsing
|
| 24 |
+
- bounded recursion parsing
|
| 25 |
+
- default whitespace characters.
|
| 26 |
+
- default keyword characters
|
| 27 |
+
- literal string auto-conversion class
|
| 28 |
+
- __diag__ settings
|
| 29 |
+
|
| 30 |
+
Example::
|
| 31 |
+
|
| 32 |
+
with reset_pyparsing_context():
|
| 33 |
+
# test that literals used to construct a grammar are automatically suppressed
|
| 34 |
+
ParserElement.inlineLiteralsUsing(Suppress)
|
| 35 |
+
|
| 36 |
+
term = Word(alphas) | Word(nums)
|
| 37 |
+
group = Group('(' + term[...] + ')')
|
| 38 |
+
|
| 39 |
+
# assert that the '()' characters are not included in the parsed tokens
|
| 40 |
+
self.assertParseAndCheckList(group, "(abc 123 def)", ['abc', '123', 'def'])
|
| 41 |
+
|
| 42 |
+
# after exiting context manager, literals are converted to Literal expressions again
|
| 43 |
+
"""
|
| 44 |
+
|
| 45 |
+
def __init__(self):
|
| 46 |
+
self._save_context = {}
|
| 47 |
+
|
| 48 |
+
def save(self):
|
| 49 |
+
self._save_context["default_whitespace"] = ParserElement.DEFAULT_WHITE_CHARS
|
| 50 |
+
self._save_context["default_keyword_chars"] = Keyword.DEFAULT_KEYWORD_CHARS
|
| 51 |
+
|
| 52 |
+
self._save_context[
|
| 53 |
+
"literal_string_class"
|
| 54 |
+
] = ParserElement._literalStringClass
|
| 55 |
+
|
| 56 |
+
self._save_context["verbose_stacktrace"] = ParserElement.verbose_stacktrace
|
| 57 |
+
|
| 58 |
+
self._save_context["packrat_enabled"] = ParserElement._packratEnabled
|
| 59 |
+
if ParserElement._packratEnabled:
|
| 60 |
+
self._save_context[
|
| 61 |
+
"packrat_cache_size"
|
| 62 |
+
] = ParserElement.packrat_cache.size
|
| 63 |
+
else:
|
| 64 |
+
self._save_context["packrat_cache_size"] = None
|
| 65 |
+
self._save_context["packrat_parse"] = ParserElement._parse
|
| 66 |
+
self._save_context[
|
| 67 |
+
"recursion_enabled"
|
| 68 |
+
] = ParserElement._left_recursion_enabled
|
| 69 |
+
|
| 70 |
+
self._save_context["__diag__"] = {
|
| 71 |
+
name: getattr(__diag__, name) for name in __diag__._all_names
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
self._save_context["__compat__"] = {
|
| 75 |
+
"collect_all_And_tokens": __compat__.collect_all_And_tokens
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
return self
|
| 79 |
+
|
| 80 |
+
def restore(self):
|
| 81 |
+
# reset pyparsing global state
|
| 82 |
+
if (
|
| 83 |
+
ParserElement.DEFAULT_WHITE_CHARS
|
| 84 |
+
!= self._save_context["default_whitespace"]
|
| 85 |
+
):
|
| 86 |
+
ParserElement.set_default_whitespace_chars(
|
| 87 |
+
self._save_context["default_whitespace"]
|
| 88 |
+
)
|
| 89 |
+
|
| 90 |
+
ParserElement.verbose_stacktrace = self._save_context["verbose_stacktrace"]
|
| 91 |
+
|
| 92 |
+
Keyword.DEFAULT_KEYWORD_CHARS = self._save_context["default_keyword_chars"]
|
| 93 |
+
ParserElement.inlineLiteralsUsing(
|
| 94 |
+
self._save_context["literal_string_class"]
|
| 95 |
+
)
|
| 96 |
+
|
| 97 |
+
for name, value in self._save_context["__diag__"].items():
|
| 98 |
+
(__diag__.enable if value else __diag__.disable)(name)
|
| 99 |
+
|
| 100 |
+
ParserElement._packratEnabled = False
|
| 101 |
+
if self._save_context["packrat_enabled"]:
|
| 102 |
+
ParserElement.enable_packrat(self._save_context["packrat_cache_size"])
|
| 103 |
+
else:
|
| 104 |
+
ParserElement._parse = self._save_context["packrat_parse"]
|
| 105 |
+
ParserElement._left_recursion_enabled = self._save_context[
|
| 106 |
+
"recursion_enabled"
|
| 107 |
+
]
|
| 108 |
+
|
| 109 |
+
__compat__.collect_all_And_tokens = self._save_context["__compat__"]
|
| 110 |
+
|
| 111 |
+
return self
|
| 112 |
+
|
| 113 |
+
def copy(self):
|
| 114 |
+
ret = type(self)()
|
| 115 |
+
ret._save_context.update(self._save_context)
|
| 116 |
+
return ret
|
| 117 |
+
|
| 118 |
+
def __enter__(self):
|
| 119 |
+
return self.save()
|
| 120 |
+
|
| 121 |
+
def __exit__(self, *args):
|
| 122 |
+
self.restore()
|
| 123 |
+
|
| 124 |
+
class TestParseResultsAsserts:
|
| 125 |
+
"""
|
| 126 |
+
A mixin class to add parse results assertion methods to normal unittest.TestCase classes.
|
| 127 |
+
"""
|
| 128 |
+
|
| 129 |
+
def assertParseResultsEquals(
|
| 130 |
+
self, result, expected_list=None, expected_dict=None, msg=None
|
| 131 |
+
):
|
| 132 |
+
"""
|
| 133 |
+
Unit test assertion to compare a :class:`ParseResults` object with an optional ``expected_list``,
|
| 134 |
+
and compare any defined results names with an optional ``expected_dict``.
|
| 135 |
+
"""
|
| 136 |
+
if expected_list is not None:
|
| 137 |
+
self.assertEqual(expected_list, result.as_list(), msg=msg)
|
| 138 |
+
if expected_dict is not None:
|
| 139 |
+
self.assertEqual(expected_dict, result.as_dict(), msg=msg)
|
| 140 |
+
|
| 141 |
+
def assertParseAndCheckList(
|
| 142 |
+
self, expr, test_string, expected_list, msg=None, verbose=True
|
| 143 |
+
):
|
| 144 |
+
"""
|
| 145 |
+
Convenience wrapper assert to test a parser element and input string, and assert that
|
| 146 |
+
the resulting ``ParseResults.asList()`` is equal to the ``expected_list``.
|
| 147 |
+
"""
|
| 148 |
+
result = expr.parse_string(test_string, parse_all=True)
|
| 149 |
+
if verbose:
|
| 150 |
+
print(result.dump())
|
| 151 |
+
else:
|
| 152 |
+
print(result.as_list())
|
| 153 |
+
self.assertParseResultsEquals(result, expected_list=expected_list, msg=msg)
|
| 154 |
+
|
| 155 |
+
def assertParseAndCheckDict(
|
| 156 |
+
self, expr, test_string, expected_dict, msg=None, verbose=True
|
| 157 |
+
):
|
| 158 |
+
"""
|
| 159 |
+
Convenience wrapper assert to test a parser element and input string, and assert that
|
| 160 |
+
the resulting ``ParseResults.asDict()`` is equal to the ``expected_dict``.
|
| 161 |
+
"""
|
| 162 |
+
result = expr.parse_string(test_string, parseAll=True)
|
| 163 |
+
if verbose:
|
| 164 |
+
print(result.dump())
|
| 165 |
+
else:
|
| 166 |
+
print(result.as_list())
|
| 167 |
+
self.assertParseResultsEquals(result, expected_dict=expected_dict, msg=msg)
|
| 168 |
+
|
| 169 |
+
def assertRunTestResults(
|
| 170 |
+
self, run_tests_report, expected_parse_results=None, msg=None
|
| 171 |
+
):
|
| 172 |
+
"""
|
| 173 |
+
Unit test assertion to evaluate output of ``ParserElement.runTests()``. If a list of
|
| 174 |
+
list-dict tuples is given as the ``expected_parse_results`` argument, then these are zipped
|
| 175 |
+
with the report tuples returned by ``runTests`` and evaluated using ``assertParseResultsEquals``.
|
| 176 |
+
Finally, asserts that the overall ``runTests()`` success value is ``True``.
|
| 177 |
+
|
| 178 |
+
:param run_tests_report: tuple(bool, [tuple(str, ParseResults or Exception)]) returned from runTests
|
| 179 |
+
:param expected_parse_results (optional): [tuple(str, list, dict, Exception)]
|
| 180 |
+
"""
|
| 181 |
+
run_test_success, run_test_results = run_tests_report
|
| 182 |
+
|
| 183 |
+
if expected_parse_results is not None:
|
| 184 |
+
merged = [
|
| 185 |
+
(*rpt, expected)
|
| 186 |
+
for rpt, expected in zip(run_test_results, expected_parse_results)
|
| 187 |
+
]
|
| 188 |
+
for test_string, result, expected in merged:
|
| 189 |
+
# expected should be a tuple containing a list and/or a dict or an exception,
|
| 190 |
+
# and optional failure message string
|
| 191 |
+
# an empty tuple will skip any result validation
|
| 192 |
+
fail_msg = next(
|
| 193 |
+
(exp for exp in expected if isinstance(exp, str)), None
|
| 194 |
+
)
|
| 195 |
+
expected_exception = next(
|
| 196 |
+
(
|
| 197 |
+
exp
|
| 198 |
+
for exp in expected
|
| 199 |
+
if isinstance(exp, type) and issubclass(exp, Exception)
|
| 200 |
+
),
|
| 201 |
+
None,
|
| 202 |
+
)
|
| 203 |
+
if expected_exception is not None:
|
| 204 |
+
with self.assertRaises(
|
| 205 |
+
expected_exception=expected_exception, msg=fail_msg or msg
|
| 206 |
+
):
|
| 207 |
+
if isinstance(result, Exception):
|
| 208 |
+
raise result
|
| 209 |
+
else:
|
| 210 |
+
expected_list = next(
|
| 211 |
+
(exp for exp in expected if isinstance(exp, list)), None
|
| 212 |
+
)
|
| 213 |
+
expected_dict = next(
|
| 214 |
+
(exp for exp in expected if isinstance(exp, dict)), None
|
| 215 |
+
)
|
| 216 |
+
if (expected_list, expected_dict) != (None, None):
|
| 217 |
+
self.assertParseResultsEquals(
|
| 218 |
+
result,
|
| 219 |
+
expected_list=expected_list,
|
| 220 |
+
expected_dict=expected_dict,
|
| 221 |
+
msg=fail_msg or msg,
|
| 222 |
+
)
|
| 223 |
+
else:
|
| 224 |
+
# warning here maybe?
|
| 225 |
+
print("no validation for {!r}".format(test_string))
|
| 226 |
+
|
| 227 |
+
# do this last, in case some specific test results can be reported instead
|
| 228 |
+
self.assertTrue(
|
| 229 |
+
run_test_success, msg=msg if msg is not None else "failed runTests"
|
| 230 |
+
)
|
| 231 |
+
|
| 232 |
+
@contextmanager
|
| 233 |
+
def assertRaisesParseException(self, exc_type=ParseException, msg=None):
|
| 234 |
+
with self.assertRaises(exc_type, msg=msg):
|
| 235 |
+
yield
|
| 236 |
+
|
| 237 |
+
@staticmethod
|
| 238 |
+
def with_line_numbers(
|
| 239 |
+
s: str,
|
| 240 |
+
start_line: Optional[int] = None,
|
| 241 |
+
end_line: Optional[int] = None,
|
| 242 |
+
expand_tabs: bool = True,
|
| 243 |
+
eol_mark: str = "|",
|
| 244 |
+
mark_spaces: Optional[str] = None,
|
| 245 |
+
mark_control: Optional[str] = None,
|
| 246 |
+
) -> str:
|
| 247 |
+
"""
|
| 248 |
+
Helpful method for debugging a parser - prints a string with line and column numbers.
|
| 249 |
+
(Line and column numbers are 1-based.)
|
| 250 |
+
|
| 251 |
+
:param s: tuple(bool, str - string to be printed with line and column numbers
|
| 252 |
+
:param start_line: int - (optional) starting line number in s to print (default=1)
|
| 253 |
+
:param end_line: int - (optional) ending line number in s to print (default=len(s))
|
| 254 |
+
:param expand_tabs: bool - (optional) expand tabs to spaces, to match the pyparsing default
|
| 255 |
+
:param eol_mark: str - (optional) string to mark the end of lines, helps visualize trailing spaces (default="|")
|
| 256 |
+
:param mark_spaces: str - (optional) special character to display in place of spaces
|
| 257 |
+
:param mark_control: str - (optional) convert non-printing control characters to a placeholding
|
| 258 |
+
character; valid values:
|
| 259 |
+
- "unicode" - replaces control chars with Unicode symbols, such as "␍" and "␊"
|
| 260 |
+
- any single character string - replace control characters with given string
|
| 261 |
+
- None (default) - string is displayed as-is
|
| 262 |
+
|
| 263 |
+
:return: str - input string with leading line numbers and column number headers
|
| 264 |
+
"""
|
| 265 |
+
if expand_tabs:
|
| 266 |
+
s = s.expandtabs()
|
| 267 |
+
if mark_control is not None:
|
| 268 |
+
if mark_control == "unicode":
|
| 269 |
+
tbl = str.maketrans(
|
| 270 |
+
{c: u for c, u in zip(range(0, 33), range(0x2400, 0x2433))}
|
| 271 |
+
| {127: 0x2421}
|
| 272 |
+
)
|
| 273 |
+
eol_mark = ""
|
| 274 |
+
else:
|
| 275 |
+
tbl = str.maketrans(
|
| 276 |
+
{c: mark_control for c in list(range(0, 32)) + [127]}
|
| 277 |
+
)
|
| 278 |
+
s = s.translate(tbl)
|
| 279 |
+
if mark_spaces is not None and mark_spaces != " ":
|
| 280 |
+
if mark_spaces == "unicode":
|
| 281 |
+
tbl = str.maketrans({9: 0x2409, 32: 0x2423})
|
| 282 |
+
s = s.translate(tbl)
|
| 283 |
+
else:
|
| 284 |
+
s = s.replace(" ", mark_spaces)
|
| 285 |
+
if start_line is None:
|
| 286 |
+
start_line = 1
|
| 287 |
+
if end_line is None:
|
| 288 |
+
end_line = len(s)
|
| 289 |
+
end_line = min(end_line, len(s))
|
| 290 |
+
start_line = min(max(1, start_line), end_line)
|
| 291 |
+
|
| 292 |
+
if mark_control != "unicode":
|
| 293 |
+
s_lines = s.splitlines()[start_line - 1 : end_line]
|
| 294 |
+
else:
|
| 295 |
+
s_lines = [line + "␊" for line in s.split("␊")[start_line - 1 : end_line]]
|
| 296 |
+
if not s_lines:
|
| 297 |
+
return ""
|
| 298 |
+
|
| 299 |
+
lineno_width = len(str(end_line))
|
| 300 |
+
max_line_len = max(len(line) for line in s_lines)
|
| 301 |
+
lead = " " * (lineno_width + 1)
|
| 302 |
+
if max_line_len >= 99:
|
| 303 |
+
header0 = (
|
| 304 |
+
lead
|
| 305 |
+
+ "".join(
|
| 306 |
+
"{}{}".format(" " * 99, (i + 1) % 100)
|
| 307 |
+
for i in range(max(max_line_len // 100, 1))
|
| 308 |
+
)
|
| 309 |
+
+ "\n"
|
| 310 |
+
)
|
| 311 |
+
else:
|
| 312 |
+
header0 = ""
|
| 313 |
+
header1 = (
|
| 314 |
+
header0
|
| 315 |
+
+ lead
|
| 316 |
+
+ "".join(
|
| 317 |
+
" {}".format((i + 1) % 10)
|
| 318 |
+
for i in range(-(-max_line_len // 10))
|
| 319 |
+
)
|
| 320 |
+
+ "\n"
|
| 321 |
+
)
|
| 322 |
+
header2 = lead + "1234567890" * (-(-max_line_len // 10)) + "\n"
|
| 323 |
+
return (
|
| 324 |
+
header1
|
| 325 |
+
+ header2
|
| 326 |
+
+ "\n".join(
|
| 327 |
+
"{:{}d}:{}{}".format(i, lineno_width, line, eol_mark)
|
| 328 |
+
for i, line in enumerate(s_lines, start=start_line)
|
| 329 |
+
)
|
| 330 |
+
+ "\n"
|
| 331 |
+
)
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/unicode.py
ADDED
|
@@ -0,0 +1,332 @@
|
|
|
|
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false
|
| 5 |
+
from typing import List, Tuple, Union
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class _lazyclassproperty:
|
| 9 |
+
def __init__(self, fn):
|
| 10 |
+
self.fn = fn
|
| 11 |
+
self.__doc__ = fn.__doc__
|
| 12 |
+
self.__name__ = fn.__name__
|
| 13 |
+
|
| 14 |
+
def __get__(self, obj, cls):
|
| 15 |
+
if cls is None:
|
| 16 |
+
cls = type(obj)
|
| 17 |
+
if not hasattr(cls, "_intern") or any(
|
| 18 |
+
cls._intern is getattr(superclass, "_intern", [])
|
| 19 |
+
for superclass in cls.__mro__[1:]
|
| 20 |
+
):
|
| 21 |
+
cls._intern = {}
|
| 22 |
+
attrname = self.fn.__name__
|
| 23 |
+
if attrname not in cls._intern:
|
| 24 |
+
cls._intern[attrname] = self.fn(cls)
|
| 25 |
+
return cls._intern[attrname]
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
UnicodeRangeList = List[Union[Tuple[int, int], Tuple[int]]]
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
class unicode_set:
|
| 32 |
+
"""
|
| 33 |
+
A set of Unicode characters, for language-specific strings for
|
| 34 |
+
``alphas``, ``nums``, ``alphanums``, and ``printables``.
|
| 35 |
+
A unicode_set is defined by a list of ranges in the Unicode character
|
| 36 |
+
set, in a class attribute ``_ranges``. Ranges can be specified using
|
| 37 |
+
2-tuples or a 1-tuple, such as::
|
| 38 |
+
|
| 39 |
+
_ranges = [
|
| 40 |
+
(0x0020, 0x007e),
|
| 41 |
+
(0x00a0, 0x00ff),
|
| 42 |
+
(0x0100,),
|
| 43 |
+
]
|
| 44 |
+
|
| 45 |
+
Ranges are left- and right-inclusive. A 1-tuple of (x,) is treated as (x, x).
|
| 46 |
+
|
| 47 |
+
A unicode set can also be defined using multiple inheritance of other unicode sets::
|
| 48 |
+
|
| 49 |
+
class CJK(Chinese, Japanese, Korean):
|
| 50 |
+
pass
|
| 51 |
+
"""
|
| 52 |
+
|
| 53 |
+
_ranges: UnicodeRangeList = []
|
| 54 |
+
|
| 55 |
+
@_lazyclassproperty
|
| 56 |
+
def _chars_for_ranges(cls):
|
| 57 |
+
ret = []
|
| 58 |
+
for cc in cls.__mro__:
|
| 59 |
+
if cc is unicode_set:
|
| 60 |
+
break
|
| 61 |
+
for rr in getattr(cc, "_ranges", ()):
|
| 62 |
+
ret.extend(range(rr[0], rr[-1] + 1))
|
| 63 |
+
return [chr(c) for c in sorted(set(ret))]
|
| 64 |
+
|
| 65 |
+
@_lazyclassproperty
|
| 66 |
+
def printables(cls):
|
| 67 |
+
"all non-whitespace characters in this range"
|
| 68 |
+
return "".join(filterfalse(str.isspace, cls._chars_for_ranges))
|
| 69 |
+
|
| 70 |
+
@_lazyclassproperty
|
| 71 |
+
def alphas(cls):
|
| 72 |
+
"all alphabetic characters in this range"
|
| 73 |
+
return "".join(filter(str.isalpha, cls._chars_for_ranges))
|
| 74 |
+
|
| 75 |
+
@_lazyclassproperty
|
| 76 |
+
def nums(cls):
|
| 77 |
+
"all numeric digit characters in this range"
|
| 78 |
+
return "".join(filter(str.isdigit, cls._chars_for_ranges))
|
| 79 |
+
|
| 80 |
+
@_lazyclassproperty
|
| 81 |
+
def alphanums(cls):
|
| 82 |
+
"all alphanumeric characters in this range"
|
| 83 |
+
return cls.alphas + cls.nums
|
| 84 |
+
|
| 85 |
+
@_lazyclassproperty
|
| 86 |
+
def identchars(cls):
|
| 87 |
+
"all characters in this range that are valid identifier characters, plus underscore '_'"
|
| 88 |
+
return "".join(
|
| 89 |
+
sorted(
|
| 90 |
+
set(
|
| 91 |
+
"".join(filter(str.isidentifier, cls._chars_for_ranges))
|
| 92 |
+
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzªµº"
|
| 93 |
+
+ "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ"
|
| 94 |
+
+ "_"
|
| 95 |
+
)
|
| 96 |
+
)
|
| 97 |
+
)
|
| 98 |
+
|
| 99 |
+
@_lazyclassproperty
|
| 100 |
+
def identbodychars(cls):
|
| 101 |
+
"""
|
| 102 |
+
all characters in this range that are valid identifier body characters,
|
| 103 |
+
plus the digits 0-9
|
| 104 |
+
"""
|
| 105 |
+
return "".join(
|
| 106 |
+
sorted(
|
| 107 |
+
set(
|
| 108 |
+
cls.identchars
|
| 109 |
+
+ "0123456789"
|
| 110 |
+
+ "".join(
|
| 111 |
+
[c for c in cls._chars_for_ranges if ("_" + c).isidentifier()]
|
| 112 |
+
)
|
| 113 |
+
)
|
| 114 |
+
)
|
| 115 |
+
)
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
class pyparsing_unicode(unicode_set):
|
| 119 |
+
"""
|
| 120 |
+
A namespace class for defining common language unicode_sets.
|
| 121 |
+
"""
|
| 122 |
+
|
| 123 |
+
_ranges: UnicodeRangeList = [(32, sys.maxunicode)]
|
| 124 |
+
|
| 125 |
+
class Latin1(unicode_set):
|
| 126 |
+
"Unicode set for Latin-1 Unicode Character Range"
|
| 127 |
+
_ranges: UnicodeRangeList = [
|
| 128 |
+
(0x0020, 0x007E),
|
| 129 |
+
(0x00A0, 0x00FF),
|
| 130 |
+
]
|
| 131 |
+
|
| 132 |
+
class LatinA(unicode_set):
|
| 133 |
+
"Unicode set for Latin-A Unicode Character Range"
|
| 134 |
+
_ranges: UnicodeRangeList = [
|
| 135 |
+
(0x0100, 0x017F),
|
| 136 |
+
]
|
| 137 |
+
|
| 138 |
+
class LatinB(unicode_set):
|
| 139 |
+
"Unicode set for Latin-B Unicode Character Range"
|
| 140 |
+
_ranges: UnicodeRangeList = [
|
| 141 |
+
(0x0180, 0x024F),
|
| 142 |
+
]
|
| 143 |
+
|
| 144 |
+
class Greek(unicode_set):
|
| 145 |
+
"Unicode set for Greek Unicode Character Ranges"
|
| 146 |
+
_ranges: UnicodeRangeList = [
|
| 147 |
+
(0x0342, 0x0345),
|
| 148 |
+
(0x0370, 0x0377),
|
| 149 |
+
(0x037A, 0x037F),
|
| 150 |
+
(0x0384, 0x038A),
|
| 151 |
+
(0x038C,),
|
| 152 |
+
(0x038E, 0x03A1),
|
| 153 |
+
(0x03A3, 0x03E1),
|
| 154 |
+
(0x03F0, 0x03FF),
|
| 155 |
+
(0x1D26, 0x1D2A),
|
| 156 |
+
(0x1D5E,),
|
| 157 |
+
(0x1D60,),
|
| 158 |
+
(0x1D66, 0x1D6A),
|
| 159 |
+
(0x1F00, 0x1F15),
|
| 160 |
+
(0x1F18, 0x1F1D),
|
| 161 |
+
(0x1F20, 0x1F45),
|
| 162 |
+
(0x1F48, 0x1F4D),
|
| 163 |
+
(0x1F50, 0x1F57),
|
| 164 |
+
(0x1F59,),
|
| 165 |
+
(0x1F5B,),
|
| 166 |
+
(0x1F5D,),
|
| 167 |
+
(0x1F5F, 0x1F7D),
|
| 168 |
+
(0x1F80, 0x1FB4),
|
| 169 |
+
(0x1FB6, 0x1FC4),
|
| 170 |
+
(0x1FC6, 0x1FD3),
|
| 171 |
+
(0x1FD6, 0x1FDB),
|
| 172 |
+
(0x1FDD, 0x1FEF),
|
| 173 |
+
(0x1FF2, 0x1FF4),
|
| 174 |
+
(0x1FF6, 0x1FFE),
|
| 175 |
+
(0x2129,),
|
| 176 |
+
(0x2719, 0x271A),
|
| 177 |
+
(0xAB65,),
|
| 178 |
+
(0x10140, 0x1018D),
|
| 179 |
+
(0x101A0,),
|
| 180 |
+
(0x1D200, 0x1D245),
|
| 181 |
+
(0x1F7A1, 0x1F7A7),
|
| 182 |
+
]
|
| 183 |
+
|
| 184 |
+
class Cyrillic(unicode_set):
|
| 185 |
+
"Unicode set for Cyrillic Unicode Character Range"
|
| 186 |
+
_ranges: UnicodeRangeList = [
|
| 187 |
+
(0x0400, 0x052F),
|
| 188 |
+
(0x1C80, 0x1C88),
|
| 189 |
+
(0x1D2B,),
|
| 190 |
+
(0x1D78,),
|
| 191 |
+
(0x2DE0, 0x2DFF),
|
| 192 |
+
(0xA640, 0xA672),
|
| 193 |
+
(0xA674, 0xA69F),
|
| 194 |
+
(0xFE2E, 0xFE2F),
|
| 195 |
+
]
|
| 196 |
+
|
| 197 |
+
class Chinese(unicode_set):
|
| 198 |
+
"Unicode set for Chinese Unicode Character Range"
|
| 199 |
+
_ranges: UnicodeRangeList = [
|
| 200 |
+
(0x2E80, 0x2E99),
|
| 201 |
+
(0x2E9B, 0x2EF3),
|
| 202 |
+
(0x31C0, 0x31E3),
|
| 203 |
+
(0x3400, 0x4DB5),
|
| 204 |
+
(0x4E00, 0x9FEF),
|
| 205 |
+
(0xA700, 0xA707),
|
| 206 |
+
(0xF900, 0xFA6D),
|
| 207 |
+
(0xFA70, 0xFAD9),
|
| 208 |
+
(0x16FE2, 0x16FE3),
|
| 209 |
+
(0x1F210, 0x1F212),
|
| 210 |
+
(0x1F214, 0x1F23B),
|
| 211 |
+
(0x1F240, 0x1F248),
|
| 212 |
+
(0x20000, 0x2A6D6),
|
| 213 |
+
(0x2A700, 0x2B734),
|
| 214 |
+
(0x2B740, 0x2B81D),
|
| 215 |
+
(0x2B820, 0x2CEA1),
|
| 216 |
+
(0x2CEB0, 0x2EBE0),
|
| 217 |
+
(0x2F800, 0x2FA1D),
|
| 218 |
+
]
|
| 219 |
+
|
| 220 |
+
class Japanese(unicode_set):
|
| 221 |
+
"Unicode set for Japanese Unicode Character Range, combining Kanji, Hiragana, and Katakana ranges"
|
| 222 |
+
_ranges: UnicodeRangeList = []
|
| 223 |
+
|
| 224 |
+
class Kanji(unicode_set):
|
| 225 |
+
"Unicode set for Kanji Unicode Character Range"
|
| 226 |
+
_ranges: UnicodeRangeList = [
|
| 227 |
+
(0x4E00, 0x9FBF),
|
| 228 |
+
(0x3000, 0x303F),
|
| 229 |
+
]
|
| 230 |
+
|
| 231 |
+
class Hiragana(unicode_set):
|
| 232 |
+
"Unicode set for Hiragana Unicode Character Range"
|
| 233 |
+
_ranges: UnicodeRangeList = [
|
| 234 |
+
(0x3041, 0x3096),
|
| 235 |
+
(0x3099, 0x30A0),
|
| 236 |
+
(0x30FC,),
|
| 237 |
+
(0xFF70,),
|
| 238 |
+
(0x1B001,),
|
| 239 |
+
(0x1B150, 0x1B152),
|
| 240 |
+
(0x1F200,),
|
| 241 |
+
]
|
| 242 |
+
|
| 243 |
+
class Katakana(unicode_set):
|
| 244 |
+
"Unicode set for Katakana Unicode Character Range"
|
| 245 |
+
_ranges: UnicodeRangeList = [
|
| 246 |
+
(0x3099, 0x309C),
|
| 247 |
+
(0x30A0, 0x30FF),
|
| 248 |
+
(0x31F0, 0x31FF),
|
| 249 |
+
(0x32D0, 0x32FE),
|
| 250 |
+
(0xFF65, 0xFF9F),
|
| 251 |
+
(0x1B000,),
|
| 252 |
+
(0x1B164, 0x1B167),
|
| 253 |
+
(0x1F201, 0x1F202),
|
| 254 |
+
(0x1F213,),
|
| 255 |
+
]
|
| 256 |
+
|
| 257 |
+
class Hangul(unicode_set):
|
| 258 |
+
"Unicode set for Hangul (Korean) Unicode Character Range"
|
| 259 |
+
_ranges: UnicodeRangeList = [
|
| 260 |
+
(0x1100, 0x11FF),
|
| 261 |
+
(0x302E, 0x302F),
|
| 262 |
+
(0x3131, 0x318E),
|
| 263 |
+
(0x3200, 0x321C),
|
| 264 |
+
(0x3260, 0x327B),
|
| 265 |
+
(0x327E,),
|
| 266 |
+
(0xA960, 0xA97C),
|
| 267 |
+
(0xAC00, 0xD7A3),
|
| 268 |
+
(0xD7B0, 0xD7C6),
|
| 269 |
+
(0xD7CB, 0xD7FB),
|
| 270 |
+
(0xFFA0, 0xFFBE),
|
| 271 |
+
(0xFFC2, 0xFFC7),
|
| 272 |
+
(0xFFCA, 0xFFCF),
|
| 273 |
+
(0xFFD2, 0xFFD7),
|
| 274 |
+
(0xFFDA, 0xFFDC),
|
| 275 |
+
]
|
| 276 |
+
|
| 277 |
+
Korean = Hangul
|
| 278 |
+
|
| 279 |
+
class CJK(Chinese, Japanese, Hangul):
|
| 280 |
+
"Unicode set for combined Chinese, Japanese, and Korean (CJK) Unicode Character Range"
|
| 281 |
+
pass
|
| 282 |
+
|
| 283 |
+
class Thai(unicode_set):
|
| 284 |
+
"Unicode set for Thai Unicode Character Range"
|
| 285 |
+
_ranges: UnicodeRangeList = [(0x0E01, 0x0E3A), (0x0E3F, 0x0E5B)]
|
| 286 |
+
|
| 287 |
+
class Arabic(unicode_set):
|
| 288 |
+
"Unicode set for Arabic Unicode Character Range"
|
| 289 |
+
_ranges: UnicodeRangeList = [
|
| 290 |
+
(0x0600, 0x061B),
|
| 291 |
+
(0x061E, 0x06FF),
|
| 292 |
+
(0x0700, 0x077F),
|
| 293 |
+
]
|
| 294 |
+
|
| 295 |
+
class Hebrew(unicode_set):
|
| 296 |
+
"Unicode set for Hebrew Unicode Character Range"
|
| 297 |
+
_ranges: UnicodeRangeList = [
|
| 298 |
+
(0x0591, 0x05C7),
|
| 299 |
+
(0x05D0, 0x05EA),
|
| 300 |
+
(0x05EF, 0x05F4),
|
| 301 |
+
(0xFB1D, 0xFB36),
|
| 302 |
+
(0xFB38, 0xFB3C),
|
| 303 |
+
(0xFB3E,),
|
| 304 |
+
(0xFB40, 0xFB41),
|
| 305 |
+
(0xFB43, 0xFB44),
|
| 306 |
+
(0xFB46, 0xFB4F),
|
| 307 |
+
]
|
| 308 |
+
|
| 309 |
+
class Devanagari(unicode_set):
|
| 310 |
+
"Unicode set for Devanagari Unicode Character Range"
|
| 311 |
+
_ranges: UnicodeRangeList = [(0x0900, 0x097F), (0xA8E0, 0xA8FF)]
|
| 312 |
+
|
| 313 |
+
|
| 314 |
+
pyparsing_unicode.Japanese._ranges = (
|
| 315 |
+
pyparsing_unicode.Japanese.Kanji._ranges
|
| 316 |
+
+ pyparsing_unicode.Japanese.Hiragana._ranges
|
| 317 |
+
+ pyparsing_unicode.Japanese.Katakana._ranges
|
| 318 |
+
)
|
| 319 |
+
|
| 320 |
+
# define ranges in language character sets
|
| 321 |
+
pyparsing_unicode.العربية = pyparsing_unicode.Arabic
|
| 322 |
+
pyparsing_unicode.中文 = pyparsing_unicode.Chinese
|
| 323 |
+
pyparsing_unicode.кириллица = pyparsing_unicode.Cyrillic
|
| 324 |
+
pyparsing_unicode.Ελληνικά = pyparsing_unicode.Greek
|
| 325 |
+
pyparsing_unicode.עִברִית = pyparsing_unicode.Hebrew
|
| 326 |
+
pyparsing_unicode.日本語 = pyparsing_unicode.Japanese
|
| 327 |
+
pyparsing_unicode.Japanese.漢字 = pyparsing_unicode.Japanese.Kanji
|
| 328 |
+
pyparsing_unicode.Japanese.カタカナ = pyparsing_unicode.Japanese.Katakana
|
| 329 |
+
pyparsing_unicode.Japanese.ひらがな = pyparsing_unicode.Japanese.Hiragana
|
| 330 |
+
pyparsing_unicode.한국어 = pyparsing_unicode.Korean
|
| 331 |
+
pyparsing_unicode.ไทย = pyparsing_unicode.Thai
|
| 332 |
+
pyparsing_unicode.देवनागरी = pyparsing_unicode.Devanagari
|
venv/lib/python3.10/site-packages/pip/_vendor/pyparsing/util.py
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
| 6 |
+
from functools import lru_cache
|
| 7 |
+
from typing import List, Union, Iterable
|
| 8 |
+
|
| 9 |
+
_bslash = chr(92)
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class __config_flags:
|
| 13 |
+
"""Internal class for defining compatibility and debugging flags"""
|
| 14 |
+
|
| 15 |
+
_all_names: List[str] = []
|
| 16 |
+
_fixed_names: List[str] = []
|
| 17 |
+
_type_desc = "configuration"
|
| 18 |
+
|
| 19 |
+
@classmethod
|
| 20 |
+
def _set(cls, dname, value):
|
| 21 |
+
if dname in cls._fixed_names:
|
| 22 |
+
warnings.warn(
|
| 23 |
+
"{}.{} {} is {} and cannot be overridden".format(
|
| 24 |
+
cls.__name__,
|
| 25 |
+
dname,
|
| 26 |
+
cls._type_desc,
|
| 27 |
+
str(getattr(cls, dname)).upper(),
|
| 28 |
+
)
|
| 29 |
+
)
|
| 30 |
+
return
|
| 31 |
+
if dname in cls._all_names:
|
| 32 |
+
setattr(cls, dname, value)
|
| 33 |
+
else:
|
| 34 |
+
raise ValueError("no such {} {!r}".format(cls._type_desc, dname))
|
| 35 |
+
|
| 36 |
+
enable = classmethod(lambda cls, name: cls._set(name, True))
|
| 37 |
+
disable = classmethod(lambda cls, name: cls._set(name, False))
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
@lru_cache(maxsize=128)
|
| 41 |
+
def col(loc: int, strg: str) -> int:
|
| 42 |
+
"""
|
| 43 |
+
Returns current column within a string, counting newlines as line separators.
|
| 44 |
+
The first column is number 1.
|
| 45 |
+
|
| 46 |
+
Note: the default parsing behavior is to expand tabs in the input string
|
| 47 |
+
before starting the parsing process. See
|
| 48 |
+
:class:`ParserElement.parseString` for more
|
| 49 |
+
information on parsing strings containing ``<TAB>`` s, and suggested
|
| 50 |
+
methods to maintain a consistent view of the parsed string, the parse
|
| 51 |
+
location, and line and column positions within the parsed string.
|
| 52 |
+
"""
|
| 53 |
+
s = strg
|
| 54 |
+
return 1 if 0 < loc < len(s) and s[loc - 1] == "\n" else loc - s.rfind("\n", 0, loc)
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
@lru_cache(maxsize=128)
|
| 58 |
+
def lineno(loc: int, strg: str) -> int:
|
| 59 |
+
"""Returns current line number within a string, counting newlines as line separators.
|
| 60 |
+
The first line is number 1.
|
| 61 |
+
|
| 62 |
+
Note - the default parsing behavior is to expand tabs in the input string
|
| 63 |
+
before starting the parsing process. See :class:`ParserElement.parseString`
|
| 64 |
+
for more information on parsing strings containing ``<TAB>`` s, and
|
| 65 |
+
suggested methods to maintain a consistent view of the parsed string, the
|
| 66 |
+
parse location, and line and column positions within the parsed string.
|
| 67 |
+
"""
|
| 68 |
+
return strg.count("\n", 0, loc) + 1
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
@lru_cache(maxsize=128)
|
| 72 |
+
def line(loc: int, strg: str) -> str:
|
| 73 |
+
"""
|
| 74 |
+
Returns the line of text containing loc within a string, counting newlines as line separators.
|
| 75 |
+
"""
|
| 76 |
+
last_cr = strg.rfind("\n", 0, loc)
|
| 77 |
+
next_cr = strg.find("\n", loc)
|
| 78 |
+
return strg[last_cr + 1 : next_cr] if next_cr >= 0 else strg[last_cr + 1 :]
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
class _UnboundedCache:
|
| 82 |
+
def __init__(self):
|
| 83 |
+
cache = {}
|
| 84 |
+
cache_get = cache.get
|
| 85 |
+
self.not_in_cache = not_in_cache = object()
|
| 86 |
+
|
| 87 |
+
def get(_, key):
|
| 88 |
+
return cache_get(key, not_in_cache)
|
| 89 |
+
|
| 90 |
+
def set_(_, key, value):
|
| 91 |
+
cache[key] = value
|
| 92 |
+
|
| 93 |
+
def clear(_):
|
| 94 |
+
cache.clear()
|
| 95 |
+
|
| 96 |
+
self.size = None
|
| 97 |
+
self.get = types.MethodType(get, self)
|
| 98 |
+
self.set = types.MethodType(set_, self)
|
| 99 |
+
self.clear = types.MethodType(clear, self)
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
class _FifoCache:
|
| 103 |
+
def __init__(self, size):
|
| 104 |
+
self.not_in_cache = not_in_cache = object()
|
| 105 |
+
cache = collections.OrderedDict()
|
| 106 |
+
cache_get = cache.get
|
| 107 |
+
|
| 108 |
+
def get(_, key):
|
| 109 |
+
return cache_get(key, not_in_cache)
|
| 110 |
+
|
| 111 |
+
def set_(_, key, value):
|
| 112 |
+
cache[key] = value
|
| 113 |
+
while len(cache) > size:
|
| 114 |
+
cache.popitem(last=False)
|
| 115 |
+
|
| 116 |
+
def clear(_):
|
| 117 |
+
cache.clear()
|
| 118 |
+
|
| 119 |
+
self.size = size
|
| 120 |
+
self.get = types.MethodType(get, self)
|
| 121 |
+
self.set = types.MethodType(set_, self)
|
| 122 |
+
self.clear = types.MethodType(clear, self)
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
class LRUMemo:
|
| 126 |
+
"""
|
| 127 |
+
A memoizing mapping that retains `capacity` deleted items
|
| 128 |
+
|
| 129 |
+
The memo tracks retained items by their access order; once `capacity` items
|
| 130 |
+
are retained, the least recently used item is discarded.
|
| 131 |
+
"""
|
| 132 |
+
|
| 133 |
+
def __init__(self, capacity):
|
| 134 |
+
self._capacity = capacity
|
| 135 |
+
self._active = {}
|
| 136 |
+
self._memory = collections.OrderedDict()
|
| 137 |
+
|
| 138 |
+
def __getitem__(self, key):
|
| 139 |
+
try:
|
| 140 |
+
return self._active[key]
|
| 141 |
+
except KeyError:
|
| 142 |
+
self._memory.move_to_end(key)
|
| 143 |
+
return self._memory[key]
|
| 144 |
+
|
| 145 |
+
def __setitem__(self, key, value):
|
| 146 |
+
self._memory.pop(key, None)
|
| 147 |
+
self._active[key] = value
|
| 148 |
+
|
| 149 |
+
def __delitem__(self, key):
|
| 150 |
+
try:
|
| 151 |
+
value = self._active.pop(key)
|
| 152 |
+
except KeyError:
|
| 153 |
+
pass
|
| 154 |
+
else:
|
| 155 |
+
while len(self._memory) >= self._capacity:
|
| 156 |
+
self._memory.popitem(last=False)
|
| 157 |
+
self._memory[key] = value
|
| 158 |
+
|
| 159 |
+
def clear(self):
|
| 160 |
+
self._active.clear()
|
| 161 |
+
self._memory.clear()
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
class UnboundedMemo(dict):
|
| 165 |
+
"""
|
| 166 |
+
A memoizing mapping that retains all deleted items
|
| 167 |
+
"""
|
| 168 |
+
|
| 169 |
+
def __delitem__(self, key):
|
| 170 |
+
pass
|
| 171 |
+
|
| 172 |
+
|
| 173 |
+
def _escape_regex_range_chars(s: str) -> str:
|
| 174 |
+
# escape these chars: ^-[]
|
| 175 |
+
for c in r"\^-[]":
|
| 176 |
+
s = s.replace(c, _bslash + c)
|
| 177 |
+
s = s.replace("\n", r"\n")
|
| 178 |
+
s = s.replace("\t", r"\t")
|
| 179 |
+
return str(s)
|
| 180 |
+
|
| 181 |
+
|
| 182 |
+
def _collapse_string_to_ranges(
|
| 183 |
+
s: Union[str, Iterable[str]], re_escape: bool = True
|
| 184 |
+
) -> str:
|
| 185 |
+
def is_consecutive(c):
|
| 186 |
+
c_int = ord(c)
|
| 187 |
+
is_consecutive.prev, prev = c_int, is_consecutive.prev
|
| 188 |
+
if c_int - prev > 1:
|
| 189 |
+
is_consecutive.value = next(is_consecutive.counter)
|
| 190 |
+
return is_consecutive.value
|
| 191 |
+
|
| 192 |
+
is_consecutive.prev = 0
|
| 193 |
+
is_consecutive.counter = itertools.count()
|
| 194 |
+
is_consecutive.value = -1
|
| 195 |
+
|
| 196 |
+
def escape_re_range_char(c):
|
| 197 |
+
return "\\" + c if c in r"\^-][" else c
|
| 198 |
+
|
| 199 |
+
def no_escape_re_range_char(c):
|
| 200 |
+
return c
|
| 201 |
+
|
| 202 |
+
if not re_escape:
|
| 203 |
+
escape_re_range_char = no_escape_re_range_char
|
| 204 |
+
|
| 205 |
+
ret = []
|
| 206 |
+
s = "".join(sorted(set(s)))
|
| 207 |
+
if len(s) > 3:
|
| 208 |
+
for _, chars in itertools.groupby(s, key=is_consecutive):
|
| 209 |
+
first = last = next(chars)
|
| 210 |
+
last = collections.deque(
|
| 211 |
+
itertools.chain(iter([last]), chars), maxlen=1
|
| 212 |
+
).pop()
|
| 213 |
+
if first == last:
|
| 214 |
+
ret.append(escape_re_range_char(first))
|
| 215 |
+
else:
|
| 216 |
+
sep = "" if ord(last) == ord(first) + 1 else "-"
|
| 217 |
+
ret.append(
|
| 218 |
+
"{}{}{}".format(
|
| 219 |
+
escape_re_range_char(first), sep, escape_re_range_char(last)
|
| 220 |
+
)
|
| 221 |
+
)
|
| 222 |
+
else:
|
| 223 |
+
ret = [escape_re_range_char(c) for c in s]
|
| 224 |
+
|
| 225 |
+
return "".join(ret)
|
| 226 |
+
|
| 227 |
+
|
| 228 |
+
def _flatten(ll: list) -> list:
|
| 229 |
+
ret = []
|
| 230 |
+
for i in ll:
|
| 231 |
+
if isinstance(i, list):
|
| 232 |
+
ret.extend(_flatten(i))
|
| 233 |
+
else:
|
| 234 |
+
ret.append(i)
|
| 235 |
+
return ret
|
venv/lib/python3.10/site-packages/pip/_vendor/rich/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (5.9 kB). View file
|
|
|
venv/lib/python3.10/site-packages/pip/_vendor/rich/__pycache__/__main__.cpython-310.pyc
ADDED
|
Binary file (7.33 kB). View file
|
|
|