xplia 1.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- venv/Lib/site-packages/_distutils_hack/__init__.py +222 -0
- venv/Lib/site-packages/_distutils_hack/override.py +1 -0
- venv/Lib/site-packages/pip/__init__.py +13 -0
- venv/Lib/site-packages/pip/__main__.py +24 -0
- venv/Lib/site-packages/pip/__pip-runner__.py +50 -0
- venv/Lib/site-packages/pip/_internal/__init__.py +19 -0
- venv/Lib/site-packages/pip/_internal/build_env.py +311 -0
- venv/Lib/site-packages/pip/_internal/cache.py +292 -0
- venv/Lib/site-packages/pip/_internal/cli/__init__.py +4 -0
- venv/Lib/site-packages/pip/_internal/cli/autocompletion.py +171 -0
- venv/Lib/site-packages/pip/_internal/cli/base_command.py +236 -0
- venv/Lib/site-packages/pip/_internal/cli/cmdoptions.py +1074 -0
- venv/Lib/site-packages/pip/_internal/cli/command_context.py +27 -0
- venv/Lib/site-packages/pip/_internal/cli/main.py +79 -0
- venv/Lib/site-packages/pip/_internal/cli/main_parser.py +134 -0
- venv/Lib/site-packages/pip/_internal/cli/parser.py +294 -0
- venv/Lib/site-packages/pip/_internal/cli/progress_bars.py +68 -0
- venv/Lib/site-packages/pip/_internal/cli/req_command.py +508 -0
- venv/Lib/site-packages/pip/_internal/cli/spinners.py +159 -0
- venv/Lib/site-packages/pip/_internal/cli/status_codes.py +6 -0
- venv/Lib/site-packages/pip/_internal/commands/__init__.py +132 -0
- venv/Lib/site-packages/pip/_internal/commands/cache.py +222 -0
- venv/Lib/site-packages/pip/_internal/commands/check.py +54 -0
- venv/Lib/site-packages/pip/_internal/commands/completion.py +121 -0
- venv/Lib/site-packages/pip/_internal/commands/configuration.py +282 -0
- venv/Lib/site-packages/pip/_internal/commands/debug.py +199 -0
- venv/Lib/site-packages/pip/_internal/commands/download.py +147 -0
- venv/Lib/site-packages/pip/_internal/commands/freeze.py +108 -0
- venv/Lib/site-packages/pip/_internal/commands/hash.py +59 -0
- venv/Lib/site-packages/pip/_internal/commands/help.py +41 -0
- venv/Lib/site-packages/pip/_internal/commands/index.py +139 -0
- venv/Lib/site-packages/pip/_internal/commands/inspect.py +92 -0
- venv/Lib/site-packages/pip/_internal/commands/install.py +778 -0
- venv/Lib/site-packages/pip/_internal/commands/list.py +368 -0
- venv/Lib/site-packages/pip/_internal/commands/search.py +174 -0
- venv/Lib/site-packages/pip/_internal/commands/show.py +189 -0
- venv/Lib/site-packages/pip/_internal/commands/uninstall.py +113 -0
- venv/Lib/site-packages/pip/_internal/commands/wheel.py +183 -0
- venv/Lib/site-packages/pip/_internal/configuration.py +381 -0
- venv/Lib/site-packages/pip/_internal/distributions/__init__.py +21 -0
- venv/Lib/site-packages/pip/_internal/distributions/base.py +39 -0
- venv/Lib/site-packages/pip/_internal/distributions/installed.py +23 -0
- venv/Lib/site-packages/pip/_internal/distributions/sdist.py +150 -0
- venv/Lib/site-packages/pip/_internal/distributions/wheel.py +34 -0
- venv/Lib/site-packages/pip/_internal/exceptions.py +733 -0
- venv/Lib/site-packages/pip/_internal/index/__init__.py +2 -0
- venv/Lib/site-packages/pip/_internal/index/collector.py +505 -0
- venv/Lib/site-packages/pip/_internal/index/package_finder.py +1029 -0
- venv/Lib/site-packages/pip/_internal/index/sources.py +223 -0
- venv/Lib/site-packages/pip/_internal/locations/__init__.py +467 -0
- venv/Lib/site-packages/pip/_internal/locations/_distutils.py +173 -0
- venv/Lib/site-packages/pip/_internal/locations/_sysconfig.py +213 -0
- venv/Lib/site-packages/pip/_internal/locations/base.py +81 -0
- venv/Lib/site-packages/pip/_internal/main.py +12 -0
- venv/Lib/site-packages/pip/_internal/metadata/__init__.py +127 -0
- venv/Lib/site-packages/pip/_internal/metadata/_json.py +84 -0
- venv/Lib/site-packages/pip/_internal/metadata/base.py +688 -0
- venv/Lib/site-packages/pip/_internal/metadata/importlib/__init__.py +4 -0
- venv/Lib/site-packages/pip/_internal/metadata/importlib/_compat.py +55 -0
- venv/Lib/site-packages/pip/_internal/metadata/importlib/_dists.py +224 -0
- venv/Lib/site-packages/pip/_internal/metadata/importlib/_envs.py +188 -0
- venv/Lib/site-packages/pip/_internal/metadata/pkg_resources.py +270 -0
- venv/Lib/site-packages/pip/_internal/models/__init__.py +2 -0
- venv/Lib/site-packages/pip/_internal/models/candidate.py +34 -0
- venv/Lib/site-packages/pip/_internal/models/direct_url.py +237 -0
- venv/Lib/site-packages/pip/_internal/models/format_control.py +80 -0
- venv/Lib/site-packages/pip/_internal/models/index.py +28 -0
- venv/Lib/site-packages/pip/_internal/models/installation_report.py +53 -0
- venv/Lib/site-packages/pip/_internal/models/link.py +581 -0
- venv/Lib/site-packages/pip/_internal/models/scheme.py +31 -0
- venv/Lib/site-packages/pip/_internal/models/search_scope.py +132 -0
- venv/Lib/site-packages/pip/_internal/models/selection_prefs.py +51 -0
- venv/Lib/site-packages/pip/_internal/models/target_python.py +110 -0
- venv/Lib/site-packages/pip/_internal/models/wheel.py +92 -0
- venv/Lib/site-packages/pip/_internal/network/__init__.py +2 -0
- venv/Lib/site-packages/pip/_internal/network/auth.py +561 -0
- venv/Lib/site-packages/pip/_internal/network/cache.py +69 -0
- venv/Lib/site-packages/pip/_internal/network/download.py +186 -0
- venv/Lib/site-packages/pip/_internal/network/lazy_wheel.py +210 -0
- venv/Lib/site-packages/pip/_internal/network/session.py +519 -0
- venv/Lib/site-packages/pip/_internal/network/utils.py +96 -0
- venv/Lib/site-packages/pip/_internal/network/xmlrpc.py +60 -0
- venv/Lib/site-packages/pip/_internal/operations/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/operations/build/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/operations/build/build_tracker.py +124 -0
- venv/Lib/site-packages/pip/_internal/operations/build/metadata.py +39 -0
- venv/Lib/site-packages/pip/_internal/operations/build/metadata_editable.py +41 -0
- venv/Lib/site-packages/pip/_internal/operations/build/metadata_legacy.py +74 -0
- venv/Lib/site-packages/pip/_internal/operations/build/wheel.py +37 -0
- venv/Lib/site-packages/pip/_internal/operations/build/wheel_editable.py +46 -0
- venv/Lib/site-packages/pip/_internal/operations/build/wheel_legacy.py +102 -0
- venv/Lib/site-packages/pip/_internal/operations/check.py +187 -0
- venv/Lib/site-packages/pip/_internal/operations/freeze.py +255 -0
- venv/Lib/site-packages/pip/_internal/operations/install/__init__.py +2 -0
- venv/Lib/site-packages/pip/_internal/operations/install/editable_legacy.py +46 -0
- venv/Lib/site-packages/pip/_internal/operations/install/wheel.py +740 -0
- venv/Lib/site-packages/pip/_internal/operations/prepare.py +743 -0
- venv/Lib/site-packages/pip/_internal/pyproject.py +179 -0
- venv/Lib/site-packages/pip/_internal/req/__init__.py +92 -0
- venv/Lib/site-packages/pip/_internal/req/constructors.py +506 -0
- venv/Lib/site-packages/pip/_internal/req/req_file.py +552 -0
- venv/Lib/site-packages/pip/_internal/req/req_install.py +874 -0
- venv/Lib/site-packages/pip/_internal/req/req_set.py +119 -0
- venv/Lib/site-packages/pip/_internal/req/req_uninstall.py +650 -0
- venv/Lib/site-packages/pip/_internal/resolution/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/resolution/base.py +20 -0
- venv/Lib/site-packages/pip/_internal/resolution/legacy/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/resolution/legacy/resolver.py +600 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/base.py +141 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/candidates.py +555 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/factory.py +730 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +155 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/provider.py +255 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/reporter.py +80 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/requirements.py +165 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/resolver.py +299 -0
- venv/Lib/site-packages/pip/_internal/self_outdated_check.py +242 -0
- venv/Lib/site-packages/pip/_internal/utils/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/utils/_jaraco_text.py +109 -0
- venv/Lib/site-packages/pip/_internal/utils/_log.py +38 -0
- venv/Lib/site-packages/pip/_internal/utils/appdirs.py +52 -0
- venv/Lib/site-packages/pip/_internal/utils/compat.py +63 -0
- venv/Lib/site-packages/pip/_internal/utils/compatibility_tags.py +165 -0
- venv/Lib/site-packages/pip/_internal/utils/datetime.py +11 -0
- venv/Lib/site-packages/pip/_internal/utils/deprecation.py +120 -0
- venv/Lib/site-packages/pip/_internal/utils/direct_url_helpers.py +87 -0
- venv/Lib/site-packages/pip/_internal/utils/egg_link.py +72 -0
- venv/Lib/site-packages/pip/_internal/utils/encoding.py +36 -0
- venv/Lib/site-packages/pip/_internal/utils/entrypoints.py +84 -0
- venv/Lib/site-packages/pip/_internal/utils/filesystem.py +153 -0
- venv/Lib/site-packages/pip/_internal/utils/filetypes.py +27 -0
- venv/Lib/site-packages/pip/_internal/utils/glibc.py +88 -0
- venv/Lib/site-packages/pip/_internal/utils/hashes.py +151 -0
- venv/Lib/site-packages/pip/_internal/utils/inject_securetransport.py +35 -0
- venv/Lib/site-packages/pip/_internal/utils/logging.py +348 -0
- venv/Lib/site-packages/pip/_internal/utils/misc.py +735 -0
- venv/Lib/site-packages/pip/_internal/utils/models.py +39 -0
- venv/Lib/site-packages/pip/_internal/utils/packaging.py +57 -0
- venv/Lib/site-packages/pip/_internal/utils/setuptools_build.py +146 -0
- venv/Lib/site-packages/pip/_internal/utils/subprocess.py +260 -0
- venv/Lib/site-packages/pip/_internal/utils/temp_dir.py +246 -0
- venv/Lib/site-packages/pip/_internal/utils/unpacking.py +257 -0
- venv/Lib/site-packages/pip/_internal/utils/urls.py +62 -0
- venv/Lib/site-packages/pip/_internal/utils/virtualenv.py +104 -0
- venv/Lib/site-packages/pip/_internal/utils/wheel.py +136 -0
- venv/Lib/site-packages/pip/_internal/vcs/__init__.py +15 -0
- venv/Lib/site-packages/pip/_internal/vcs/bazaar.py +112 -0
- venv/Lib/site-packages/pip/_internal/vcs/git.py +526 -0
- venv/Lib/site-packages/pip/_internal/vcs/mercurial.py +163 -0
- venv/Lib/site-packages/pip/_internal/vcs/subversion.py +324 -0
- venv/Lib/site-packages/pip/_internal/vcs/versioncontrol.py +705 -0
- venv/Lib/site-packages/pip/_internal/wheel_builder.py +355 -0
- venv/Lib/site-packages/pip/_vendor/__init__.py +120 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/__init__.py +18 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/_cmd.py +61 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/adapter.py +137 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/cache.py +65 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/__init__.py +9 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py +188 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py +39 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/compat.py +32 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/controller.py +439 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/filewrapper.py +111 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/heuristics.py +139 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/serialize.py +190 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/wrapper.py +33 -0
- venv/Lib/site-packages/pip/_vendor/certifi/__init__.py +4 -0
- venv/Lib/site-packages/pip/_vendor/certifi/__main__.py +12 -0
- venv/Lib/site-packages/pip/_vendor/certifi/core.py +108 -0
- venv/Lib/site-packages/pip/_vendor/chardet/__init__.py +115 -0
- venv/Lib/site-packages/pip/_vendor/chardet/big5freq.py +386 -0
- venv/Lib/site-packages/pip/_vendor/chardet/big5prober.py +47 -0
- venv/Lib/site-packages/pip/_vendor/chardet/chardistribution.py +261 -0
- venv/Lib/site-packages/pip/_vendor/chardet/charsetgroupprober.py +106 -0
- venv/Lib/site-packages/pip/_vendor/chardet/charsetprober.py +147 -0
- venv/Lib/site-packages/pip/_vendor/chardet/cli/__init__.py +0 -0
- venv/Lib/site-packages/pip/_vendor/chardet/cli/chardetect.py +112 -0
- venv/Lib/site-packages/pip/_vendor/chardet/codingstatemachine.py +90 -0
- venv/Lib/site-packages/pip/_vendor/chardet/codingstatemachinedict.py +19 -0
- venv/Lib/site-packages/pip/_vendor/chardet/cp949prober.py +49 -0
- venv/Lib/site-packages/pip/_vendor/chardet/enums.py +85 -0
- venv/Lib/site-packages/pip/_vendor/chardet/escprober.py +102 -0
- venv/Lib/site-packages/pip/_vendor/chardet/escsm.py +261 -0
- venv/Lib/site-packages/pip/_vendor/chardet/eucjpprober.py +102 -0
- venv/Lib/site-packages/pip/_vendor/chardet/euckrfreq.py +196 -0
- venv/Lib/site-packages/pip/_vendor/chardet/euckrprober.py +47 -0
- venv/Lib/site-packages/pip/_vendor/chardet/euctwfreq.py +388 -0
- venv/Lib/site-packages/pip/_vendor/chardet/euctwprober.py +47 -0
- venv/Lib/site-packages/pip/_vendor/chardet/gb2312freq.py +284 -0
- venv/Lib/site-packages/pip/_vendor/chardet/gb2312prober.py +47 -0
- venv/Lib/site-packages/pip/_vendor/chardet/hebrewprober.py +316 -0
- venv/Lib/site-packages/pip/_vendor/chardet/jisfreq.py +325 -0
- venv/Lib/site-packages/pip/_vendor/chardet/johabfreq.py +2382 -0
- venv/Lib/site-packages/pip/_vendor/chardet/johabprober.py +47 -0
- venv/Lib/site-packages/pip/_vendor/chardet/jpcntx.py +238 -0
- venv/Lib/site-packages/pip/_vendor/chardet/langbulgarianmodel.py +4649 -0
- venv/Lib/site-packages/pip/_vendor/chardet/langgreekmodel.py +4397 -0
- venv/Lib/site-packages/pip/_vendor/chardet/langhebrewmodel.py +4380 -0
- venv/Lib/site-packages/pip/_vendor/chardet/langhungarianmodel.py +4649 -0
- venv/Lib/site-packages/pip/_vendor/chardet/langrussianmodel.py +5725 -0
- venv/Lib/site-packages/pip/_vendor/chardet/langthaimodel.py +4380 -0
- venv/Lib/site-packages/pip/_vendor/chardet/langturkishmodel.py +4380 -0
- venv/Lib/site-packages/pip/_vendor/chardet/latin1prober.py +147 -0
- venv/Lib/site-packages/pip/_vendor/chardet/macromanprober.py +162 -0
- venv/Lib/site-packages/pip/_vendor/chardet/mbcharsetprober.py +95 -0
- venv/Lib/site-packages/pip/_vendor/chardet/mbcsgroupprober.py +57 -0
- venv/Lib/site-packages/pip/_vendor/chardet/mbcssm.py +661 -0
- venv/Lib/site-packages/pip/_vendor/chardet/metadata/__init__.py +0 -0
- venv/Lib/site-packages/pip/_vendor/chardet/metadata/languages.py +352 -0
- venv/Lib/site-packages/pip/_vendor/chardet/resultdict.py +16 -0
- venv/Lib/site-packages/pip/_vendor/chardet/sbcharsetprober.py +162 -0
- venv/Lib/site-packages/pip/_vendor/chardet/sbcsgroupprober.py +88 -0
- venv/Lib/site-packages/pip/_vendor/chardet/sjisprober.py +105 -0
- venv/Lib/site-packages/pip/_vendor/chardet/universaldetector.py +362 -0
- venv/Lib/site-packages/pip/_vendor/chardet/utf1632prober.py +225 -0
- venv/Lib/site-packages/pip/_vendor/chardet/utf8prober.py +82 -0
- venv/Lib/site-packages/pip/_vendor/chardet/version.py +9 -0
- venv/Lib/site-packages/pip/_vendor/colorama/__init__.py +7 -0
- venv/Lib/site-packages/pip/_vendor/colorama/ansi.py +102 -0
- venv/Lib/site-packages/pip/_vendor/colorama/ansitowin32.py +277 -0
- venv/Lib/site-packages/pip/_vendor/colorama/initialise.py +121 -0
- venv/Lib/site-packages/pip/_vendor/colorama/tests/__init__.py +1 -0
- venv/Lib/site-packages/pip/_vendor/colorama/tests/ansi_test.py +76 -0
- venv/Lib/site-packages/pip/_vendor/colorama/tests/ansitowin32_test.py +294 -0
- venv/Lib/site-packages/pip/_vendor/colorama/tests/initialise_test.py +189 -0
- venv/Lib/site-packages/pip/_vendor/colorama/tests/isatty_test.py +57 -0
- venv/Lib/site-packages/pip/_vendor/colorama/tests/utils.py +49 -0
- venv/Lib/site-packages/pip/_vendor/colorama/tests/winterm_test.py +131 -0
- venv/Lib/site-packages/pip/_vendor/colorama/win32.py +180 -0
- venv/Lib/site-packages/pip/_vendor/colorama/winterm.py +195 -0
- venv/Lib/site-packages/pip/_vendor/distlib/__init__.py +23 -0
- venv/Lib/site-packages/pip/_vendor/distlib/compat.py +1116 -0
- venv/Lib/site-packages/pip/_vendor/distlib/database.py +1350 -0
- venv/Lib/site-packages/pip/_vendor/distlib/index.py +508 -0
- venv/Lib/site-packages/pip/_vendor/distlib/locators.py +1300 -0
- venv/Lib/site-packages/pip/_vendor/distlib/manifest.py +393 -0
- venv/Lib/site-packages/pip/_vendor/distlib/markers.py +152 -0
- venv/Lib/site-packages/pip/_vendor/distlib/metadata.py +1076 -0
- venv/Lib/site-packages/pip/_vendor/distlib/resources.py +358 -0
- venv/Lib/site-packages/pip/_vendor/distlib/scripts.py +437 -0
- venv/Lib/site-packages/pip/_vendor/distlib/util.py +1932 -0
- venv/Lib/site-packages/pip/_vendor/distlib/version.py +739 -0
- venv/Lib/site-packages/pip/_vendor/distlib/wheel.py +1082 -0
- venv/Lib/site-packages/pip/_vendor/distro/__init__.py +54 -0
- venv/Lib/site-packages/pip/_vendor/distro/__main__.py +4 -0
- venv/Lib/site-packages/pip/_vendor/distro/distro.py +1399 -0
- venv/Lib/site-packages/pip/_vendor/idna/__init__.py +44 -0
- venv/Lib/site-packages/pip/_vendor/idna/codec.py +112 -0
- venv/Lib/site-packages/pip/_vendor/idna/compat.py +13 -0
- venv/Lib/site-packages/pip/_vendor/idna/core.py +400 -0
- venv/Lib/site-packages/pip/_vendor/idna/idnadata.py +2151 -0
- venv/Lib/site-packages/pip/_vendor/idna/intranges.py +54 -0
- venv/Lib/site-packages/pip/_vendor/idna/package_data.py +2 -0
- venv/Lib/site-packages/pip/_vendor/idna/uts46data.py +8600 -0
- venv/Lib/site-packages/pip/_vendor/msgpack/__init__.py +57 -0
- venv/Lib/site-packages/pip/_vendor/msgpack/exceptions.py +48 -0
- venv/Lib/site-packages/pip/_vendor/msgpack/ext.py +193 -0
- venv/Lib/site-packages/pip/_vendor/msgpack/fallback.py +1010 -0
- venv/Lib/site-packages/pip/_vendor/packaging/__about__.py +26 -0
- venv/Lib/site-packages/pip/_vendor/packaging/__init__.py +25 -0
- venv/Lib/site-packages/pip/_vendor/packaging/_manylinux.py +301 -0
- venv/Lib/site-packages/pip/_vendor/packaging/_musllinux.py +136 -0
- venv/Lib/site-packages/pip/_vendor/packaging/_structures.py +61 -0
- venv/Lib/site-packages/pip/_vendor/packaging/markers.py +304 -0
- venv/Lib/site-packages/pip/_vendor/packaging/requirements.py +146 -0
- venv/Lib/site-packages/pip/_vendor/packaging/specifiers.py +802 -0
- venv/Lib/site-packages/pip/_vendor/packaging/tags.py +487 -0
- venv/Lib/site-packages/pip/_vendor/packaging/utils.py +136 -0
- venv/Lib/site-packages/pip/_vendor/packaging/version.py +504 -0
- venv/Lib/site-packages/pip/_vendor/pkg_resources/__init__.py +3361 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/__init__.py +566 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/__main__.py +53 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/android.py +210 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/api.py +223 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/macos.py +91 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/unix.py +223 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/version.py +4 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/windows.py +255 -0
- venv/Lib/site-packages/pip/_vendor/pygments/__init__.py +82 -0
- venv/Lib/site-packages/pip/_vendor/pygments/__main__.py +17 -0
- venv/Lib/site-packages/pip/_vendor/pygments/cmdline.py +668 -0
- venv/Lib/site-packages/pip/_vendor/pygments/console.py +70 -0
- venv/Lib/site-packages/pip/_vendor/pygments/filter.py +71 -0
- venv/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py +940 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatter.py +124 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py +158 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/_mapping.py +23 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/bbcode.py +108 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/groff.py +170 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/html.py +989 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/img.py +645 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/irc.py +154 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/latex.py +521 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/other.py +161 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/pangomarkup.py +83 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/rtf.py +146 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/svg.py +188 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/terminal.py +127 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/terminal256.py +338 -0
- venv/Lib/site-packages/pip/_vendor/pygments/lexer.py +943 -0
- venv/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py +362 -0
- venv/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py +559 -0
- venv/Lib/site-packages/pip/_vendor/pygments/lexers/python.py +1198 -0
- venv/Lib/site-packages/pip/_vendor/pygments/modeline.py +43 -0
- venv/Lib/site-packages/pip/_vendor/pygments/plugin.py +88 -0
- venv/Lib/site-packages/pip/_vendor/pygments/regexopt.py +91 -0
- venv/Lib/site-packages/pip/_vendor/pygments/scanner.py +104 -0
- venv/Lib/site-packages/pip/_vendor/pygments/sphinxext.py +217 -0
- venv/Lib/site-packages/pip/_vendor/pygments/style.py +197 -0
- venv/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py +103 -0
- venv/Lib/site-packages/pip/_vendor/pygments/token.py +213 -0
- venv/Lib/site-packages/pip/_vendor/pygments/unistring.py +153 -0
- venv/Lib/site-packages/pip/_vendor/pygments/util.py +330 -0
- venv/Lib/site-packages/pip/_vendor/pyparsing/__init__.py +322 -0
- venv/Lib/site-packages/pip/_vendor/pyparsing/actions.py +217 -0
- venv/Lib/site-packages/pip/_vendor/pyparsing/common.py +432 -0
- venv/Lib/site-packages/pip/_vendor/pyparsing/core.py +6115 -0
- venv/Lib/site-packages/pip/_vendor/pyparsing/diagram/__init__.py +656 -0
- venv/Lib/site-packages/pip/_vendor/pyparsing/exceptions.py +299 -0
- venv/Lib/site-packages/pip/_vendor/pyparsing/helpers.py +1100 -0
- venv/Lib/site-packages/pip/_vendor/pyparsing/results.py +796 -0
- venv/Lib/site-packages/pip/_vendor/pyparsing/testing.py +331 -0
- venv/Lib/site-packages/pip/_vendor/pyparsing/unicode.py +361 -0
- venv/Lib/site-packages/pip/_vendor/pyparsing/util.py +284 -0
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/__init__.py +23 -0
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_compat.py +8 -0
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_impl.py +330 -0
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py +18 -0
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py +353 -0
- venv/Lib/site-packages/pip/_vendor/requests/__init__.py +182 -0
- venv/Lib/site-packages/pip/_vendor/requests/__version__.py +14 -0
- venv/Lib/site-packages/pip/_vendor/requests/_internal_utils.py +50 -0
- venv/Lib/site-packages/pip/_vendor/requests/adapters.py +538 -0
- venv/Lib/site-packages/pip/_vendor/requests/api.py +157 -0
- venv/Lib/site-packages/pip/_vendor/requests/auth.py +315 -0
- venv/Lib/site-packages/pip/_vendor/requests/certs.py +24 -0
- venv/Lib/site-packages/pip/_vendor/requests/compat.py +67 -0
- venv/Lib/site-packages/pip/_vendor/requests/cookies.py +561 -0
- venv/Lib/site-packages/pip/_vendor/requests/exceptions.py +141 -0
- venv/Lib/site-packages/pip/_vendor/requests/help.py +131 -0
- venv/Lib/site-packages/pip/_vendor/requests/hooks.py +33 -0
- venv/Lib/site-packages/pip/_vendor/requests/models.py +1034 -0
- venv/Lib/site-packages/pip/_vendor/requests/packages.py +16 -0
- venv/Lib/site-packages/pip/_vendor/requests/sessions.py +833 -0
- venv/Lib/site-packages/pip/_vendor/requests/status_codes.py +128 -0
- venv/Lib/site-packages/pip/_vendor/requests/structures.py +99 -0
- venv/Lib/site-packages/pip/_vendor/requests/utils.py +1094 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/__init__.py +26 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/compat/__init__.py +0 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/compat/collections_abc.py +6 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/providers.py +133 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/reporters.py +43 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers.py +547 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/structs.py +170 -0
- venv/Lib/site-packages/pip/_vendor/rich/__init__.py +177 -0
- venv/Lib/site-packages/pip/_vendor/rich/__main__.py +274 -0
- venv/Lib/site-packages/pip/_vendor/rich/_cell_widths.py +451 -0
- venv/Lib/site-packages/pip/_vendor/rich/_emoji_codes.py +3610 -0
- venv/Lib/site-packages/pip/_vendor/rich/_emoji_replace.py +32 -0
- venv/Lib/site-packages/pip/_vendor/rich/_export_format.py +76 -0
- venv/Lib/site-packages/pip/_vendor/rich/_extension.py +10 -0
- venv/Lib/site-packages/pip/_vendor/rich/_fileno.py +24 -0
- venv/Lib/site-packages/pip/_vendor/rich/_inspect.py +270 -0
- venv/Lib/site-packages/pip/_vendor/rich/_log_render.py +94 -0
- venv/Lib/site-packages/pip/_vendor/rich/_loop.py +43 -0
- venv/Lib/site-packages/pip/_vendor/rich/_null_file.py +69 -0
- venv/Lib/site-packages/pip/_vendor/rich/_palettes.py +309 -0
- venv/Lib/site-packages/pip/_vendor/rich/_pick.py +17 -0
- venv/Lib/site-packages/pip/_vendor/rich/_ratio.py +160 -0
- venv/Lib/site-packages/pip/_vendor/rich/_spinners.py +482 -0
- venv/Lib/site-packages/pip/_vendor/rich/_stack.py +16 -0
- venv/Lib/site-packages/pip/_vendor/rich/_timer.py +19 -0
- venv/Lib/site-packages/pip/_vendor/rich/_win32_console.py +662 -0
- venv/Lib/site-packages/pip/_vendor/rich/_windows.py +72 -0
- venv/Lib/site-packages/pip/_vendor/rich/_windows_renderer.py +56 -0
- venv/Lib/site-packages/pip/_vendor/rich/_wrap.py +56 -0
- venv/Lib/site-packages/pip/_vendor/rich/abc.py +33 -0
- venv/Lib/site-packages/pip/_vendor/rich/align.py +311 -0
- venv/Lib/site-packages/pip/_vendor/rich/ansi.py +240 -0
- venv/Lib/site-packages/pip/_vendor/rich/bar.py +94 -0
- venv/Lib/site-packages/pip/_vendor/rich/box.py +517 -0
- venv/Lib/site-packages/pip/_vendor/rich/cells.py +154 -0
- venv/Lib/site-packages/pip/_vendor/rich/color.py +622 -0
- venv/Lib/site-packages/pip/_vendor/rich/color_triplet.py +38 -0
- venv/Lib/site-packages/pip/_vendor/rich/columns.py +187 -0
- venv/Lib/site-packages/pip/_vendor/rich/console.py +2633 -0
- venv/Lib/site-packages/pip/_vendor/rich/constrain.py +37 -0
- venv/Lib/site-packages/pip/_vendor/rich/containers.py +167 -0
- venv/Lib/site-packages/pip/_vendor/rich/control.py +225 -0
- venv/Lib/site-packages/pip/_vendor/rich/default_styles.py +190 -0
- venv/Lib/site-packages/pip/_vendor/rich/diagnose.py +37 -0
- venv/Lib/site-packages/pip/_vendor/rich/emoji.py +96 -0
- venv/Lib/site-packages/pip/_vendor/rich/errors.py +34 -0
- venv/Lib/site-packages/pip/_vendor/rich/file_proxy.py +57 -0
- venv/Lib/site-packages/pip/_vendor/rich/filesize.py +89 -0
- venv/Lib/site-packages/pip/_vendor/rich/highlighter.py +232 -0
- venv/Lib/site-packages/pip/_vendor/rich/json.py +140 -0
- venv/Lib/site-packages/pip/_vendor/rich/jupyter.py +101 -0
- venv/Lib/site-packages/pip/_vendor/rich/layout.py +443 -0
- venv/Lib/site-packages/pip/_vendor/rich/live.py +375 -0
- venv/Lib/site-packages/pip/_vendor/rich/live_render.py +113 -0
- venv/Lib/site-packages/pip/_vendor/rich/logging.py +289 -0
- venv/Lib/site-packages/pip/_vendor/rich/markup.py +246 -0
- venv/Lib/site-packages/pip/_vendor/rich/measure.py +151 -0
- venv/Lib/site-packages/pip/_vendor/rich/padding.py +141 -0
- venv/Lib/site-packages/pip/_vendor/rich/pager.py +34 -0
- venv/Lib/site-packages/pip/_vendor/rich/palette.py +100 -0
- venv/Lib/site-packages/pip/_vendor/rich/panel.py +308 -0
- venv/Lib/site-packages/pip/_vendor/rich/pretty.py +994 -0
- venv/Lib/site-packages/pip/_vendor/rich/progress.py +1702 -0
- venv/Lib/site-packages/pip/_vendor/rich/progress_bar.py +224 -0
- venv/Lib/site-packages/pip/_vendor/rich/prompt.py +376 -0
- venv/Lib/site-packages/pip/_vendor/rich/protocol.py +42 -0
- venv/Lib/site-packages/pip/_vendor/rich/region.py +10 -0
- venv/Lib/site-packages/pip/_vendor/rich/repr.py +149 -0
- venv/Lib/site-packages/pip/_vendor/rich/rule.py +130 -0
- venv/Lib/site-packages/pip/_vendor/rich/scope.py +86 -0
- venv/Lib/site-packages/pip/_vendor/rich/screen.py +54 -0
- venv/Lib/site-packages/pip/_vendor/rich/segment.py +739 -0
- venv/Lib/site-packages/pip/_vendor/rich/spinner.py +137 -0
- venv/Lib/site-packages/pip/_vendor/rich/status.py +132 -0
- venv/Lib/site-packages/pip/_vendor/rich/style.py +796 -0
- venv/Lib/site-packages/pip/_vendor/rich/styled.py +42 -0
- venv/Lib/site-packages/pip/_vendor/rich/syntax.py +948 -0
- venv/Lib/site-packages/pip/_vendor/rich/table.py +1002 -0
- venv/Lib/site-packages/pip/_vendor/rich/terminal_theme.py +153 -0
- venv/Lib/site-packages/pip/_vendor/rich/text.py +1307 -0
- venv/Lib/site-packages/pip/_vendor/rich/theme.py +115 -0
- venv/Lib/site-packages/pip/_vendor/rich/themes.py +5 -0
- venv/Lib/site-packages/pip/_vendor/rich/traceback.py +756 -0
- venv/Lib/site-packages/pip/_vendor/rich/tree.py +251 -0
- venv/Lib/site-packages/pip/_vendor/six.py +998 -0
- venv/Lib/site-packages/pip/_vendor/tenacity/__init__.py +608 -0
- venv/Lib/site-packages/pip/_vendor/tenacity/_asyncio.py +94 -0
- venv/Lib/site-packages/pip/_vendor/tenacity/_utils.py +76 -0
- venv/Lib/site-packages/pip/_vendor/tenacity/after.py +51 -0
- venv/Lib/site-packages/pip/_vendor/tenacity/before.py +46 -0
- venv/Lib/site-packages/pip/_vendor/tenacity/before_sleep.py +71 -0
- venv/Lib/site-packages/pip/_vendor/tenacity/nap.py +43 -0
- venv/Lib/site-packages/pip/_vendor/tenacity/retry.py +272 -0
- venv/Lib/site-packages/pip/_vendor/tenacity/stop.py +103 -0
- venv/Lib/site-packages/pip/_vendor/tenacity/tornadoweb.py +59 -0
- venv/Lib/site-packages/pip/_vendor/tenacity/wait.py +228 -0
- venv/Lib/site-packages/pip/_vendor/tomli/__init__.py +11 -0
- venv/Lib/site-packages/pip/_vendor/tomli/_parser.py +691 -0
- venv/Lib/site-packages/pip/_vendor/tomli/_re.py +107 -0
- venv/Lib/site-packages/pip/_vendor/tomli/_types.py +10 -0
- venv/Lib/site-packages/pip/_vendor/typing_extensions.py +3072 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/__init__.py +102 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/_collections.py +337 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/_version.py +2 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/connection.py +572 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py +1132 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/__init__.py +0 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py +36 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py +0 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py +519 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py +397 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/appengine.py +314 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py +130 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +518 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/securetransport.py +921 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py +216 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/exceptions.py +323 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/fields.py +274 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/filepost.py +98 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/packages/__init__.py +0 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py +0 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py +51 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/weakref_finalize.py +155 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/packages/six.py +1076 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py +537 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/request.py +170 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/response.py +879 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/__init__.py +49 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/connection.py +149 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/proxy.py +57 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/queue.py +22 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/request.py +137 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/response.py +107 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/retry.py +620 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py +495 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py +159 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/ssltransport.py +221 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/timeout.py +271 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/url.py +435 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/wait.py +152 -0
- venv/Lib/site-packages/pip/_vendor/webencodings/__init__.py +342 -0
- venv/Lib/site-packages/pip/_vendor/webencodings/labels.py +231 -0
- venv/Lib/site-packages/pip/_vendor/webencodings/mklabels.py +59 -0
- venv/Lib/site-packages/pip/_vendor/webencodings/tests.py +153 -0
- venv/Lib/site-packages/pip/_vendor/webencodings/x_user_defined.py +325 -0
- venv/Lib/site-packages/pip/py.typed +4 -0
- venv/Lib/site-packages/pkg_resources/__init__.py +3296 -0
- venv/Lib/site-packages/pkg_resources/_vendor/__init__.py +0 -0
- venv/Lib/site-packages/pkg_resources/_vendor/appdirs.py +608 -0
- venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/__init__.py +36 -0
- venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/_adapters.py +170 -0
- venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/_common.py +104 -0
- venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/_compat.py +98 -0
- venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/_itertools.py +35 -0
- venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/_legacy.py +121 -0
- venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/abc.py +137 -0
- venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/readers.py +122 -0
- venv/Lib/site-packages/pkg_resources/_vendor/importlib_resources/simple.py +116 -0
- venv/Lib/site-packages/pkg_resources/_vendor/jaraco/__init__.py +0 -0
- venv/Lib/site-packages/pkg_resources/_vendor/jaraco/context.py +213 -0
- venv/Lib/site-packages/pkg_resources/_vendor/jaraco/functools.py +525 -0
- venv/Lib/site-packages/pkg_resources/_vendor/jaraco/text/__init__.py +599 -0
- venv/Lib/site-packages/pkg_resources/_vendor/more_itertools/__init__.py +4 -0
- venv/Lib/site-packages/pkg_resources/_vendor/more_itertools/more.py +4316 -0
- venv/Lib/site-packages/pkg_resources/_vendor/more_itertools/recipes.py +698 -0
- venv/Lib/site-packages/pkg_resources/_vendor/packaging/__about__.py +26 -0
- venv/Lib/site-packages/pkg_resources/_vendor/packaging/__init__.py +25 -0
- venv/Lib/site-packages/pkg_resources/_vendor/packaging/_manylinux.py +301 -0
- venv/Lib/site-packages/pkg_resources/_vendor/packaging/_musllinux.py +136 -0
- venv/Lib/site-packages/pkg_resources/_vendor/packaging/_structures.py +61 -0
- venv/Lib/site-packages/pkg_resources/_vendor/packaging/markers.py +304 -0
- venv/Lib/site-packages/pkg_resources/_vendor/packaging/requirements.py +146 -0
- venv/Lib/site-packages/pkg_resources/_vendor/packaging/specifiers.py +802 -0
- venv/Lib/site-packages/pkg_resources/_vendor/packaging/tags.py +487 -0
- venv/Lib/site-packages/pkg_resources/_vendor/packaging/utils.py +136 -0
- venv/Lib/site-packages/pkg_resources/_vendor/packaging/version.py +504 -0
- venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/__init__.py +331 -0
- venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/actions.py +207 -0
- venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/common.py +424 -0
- venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/core.py +5814 -0
- venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/diagram/__init__.py +642 -0
- venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/exceptions.py +267 -0
- venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/helpers.py +1088 -0
- venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/results.py +760 -0
- venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/testing.py +331 -0
- venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/unicode.py +352 -0
- venv/Lib/site-packages/pkg_resources/_vendor/pyparsing/util.py +235 -0
- venv/Lib/site-packages/pkg_resources/_vendor/zipp.py +329 -0
- venv/Lib/site-packages/pkg_resources/extern/__init__.py +76 -0
- venv/Lib/site-packages/setuptools/__init__.py +247 -0
- venv/Lib/site-packages/setuptools/_deprecation_warning.py +7 -0
- venv/Lib/site-packages/setuptools/_distutils/__init__.py +24 -0
- venv/Lib/site-packages/setuptools/_distutils/_collections.py +56 -0
- venv/Lib/site-packages/setuptools/_distutils/_functools.py +20 -0
- venv/Lib/site-packages/setuptools/_distutils/_macos_compat.py +12 -0
- venv/Lib/site-packages/setuptools/_distutils/_msvccompiler.py +572 -0
- venv/Lib/site-packages/setuptools/_distutils/archive_util.py +280 -0
- venv/Lib/site-packages/setuptools/_distutils/bcppcompiler.py +408 -0
- venv/Lib/site-packages/setuptools/_distutils/ccompiler.py +1220 -0
- venv/Lib/site-packages/setuptools/_distutils/cmd.py +436 -0
- venv/Lib/site-packages/setuptools/_distutils/command/__init__.py +25 -0
- venv/Lib/site-packages/setuptools/_distutils/command/_framework_compat.py +55 -0
- venv/Lib/site-packages/setuptools/_distutils/command/bdist.py +157 -0
- venv/Lib/site-packages/setuptools/_distutils/command/bdist_dumb.py +144 -0
- venv/Lib/site-packages/setuptools/_distutils/command/bdist_rpm.py +615 -0
- venv/Lib/site-packages/setuptools/_distutils/command/build.py +153 -0
- venv/Lib/site-packages/setuptools/_distutils/command/build_clib.py +208 -0
- venv/Lib/site-packages/setuptools/_distutils/command/build_ext.py +787 -0
- venv/Lib/site-packages/setuptools/_distutils/command/build_py.py +407 -0
- venv/Lib/site-packages/setuptools/_distutils/command/build_scripts.py +173 -0
- venv/Lib/site-packages/setuptools/_distutils/command/check.py +151 -0
- venv/Lib/site-packages/setuptools/_distutils/command/clean.py +76 -0
- venv/Lib/site-packages/setuptools/_distutils/command/config.py +377 -0
- venv/Lib/site-packages/setuptools/_distutils/command/install.py +814 -0
- venv/Lib/site-packages/setuptools/_distutils/command/install_data.py +84 -0
- venv/Lib/site-packages/setuptools/_distutils/command/install_egg_info.py +91 -0
- venv/Lib/site-packages/setuptools/_distutils/command/install_headers.py +45 -0
- venv/Lib/site-packages/setuptools/_distutils/command/install_lib.py +238 -0
- venv/Lib/site-packages/setuptools/_distutils/command/install_scripts.py +61 -0
- venv/Lib/site-packages/setuptools/_distutils/command/py37compat.py +31 -0
- venv/Lib/site-packages/setuptools/_distutils/command/register.py +319 -0
- venv/Lib/site-packages/setuptools/_distutils/command/sdist.py +531 -0
- venv/Lib/site-packages/setuptools/_distutils/command/upload.py +205 -0
- venv/Lib/site-packages/setuptools/_distutils/config.py +139 -0
- venv/Lib/site-packages/setuptools/_distutils/core.py +291 -0
- venv/Lib/site-packages/setuptools/_distutils/cygwinccompiler.py +364 -0
- venv/Lib/site-packages/setuptools/_distutils/debug.py +5 -0
- venv/Lib/site-packages/setuptools/_distutils/dep_util.py +96 -0
- venv/Lib/site-packages/setuptools/_distutils/dir_util.py +243 -0
- venv/Lib/site-packages/setuptools/_distutils/dist.py +1286 -0
- venv/Lib/site-packages/setuptools/_distutils/errors.py +127 -0
- venv/Lib/site-packages/setuptools/_distutils/extension.py +248 -0
- venv/Lib/site-packages/setuptools/_distutils/fancy_getopt.py +470 -0
- venv/Lib/site-packages/setuptools/_distutils/file_util.py +249 -0
- venv/Lib/site-packages/setuptools/_distutils/filelist.py +371 -0
- venv/Lib/site-packages/setuptools/_distutils/log.py +80 -0
- venv/Lib/site-packages/setuptools/_distutils/msvc9compiler.py +832 -0
- venv/Lib/site-packages/setuptools/_distutils/msvccompiler.py +695 -0
- venv/Lib/site-packages/setuptools/_distutils/py38compat.py +8 -0
- venv/Lib/site-packages/setuptools/_distutils/py39compat.py +22 -0
- venv/Lib/site-packages/setuptools/_distutils/spawn.py +109 -0
- venv/Lib/site-packages/setuptools/_distutils/sysconfig.py +558 -0
- venv/Lib/site-packages/setuptools/_distutils/text_file.py +287 -0
- venv/Lib/site-packages/setuptools/_distutils/unixccompiler.py +401 -0
- venv/Lib/site-packages/setuptools/_distutils/util.py +513 -0
- venv/Lib/site-packages/setuptools/_distutils/version.py +358 -0
- venv/Lib/site-packages/setuptools/_distutils/versionpredicate.py +175 -0
- venv/Lib/site-packages/setuptools/_entry_points.py +86 -0
- venv/Lib/site-packages/setuptools/_imp.py +82 -0
- venv/Lib/site-packages/setuptools/_importlib.py +47 -0
- venv/Lib/site-packages/setuptools/_itertools.py +23 -0
- venv/Lib/site-packages/setuptools/_path.py +29 -0
- venv/Lib/site-packages/setuptools/_reqs.py +19 -0
- venv/Lib/site-packages/setuptools/_vendor/__init__.py +0 -0
- venv/Lib/site-packages/setuptools/_vendor/importlib_metadata/__init__.py +1047 -0
- venv/Lib/site-packages/setuptools/_vendor/importlib_metadata/_adapters.py +68 -0
- venv/Lib/site-packages/setuptools/_vendor/importlib_metadata/_collections.py +30 -0
- venv/Lib/site-packages/setuptools/_vendor/importlib_metadata/_compat.py +71 -0
- venv/Lib/site-packages/setuptools/_vendor/importlib_metadata/_functools.py +104 -0
- venv/Lib/site-packages/setuptools/_vendor/importlib_metadata/_itertools.py +73 -0
- venv/Lib/site-packages/setuptools/_vendor/importlib_metadata/_meta.py +48 -0
- venv/Lib/site-packages/setuptools/_vendor/importlib_metadata/_text.py +99 -0
- venv/Lib/site-packages/setuptools/_vendor/importlib_resources/__init__.py +36 -0
- venv/Lib/site-packages/setuptools/_vendor/importlib_resources/_adapters.py +170 -0
- venv/Lib/site-packages/setuptools/_vendor/importlib_resources/_common.py +104 -0
- venv/Lib/site-packages/setuptools/_vendor/importlib_resources/_compat.py +98 -0
- venv/Lib/site-packages/setuptools/_vendor/importlib_resources/_itertools.py +35 -0
- venv/Lib/site-packages/setuptools/_vendor/importlib_resources/_legacy.py +121 -0
- venv/Lib/site-packages/setuptools/_vendor/importlib_resources/abc.py +137 -0
- venv/Lib/site-packages/setuptools/_vendor/importlib_resources/readers.py +122 -0
- venv/Lib/site-packages/setuptools/_vendor/importlib_resources/simple.py +116 -0
- venv/Lib/site-packages/setuptools/_vendor/jaraco/__init__.py +0 -0
- venv/Lib/site-packages/setuptools/_vendor/jaraco/context.py +213 -0
- venv/Lib/site-packages/setuptools/_vendor/jaraco/functools.py +525 -0
- venv/Lib/site-packages/setuptools/_vendor/jaraco/text/__init__.py +599 -0
- venv/Lib/site-packages/setuptools/_vendor/more_itertools/__init__.py +4 -0
- venv/Lib/site-packages/setuptools/_vendor/more_itertools/more.py +3824 -0
- venv/Lib/site-packages/setuptools/_vendor/more_itertools/recipes.py +620 -0
- venv/Lib/site-packages/setuptools/_vendor/ordered_set.py +488 -0
- venv/Lib/site-packages/setuptools/_vendor/packaging/__about__.py +26 -0
- venv/Lib/site-packages/setuptools/_vendor/packaging/__init__.py +25 -0
- venv/Lib/site-packages/setuptools/_vendor/packaging/_manylinux.py +301 -0
- venv/Lib/site-packages/setuptools/_vendor/packaging/_musllinux.py +136 -0
- venv/Lib/site-packages/setuptools/_vendor/packaging/_structures.py +61 -0
- venv/Lib/site-packages/setuptools/_vendor/packaging/markers.py +304 -0
- venv/Lib/site-packages/setuptools/_vendor/packaging/requirements.py +146 -0
- venv/Lib/site-packages/setuptools/_vendor/packaging/specifiers.py +802 -0
- venv/Lib/site-packages/setuptools/_vendor/packaging/tags.py +487 -0
- venv/Lib/site-packages/setuptools/_vendor/packaging/utils.py +136 -0
- venv/Lib/site-packages/setuptools/_vendor/packaging/version.py +504 -0
- venv/Lib/site-packages/setuptools/_vendor/pyparsing/__init__.py +331 -0
- venv/Lib/site-packages/setuptools/_vendor/pyparsing/actions.py +207 -0
- venv/Lib/site-packages/setuptools/_vendor/pyparsing/common.py +424 -0
- venv/Lib/site-packages/setuptools/_vendor/pyparsing/core.py +5814 -0
- venv/Lib/site-packages/setuptools/_vendor/pyparsing/diagram/__init__.py +642 -0
- venv/Lib/site-packages/setuptools/_vendor/pyparsing/exceptions.py +267 -0
- venv/Lib/site-packages/setuptools/_vendor/pyparsing/helpers.py +1088 -0
- venv/Lib/site-packages/setuptools/_vendor/pyparsing/results.py +760 -0
- venv/Lib/site-packages/setuptools/_vendor/pyparsing/testing.py +331 -0
- venv/Lib/site-packages/setuptools/_vendor/pyparsing/unicode.py +352 -0
- venv/Lib/site-packages/setuptools/_vendor/pyparsing/util.py +235 -0
- venv/Lib/site-packages/setuptools/_vendor/tomli/__init__.py +11 -0
- venv/Lib/site-packages/setuptools/_vendor/tomli/_parser.py +691 -0
- venv/Lib/site-packages/setuptools/_vendor/tomli/_re.py +107 -0
- venv/Lib/site-packages/setuptools/_vendor/tomli/_types.py +10 -0
- venv/Lib/site-packages/setuptools/_vendor/typing_extensions.py +2296 -0
- venv/Lib/site-packages/setuptools/_vendor/zipp.py +329 -0
- venv/Lib/site-packages/setuptools/archive_util.py +213 -0
- venv/Lib/site-packages/setuptools/build_meta.py +511 -0
- venv/Lib/site-packages/setuptools/command/__init__.py +12 -0
- venv/Lib/site-packages/setuptools/command/alias.py +78 -0
- venv/Lib/site-packages/setuptools/command/bdist_egg.py +457 -0
- venv/Lib/site-packages/setuptools/command/bdist_rpm.py +40 -0
- venv/Lib/site-packages/setuptools/command/build.py +146 -0
- venv/Lib/site-packages/setuptools/command/build_clib.py +101 -0
- venv/Lib/site-packages/setuptools/command/build_ext.py +383 -0
- venv/Lib/site-packages/setuptools/command/build_py.py +368 -0
- venv/Lib/site-packages/setuptools/command/develop.py +193 -0
- venv/Lib/site-packages/setuptools/command/dist_info.py +142 -0
- venv/Lib/site-packages/setuptools/command/easy_install.py +2312 -0
- venv/Lib/site-packages/setuptools/command/editable_wheel.py +844 -0
- venv/Lib/site-packages/setuptools/command/egg_info.py +763 -0
- venv/Lib/site-packages/setuptools/command/install.py +139 -0
- venv/Lib/site-packages/setuptools/command/install_egg_info.py +63 -0
- venv/Lib/site-packages/setuptools/command/install_lib.py +122 -0
- venv/Lib/site-packages/setuptools/command/install_scripts.py +70 -0
- venv/Lib/site-packages/setuptools/command/py36compat.py +134 -0
- venv/Lib/site-packages/setuptools/command/register.py +18 -0
- venv/Lib/site-packages/setuptools/command/rotate.py +64 -0
- venv/Lib/site-packages/setuptools/command/saveopts.py +22 -0
- venv/Lib/site-packages/setuptools/command/sdist.py +210 -0
- venv/Lib/site-packages/setuptools/command/setopt.py +149 -0
- venv/Lib/site-packages/setuptools/command/test.py +251 -0
- venv/Lib/site-packages/setuptools/command/upload.py +17 -0
- venv/Lib/site-packages/setuptools/command/upload_docs.py +213 -0
- venv/Lib/site-packages/setuptools/config/__init__.py +35 -0
- venv/Lib/site-packages/setuptools/config/_apply_pyprojecttoml.py +377 -0
- venv/Lib/site-packages/setuptools/config/_validate_pyproject/__init__.py +34 -0
- venv/Lib/site-packages/setuptools/config/_validate_pyproject/error_reporting.py +318 -0
- venv/Lib/site-packages/setuptools/config/_validate_pyproject/extra_validations.py +36 -0
- venv/Lib/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_exceptions.py +51 -0
- venv/Lib/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_validations.py +1035 -0
- venv/Lib/site-packages/setuptools/config/_validate_pyproject/formats.py +259 -0
- venv/Lib/site-packages/setuptools/config/expand.py +462 -0
- venv/Lib/site-packages/setuptools/config/pyprojecttoml.py +493 -0
- venv/Lib/site-packages/setuptools/config/setupcfg.py +762 -0
- venv/Lib/site-packages/setuptools/dep_util.py +25 -0
- venv/Lib/site-packages/setuptools/depends.py +176 -0
- venv/Lib/site-packages/setuptools/discovery.py +600 -0
- venv/Lib/site-packages/setuptools/dist.py +1222 -0
- venv/Lib/site-packages/setuptools/errors.py +58 -0
- venv/Lib/site-packages/setuptools/extension.py +148 -0
- venv/Lib/site-packages/setuptools/extern/__init__.py +76 -0
- venv/Lib/site-packages/setuptools/glob.py +167 -0
- venv/Lib/site-packages/setuptools/installer.py +104 -0
- venv/Lib/site-packages/setuptools/launch.py +36 -0
- venv/Lib/site-packages/setuptools/logging.py +36 -0
- venv/Lib/site-packages/setuptools/monkey.py +165 -0
- venv/Lib/site-packages/setuptools/msvc.py +1703 -0
- venv/Lib/site-packages/setuptools/namespaces.py +107 -0
- venv/Lib/site-packages/setuptools/package_index.py +1126 -0
- venv/Lib/site-packages/setuptools/py34compat.py +13 -0
- venv/Lib/site-packages/setuptools/sandbox.py +530 -0
- venv/Lib/site-packages/setuptools/unicode_utils.py +42 -0
- venv/Lib/site-packages/setuptools/version.py +6 -0
- venv/Lib/site-packages/setuptools/wheel.py +222 -0
- venv/Lib/site-packages/setuptools/windows_support.py +29 -0
- xplia/__init__.py +72 -0
- xplia/api/__init__.py +432 -0
- xplia/api/fastapi_app.py +453 -0
- xplia/cli.py +321 -0
- xplia/compliance/__init__.py +39 -0
- xplia/compliance/ai_act.py +538 -0
- xplia/compliance/compliance_checker.py +511 -0
- xplia/compliance/compliance_report.py +236 -0
- xplia/compliance/expert_review/__init__.py +18 -0
- xplia/compliance/expert_review/evaluation_criteria.py +209 -0
- xplia/compliance/expert_review/integration.py +270 -0
- xplia/compliance/expert_review/trust_expert_evaluator.py +379 -0
- xplia/compliance/explanation_rights.py +45 -0
- xplia/compliance/formatters/__init__.py +35 -0
- xplia/compliance/formatters/csv_formatter.py +179 -0
- xplia/compliance/formatters/html_formatter.py +689 -0
- xplia/compliance/formatters/html_trust_formatter.py +147 -0
- xplia/compliance/formatters/json_formatter.py +107 -0
- xplia/compliance/formatters/pdf_formatter.py +641 -0
- xplia/compliance/formatters/pdf_trust_formatter.py +309 -0
- xplia/compliance/formatters/trust_formatter_mixin.py +267 -0
- xplia/compliance/formatters/xml_formatter.py +173 -0
- xplia/compliance/gdpr.py +803 -0
- xplia/compliance/hipaa.py +134 -0
- xplia/compliance/report_base.py +205 -0
- xplia/compliance/report_generator.py +820 -0
- xplia/compliance/translations.py +299 -0
- xplia/core/__init__.py +98 -0
- xplia/core/base.py +391 -0
- xplia/core/config.py +297 -0
- xplia/core/factory.py +416 -0
- xplia/core/model_adapters/__init__.py +47 -0
- xplia/core/model_adapters/base.py +160 -0
- xplia/core/model_adapters/pytorch_adapter.py +339 -0
- xplia/core/model_adapters/sklearn_adapter.py +215 -0
- xplia/core/model_adapters/tensorflow_adapter.py +280 -0
- xplia/core/model_adapters/xgboost_adapter.py +295 -0
- xplia/core/optimizations.py +322 -0
- xplia/core/performance/__init__.py +57 -0
- xplia/core/performance/cache_manager.py +502 -0
- xplia/core/performance/memory_optimizer.py +465 -0
- xplia/core/performance/parallel_executor.py +327 -0
- xplia/core/registry.py +1234 -0
- xplia/explainers/__init__.py +70 -0
- xplia/explainers/__init__updated.py +62 -0
- xplia/explainers/adaptive/__init__.py +24 -0
- xplia/explainers/adaptive/explainer_selector.py +405 -0
- xplia/explainers/adaptive/explanation_quality.py +395 -0
- xplia/explainers/adaptive/fusion_strategies.py +297 -0
- xplia/explainers/adaptive/meta_explainer.py +320 -0
- xplia/explainers/adversarial/__init__.py +21 -0
- xplia/explainers/adversarial/adversarial_xai.py +678 -0
- xplia/explainers/anchor_explainer.py +1769 -0
- xplia/explainers/attention_explainer.py +996 -0
- xplia/explainers/bayesian/__init__.py +8 -0
- xplia/explainers/bayesian/bayesian_explainer.py +127 -0
- xplia/explainers/bias/__init__.py +17 -0
- xplia/explainers/bias/advanced_bias_detection.py +934 -0
- xplia/explainers/calibration/__init__.py +26 -0
- xplia/explainers/calibration/audience_adapter.py +376 -0
- xplia/explainers/calibration/audience_profiles.py +372 -0
- xplia/explainers/calibration/calibration_metrics.py +299 -0
- xplia/explainers/calibration/explanation_calibrator.py +460 -0
- xplia/explainers/causal/__init__.py +19 -0
- xplia/explainers/causal/causal_inference.py +669 -0
- xplia/explainers/certified/__init__.py +21 -0
- xplia/explainers/certified/certified_explanations.py +619 -0
- xplia/explainers/continual/__init__.py +8 -0
- xplia/explainers/continual/continual_explainer.py +102 -0
- xplia/explainers/counterfactual_explainer.py +804 -0
- xplia/explainers/counterfactuals/__init__.py +17 -0
- xplia/explainers/counterfactuals/advanced_counterfactuals.py +259 -0
- xplia/explainers/expert_evaluator.py +538 -0
- xplia/explainers/feature_importance_explainer.py +376 -0
- xplia/explainers/federated/__init__.py +17 -0
- xplia/explainers/federated/federated_xai.py +664 -0
- xplia/explainers/generative/__init__.py +15 -0
- xplia/explainers/generative/generative_explainer.py +243 -0
- xplia/explainers/gradient_explainer.py +3590 -0
- xplia/explainers/graph/__init__.py +26 -0
- xplia/explainers/graph/gnn_explainer.py +638 -0
- xplia/explainers/graph/molecular_explainer.py +438 -0
- xplia/explainers/lime_explainer.py +1580 -0
- xplia/explainers/llm/__init__.py +23 -0
- xplia/explainers/llm/llm_explainability.py +737 -0
- xplia/explainers/metalearning/__init__.py +15 -0
- xplia/explainers/metalearning/metalearning_explainer.py +276 -0
- xplia/explainers/moe/__init__.py +8 -0
- xplia/explainers/moe/moe_explainer.py +108 -0
- xplia/explainers/multimodal/__init__.py +30 -0
- xplia/explainers/multimodal/base.py +262 -0
- xplia/explainers/multimodal/diffusion_explainer.py +608 -0
- xplia/explainers/multimodal/foundation_model_explainer.py +323 -0
- xplia/explainers/multimodal/registry.py +139 -0
- xplia/explainers/multimodal/text_image_explainer.py +381 -0
- xplia/explainers/multimodal/vision_language_explainer.py +608 -0
- xplia/explainers/nas/__init__.py +5 -0
- xplia/explainers/nas/nas_explainer.py +65 -0
- xplia/explainers/neuralodes/__init__.py +5 -0
- xplia/explainers/neuralodes/neuralode_explainer.py +64 -0
- xplia/explainers/neurosymbolic/__init__.py +8 -0
- xplia/explainers/neurosymbolic/neurosymbolic_explainer.py +97 -0
- xplia/explainers/partial_dependence_explainer.py +509 -0
- xplia/explainers/privacy/__init__.py +21 -0
- xplia/explainers/privacy/differential_privacy_xai.py +624 -0
- xplia/explainers/quantum/__init__.py +5 -0
- xplia/explainers/quantum/quantum_explainer.py +79 -0
- xplia/explainers/recommender/__init__.py +8 -0
- xplia/explainers/recommender/recsys_explainer.py +124 -0
- xplia/explainers/reinforcement/__init__.py +15 -0
- xplia/explainers/reinforcement/rl_explainer.py +173 -0
- xplia/explainers/shap_explainer.py +2238 -0
- xplia/explainers/streaming/__init__.py +19 -0
- xplia/explainers/streaming/streaming_xai.py +703 -0
- xplia/explainers/timeseries/__init__.py +15 -0
- xplia/explainers/timeseries/timeseries_explainer.py +252 -0
- xplia/explainers/trust/__init__.py +24 -0
- xplia/explainers/trust/confidence_report.py +368 -0
- xplia/explainers/trust/fairwashing.py +489 -0
- xplia/explainers/trust/uncertainty.py +453 -0
- xplia/explainers/unified_explainer.py +566 -0
- xplia/explainers/unified_explainer_utils.py +309 -0
- xplia/integrations/__init__.py +3 -0
- xplia/integrations/mlflow_integration.py +331 -0
- xplia/integrations/wandb_integration.py +375 -0
- xplia/plugins/__init__.py +36 -0
- xplia/plugins/example_visualizer.py +11 -0
- xplia/utils/__init__.py +18 -0
- xplia/utils/performance.py +119 -0
- xplia/utils/validation.py +109 -0
- xplia/visualizations/__init__.py +31 -0
- xplia/visualizations/base.py +256 -0
- xplia/visualizations/boxplot_chart.py +224 -0
- xplia/visualizations/charts_impl.py +65 -0
- xplia/visualizations/gauge_chart.py +211 -0
- xplia/visualizations/gradient_viz.py +117 -0
- xplia/visualizations/heatmap_chart.py +173 -0
- xplia/visualizations/histogram_chart.py +176 -0
- xplia/visualizations/line_chart.py +100 -0
- xplia/visualizations/pie_chart.py +134 -0
- xplia/visualizations/radar_chart.py +154 -0
- xplia/visualizations/registry.py +76 -0
- xplia/visualizations/sankey_chart.py +190 -0
- xplia/visualizations/scatter_chart.py +252 -0
- xplia/visualizations/table_chart.py +263 -0
- xplia/visualizations/treemap_chart.py +216 -0
- xplia/visualizations.py +535 -0
- xplia/visualizers/__init__.py +87 -0
- xplia/visualizers/base_visualizer.py +294 -0
- xplia-1.0.1.dist-info/METADATA +685 -0
- xplia-1.0.1.dist-info/RECORD +870 -0
- xplia-1.0.1.dist-info/WHEEL +5 -0
- xplia-1.0.1.dist-info/entry_points.txt +2 -0
- xplia-1.0.1.dist-info/licenses/LICENSE +21 -0
- xplia-1.0.1.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,756 @@
|
|
|
1
|
+
from __future__ import absolute_import
|
|
2
|
+
|
|
3
|
+
import linecache
|
|
4
|
+
import os
|
|
5
|
+
import platform
|
|
6
|
+
import sys
|
|
7
|
+
from dataclasses import dataclass, field
|
|
8
|
+
from traceback import walk_tb
|
|
9
|
+
from types import ModuleType, TracebackType
|
|
10
|
+
from typing import (
|
|
11
|
+
Any,
|
|
12
|
+
Callable,
|
|
13
|
+
Dict,
|
|
14
|
+
Iterable,
|
|
15
|
+
List,
|
|
16
|
+
Optional,
|
|
17
|
+
Sequence,
|
|
18
|
+
Tuple,
|
|
19
|
+
Type,
|
|
20
|
+
Union,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
from pip._vendor.pygments.lexers import guess_lexer_for_filename
|
|
24
|
+
from pip._vendor.pygments.token import Comment, Keyword, Name, Number, Operator, String
|
|
25
|
+
from pip._vendor.pygments.token import Text as TextToken
|
|
26
|
+
from pip._vendor.pygments.token import Token
|
|
27
|
+
from pip._vendor.pygments.util import ClassNotFound
|
|
28
|
+
|
|
29
|
+
from . import pretty
|
|
30
|
+
from ._loop import loop_last
|
|
31
|
+
from .columns import Columns
|
|
32
|
+
from .console import Console, ConsoleOptions, ConsoleRenderable, RenderResult, group
|
|
33
|
+
from .constrain import Constrain
|
|
34
|
+
from .highlighter import RegexHighlighter, ReprHighlighter
|
|
35
|
+
from .panel import Panel
|
|
36
|
+
from .scope import render_scope
|
|
37
|
+
from .style import Style
|
|
38
|
+
from .syntax import Syntax
|
|
39
|
+
from .text import Text
|
|
40
|
+
from .theme import Theme
|
|
41
|
+
|
|
42
|
+
WINDOWS = platform.system() == "Windows"
|
|
43
|
+
|
|
44
|
+
LOCALS_MAX_LENGTH = 10
|
|
45
|
+
LOCALS_MAX_STRING = 80
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def install(
|
|
49
|
+
*,
|
|
50
|
+
console: Optional[Console] = None,
|
|
51
|
+
width: Optional[int] = 100,
|
|
52
|
+
extra_lines: int = 3,
|
|
53
|
+
theme: Optional[str] = None,
|
|
54
|
+
word_wrap: bool = False,
|
|
55
|
+
show_locals: bool = False,
|
|
56
|
+
locals_max_length: int = LOCALS_MAX_LENGTH,
|
|
57
|
+
locals_max_string: int = LOCALS_MAX_STRING,
|
|
58
|
+
locals_hide_dunder: bool = True,
|
|
59
|
+
locals_hide_sunder: Optional[bool] = None,
|
|
60
|
+
indent_guides: bool = True,
|
|
61
|
+
suppress: Iterable[Union[str, ModuleType]] = (),
|
|
62
|
+
max_frames: int = 100,
|
|
63
|
+
) -> Callable[[Type[BaseException], BaseException, Optional[TracebackType]], Any]:
|
|
64
|
+
"""Install a rich traceback handler.
|
|
65
|
+
|
|
66
|
+
Once installed, any tracebacks will be printed with syntax highlighting and rich formatting.
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
console (Optional[Console], optional): Console to write exception to. Default uses internal Console instance.
|
|
71
|
+
width (Optional[int], optional): Width (in characters) of traceback. Defaults to 100.
|
|
72
|
+
extra_lines (int, optional): Extra lines of code. Defaults to 3.
|
|
73
|
+
theme (Optional[str], optional): Pygments theme to use in traceback. Defaults to ``None`` which will pick
|
|
74
|
+
a theme appropriate for the platform.
|
|
75
|
+
word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
|
|
76
|
+
show_locals (bool, optional): Enable display of local variables. Defaults to False.
|
|
77
|
+
locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
|
|
78
|
+
Defaults to 10.
|
|
79
|
+
locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
|
|
80
|
+
locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
|
|
81
|
+
locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
|
|
82
|
+
indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
|
|
83
|
+
suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
|
|
84
|
+
|
|
85
|
+
Returns:
|
|
86
|
+
Callable: The previous exception handler that was replaced.
|
|
87
|
+
|
|
88
|
+
"""
|
|
89
|
+
traceback_console = Console(stderr=True) if console is None else console
|
|
90
|
+
|
|
91
|
+
locals_hide_sunder = (
|
|
92
|
+
True
|
|
93
|
+
if (traceback_console.is_jupyter and locals_hide_sunder is None)
|
|
94
|
+
else locals_hide_sunder
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
def excepthook(
|
|
98
|
+
type_: Type[BaseException],
|
|
99
|
+
value: BaseException,
|
|
100
|
+
traceback: Optional[TracebackType],
|
|
101
|
+
) -> None:
|
|
102
|
+
traceback_console.print(
|
|
103
|
+
Traceback.from_exception(
|
|
104
|
+
type_,
|
|
105
|
+
value,
|
|
106
|
+
traceback,
|
|
107
|
+
width=width,
|
|
108
|
+
extra_lines=extra_lines,
|
|
109
|
+
theme=theme,
|
|
110
|
+
word_wrap=word_wrap,
|
|
111
|
+
show_locals=show_locals,
|
|
112
|
+
locals_max_length=locals_max_length,
|
|
113
|
+
locals_max_string=locals_max_string,
|
|
114
|
+
locals_hide_dunder=locals_hide_dunder,
|
|
115
|
+
locals_hide_sunder=bool(locals_hide_sunder),
|
|
116
|
+
indent_guides=indent_guides,
|
|
117
|
+
suppress=suppress,
|
|
118
|
+
max_frames=max_frames,
|
|
119
|
+
)
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
def ipy_excepthook_closure(ip: Any) -> None: # pragma: no cover
|
|
123
|
+
tb_data = {} # store information about showtraceback call
|
|
124
|
+
default_showtraceback = ip.showtraceback # keep reference of default traceback
|
|
125
|
+
|
|
126
|
+
def ipy_show_traceback(*args: Any, **kwargs: Any) -> None:
|
|
127
|
+
"""wrap the default ip.showtraceback to store info for ip._showtraceback"""
|
|
128
|
+
nonlocal tb_data
|
|
129
|
+
tb_data = kwargs
|
|
130
|
+
default_showtraceback(*args, **kwargs)
|
|
131
|
+
|
|
132
|
+
def ipy_display_traceback(
|
|
133
|
+
*args: Any, is_syntax: bool = False, **kwargs: Any
|
|
134
|
+
) -> None:
|
|
135
|
+
"""Internally called traceback from ip._showtraceback"""
|
|
136
|
+
nonlocal tb_data
|
|
137
|
+
exc_tuple = ip._get_exc_info()
|
|
138
|
+
|
|
139
|
+
# do not display trace on syntax error
|
|
140
|
+
tb: Optional[TracebackType] = None if is_syntax else exc_tuple[2]
|
|
141
|
+
|
|
142
|
+
# determine correct tb_offset
|
|
143
|
+
compiled = tb_data.get("running_compiled_code", False)
|
|
144
|
+
tb_offset = tb_data.get("tb_offset", 1 if compiled else 0)
|
|
145
|
+
# remove ipython internal frames from trace with tb_offset
|
|
146
|
+
for _ in range(tb_offset):
|
|
147
|
+
if tb is None:
|
|
148
|
+
break
|
|
149
|
+
tb = tb.tb_next
|
|
150
|
+
|
|
151
|
+
excepthook(exc_tuple[0], exc_tuple[1], tb)
|
|
152
|
+
tb_data = {} # clear data upon usage
|
|
153
|
+
|
|
154
|
+
# replace _showtraceback instead of showtraceback to allow ipython features such as debugging to work
|
|
155
|
+
# this is also what the ipython docs recommends to modify when subclassing InteractiveShell
|
|
156
|
+
ip._showtraceback = ipy_display_traceback
|
|
157
|
+
# add wrapper to capture tb_data
|
|
158
|
+
ip.showtraceback = ipy_show_traceback
|
|
159
|
+
ip.showsyntaxerror = lambda *args, **kwargs: ipy_display_traceback(
|
|
160
|
+
*args, is_syntax=True, **kwargs
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
try: # pragma: no cover
|
|
164
|
+
# if within ipython, use customized traceback
|
|
165
|
+
ip = get_ipython() # type: ignore[name-defined]
|
|
166
|
+
ipy_excepthook_closure(ip)
|
|
167
|
+
return sys.excepthook
|
|
168
|
+
except Exception:
|
|
169
|
+
# otherwise use default system hook
|
|
170
|
+
old_excepthook = sys.excepthook
|
|
171
|
+
sys.excepthook = excepthook
|
|
172
|
+
return old_excepthook
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
@dataclass
|
|
176
|
+
class Frame:
|
|
177
|
+
filename: str
|
|
178
|
+
lineno: int
|
|
179
|
+
name: str
|
|
180
|
+
line: str = ""
|
|
181
|
+
locals: Optional[Dict[str, pretty.Node]] = None
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
@dataclass
|
|
185
|
+
class _SyntaxError:
|
|
186
|
+
offset: int
|
|
187
|
+
filename: str
|
|
188
|
+
line: str
|
|
189
|
+
lineno: int
|
|
190
|
+
msg: str
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
@dataclass
|
|
194
|
+
class Stack:
|
|
195
|
+
exc_type: str
|
|
196
|
+
exc_value: str
|
|
197
|
+
syntax_error: Optional[_SyntaxError] = None
|
|
198
|
+
is_cause: bool = False
|
|
199
|
+
frames: List[Frame] = field(default_factory=list)
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
@dataclass
|
|
203
|
+
class Trace:
|
|
204
|
+
stacks: List[Stack]
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
class PathHighlighter(RegexHighlighter):
|
|
208
|
+
highlights = [r"(?P<dim>.*/)(?P<bold>.+)"]
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
class Traceback:
|
|
212
|
+
"""A Console renderable that renders a traceback.
|
|
213
|
+
|
|
214
|
+
Args:
|
|
215
|
+
trace (Trace, optional): A `Trace` object produced from `extract`. Defaults to None, which uses
|
|
216
|
+
the last exception.
|
|
217
|
+
width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.
|
|
218
|
+
extra_lines (int, optional): Additional lines of code to render. Defaults to 3.
|
|
219
|
+
theme (str, optional): Override pygments theme used in traceback.
|
|
220
|
+
word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
|
|
221
|
+
show_locals (bool, optional): Enable display of local variables. Defaults to False.
|
|
222
|
+
indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
|
|
223
|
+
locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
|
|
224
|
+
Defaults to 10.
|
|
225
|
+
locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
|
|
226
|
+
locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
|
|
227
|
+
locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
|
|
228
|
+
suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
|
|
229
|
+
max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.
|
|
230
|
+
|
|
231
|
+
"""
|
|
232
|
+
|
|
233
|
+
LEXERS = {
|
|
234
|
+
"": "text",
|
|
235
|
+
".py": "python",
|
|
236
|
+
".pxd": "cython",
|
|
237
|
+
".pyx": "cython",
|
|
238
|
+
".pxi": "pyrex",
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
def __init__(
|
|
242
|
+
self,
|
|
243
|
+
trace: Optional[Trace] = None,
|
|
244
|
+
*,
|
|
245
|
+
width: Optional[int] = 100,
|
|
246
|
+
extra_lines: int = 3,
|
|
247
|
+
theme: Optional[str] = None,
|
|
248
|
+
word_wrap: bool = False,
|
|
249
|
+
show_locals: bool = False,
|
|
250
|
+
locals_max_length: int = LOCALS_MAX_LENGTH,
|
|
251
|
+
locals_max_string: int = LOCALS_MAX_STRING,
|
|
252
|
+
locals_hide_dunder: bool = True,
|
|
253
|
+
locals_hide_sunder: bool = False,
|
|
254
|
+
indent_guides: bool = True,
|
|
255
|
+
suppress: Iterable[Union[str, ModuleType]] = (),
|
|
256
|
+
max_frames: int = 100,
|
|
257
|
+
):
|
|
258
|
+
if trace is None:
|
|
259
|
+
exc_type, exc_value, traceback = sys.exc_info()
|
|
260
|
+
if exc_type is None or exc_value is None or traceback is None:
|
|
261
|
+
raise ValueError(
|
|
262
|
+
"Value for 'trace' required if not called in except: block"
|
|
263
|
+
)
|
|
264
|
+
trace = self.extract(
|
|
265
|
+
exc_type, exc_value, traceback, show_locals=show_locals
|
|
266
|
+
)
|
|
267
|
+
self.trace = trace
|
|
268
|
+
self.width = width
|
|
269
|
+
self.extra_lines = extra_lines
|
|
270
|
+
self.theme = Syntax.get_theme(theme or "ansi_dark")
|
|
271
|
+
self.word_wrap = word_wrap
|
|
272
|
+
self.show_locals = show_locals
|
|
273
|
+
self.indent_guides = indent_guides
|
|
274
|
+
self.locals_max_length = locals_max_length
|
|
275
|
+
self.locals_max_string = locals_max_string
|
|
276
|
+
self.locals_hide_dunder = locals_hide_dunder
|
|
277
|
+
self.locals_hide_sunder = locals_hide_sunder
|
|
278
|
+
|
|
279
|
+
self.suppress: Sequence[str] = []
|
|
280
|
+
for suppress_entity in suppress:
|
|
281
|
+
if not isinstance(suppress_entity, str):
|
|
282
|
+
assert (
|
|
283
|
+
suppress_entity.__file__ is not None
|
|
284
|
+
), f"{suppress_entity!r} must be a module with '__file__' attribute"
|
|
285
|
+
path = os.path.dirname(suppress_entity.__file__)
|
|
286
|
+
else:
|
|
287
|
+
path = suppress_entity
|
|
288
|
+
path = os.path.normpath(os.path.abspath(path))
|
|
289
|
+
self.suppress.append(path)
|
|
290
|
+
self.max_frames = max(4, max_frames) if max_frames > 0 else 0
|
|
291
|
+
|
|
292
|
+
@classmethod
|
|
293
|
+
def from_exception(
|
|
294
|
+
cls,
|
|
295
|
+
exc_type: Type[Any],
|
|
296
|
+
exc_value: BaseException,
|
|
297
|
+
traceback: Optional[TracebackType],
|
|
298
|
+
*,
|
|
299
|
+
width: Optional[int] = 100,
|
|
300
|
+
extra_lines: int = 3,
|
|
301
|
+
theme: Optional[str] = None,
|
|
302
|
+
word_wrap: bool = False,
|
|
303
|
+
show_locals: bool = False,
|
|
304
|
+
locals_max_length: int = LOCALS_MAX_LENGTH,
|
|
305
|
+
locals_max_string: int = LOCALS_MAX_STRING,
|
|
306
|
+
locals_hide_dunder: bool = True,
|
|
307
|
+
locals_hide_sunder: bool = False,
|
|
308
|
+
indent_guides: bool = True,
|
|
309
|
+
suppress: Iterable[Union[str, ModuleType]] = (),
|
|
310
|
+
max_frames: int = 100,
|
|
311
|
+
) -> "Traceback":
|
|
312
|
+
"""Create a traceback from exception info
|
|
313
|
+
|
|
314
|
+
Args:
|
|
315
|
+
exc_type (Type[BaseException]): Exception type.
|
|
316
|
+
exc_value (BaseException): Exception value.
|
|
317
|
+
traceback (TracebackType): Python Traceback object.
|
|
318
|
+
width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.
|
|
319
|
+
extra_lines (int, optional): Additional lines of code to render. Defaults to 3.
|
|
320
|
+
theme (str, optional): Override pygments theme used in traceback.
|
|
321
|
+
word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
|
|
322
|
+
show_locals (bool, optional): Enable display of local variables. Defaults to False.
|
|
323
|
+
indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
|
|
324
|
+
locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
|
|
325
|
+
Defaults to 10.
|
|
326
|
+
locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
|
|
327
|
+
locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
|
|
328
|
+
locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
|
|
329
|
+
suppress (Iterable[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
|
|
330
|
+
max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.
|
|
331
|
+
|
|
332
|
+
Returns:
|
|
333
|
+
Traceback: A Traceback instance that may be printed.
|
|
334
|
+
"""
|
|
335
|
+
rich_traceback = cls.extract(
|
|
336
|
+
exc_type,
|
|
337
|
+
exc_value,
|
|
338
|
+
traceback,
|
|
339
|
+
show_locals=show_locals,
|
|
340
|
+
locals_max_length=locals_max_length,
|
|
341
|
+
locals_max_string=locals_max_string,
|
|
342
|
+
locals_hide_dunder=locals_hide_dunder,
|
|
343
|
+
locals_hide_sunder=locals_hide_sunder,
|
|
344
|
+
)
|
|
345
|
+
|
|
346
|
+
return cls(
|
|
347
|
+
rich_traceback,
|
|
348
|
+
width=width,
|
|
349
|
+
extra_lines=extra_lines,
|
|
350
|
+
theme=theme,
|
|
351
|
+
word_wrap=word_wrap,
|
|
352
|
+
show_locals=show_locals,
|
|
353
|
+
indent_guides=indent_guides,
|
|
354
|
+
locals_max_length=locals_max_length,
|
|
355
|
+
locals_max_string=locals_max_string,
|
|
356
|
+
locals_hide_dunder=locals_hide_dunder,
|
|
357
|
+
locals_hide_sunder=locals_hide_sunder,
|
|
358
|
+
suppress=suppress,
|
|
359
|
+
max_frames=max_frames,
|
|
360
|
+
)
|
|
361
|
+
|
|
362
|
+
@classmethod
|
|
363
|
+
def extract(
|
|
364
|
+
cls,
|
|
365
|
+
exc_type: Type[BaseException],
|
|
366
|
+
exc_value: BaseException,
|
|
367
|
+
traceback: Optional[TracebackType],
|
|
368
|
+
*,
|
|
369
|
+
show_locals: bool = False,
|
|
370
|
+
locals_max_length: int = LOCALS_MAX_LENGTH,
|
|
371
|
+
locals_max_string: int = LOCALS_MAX_STRING,
|
|
372
|
+
locals_hide_dunder: bool = True,
|
|
373
|
+
locals_hide_sunder: bool = False,
|
|
374
|
+
) -> Trace:
|
|
375
|
+
"""Extract traceback information.
|
|
376
|
+
|
|
377
|
+
Args:
|
|
378
|
+
exc_type (Type[BaseException]): Exception type.
|
|
379
|
+
exc_value (BaseException): Exception value.
|
|
380
|
+
traceback (TracebackType): Python Traceback object.
|
|
381
|
+
show_locals (bool, optional): Enable display of local variables. Defaults to False.
|
|
382
|
+
locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
|
|
383
|
+
Defaults to 10.
|
|
384
|
+
locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
|
|
385
|
+
locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
|
|
386
|
+
locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
|
|
387
|
+
|
|
388
|
+
Returns:
|
|
389
|
+
Trace: A Trace instance which you can use to construct a `Traceback`.
|
|
390
|
+
"""
|
|
391
|
+
|
|
392
|
+
stacks: List[Stack] = []
|
|
393
|
+
is_cause = False
|
|
394
|
+
|
|
395
|
+
from pip._vendor.rich import _IMPORT_CWD
|
|
396
|
+
|
|
397
|
+
def safe_str(_object: Any) -> str:
|
|
398
|
+
"""Don't allow exceptions from __str__ to propagate."""
|
|
399
|
+
try:
|
|
400
|
+
return str(_object)
|
|
401
|
+
except Exception:
|
|
402
|
+
return "<exception str() failed>"
|
|
403
|
+
|
|
404
|
+
while True:
|
|
405
|
+
stack = Stack(
|
|
406
|
+
exc_type=safe_str(exc_type.__name__),
|
|
407
|
+
exc_value=safe_str(exc_value),
|
|
408
|
+
is_cause=is_cause,
|
|
409
|
+
)
|
|
410
|
+
|
|
411
|
+
if isinstance(exc_value, SyntaxError):
|
|
412
|
+
stack.syntax_error = _SyntaxError(
|
|
413
|
+
offset=exc_value.offset or 0,
|
|
414
|
+
filename=exc_value.filename or "?",
|
|
415
|
+
lineno=exc_value.lineno or 0,
|
|
416
|
+
line=exc_value.text or "",
|
|
417
|
+
msg=exc_value.msg,
|
|
418
|
+
)
|
|
419
|
+
|
|
420
|
+
stacks.append(stack)
|
|
421
|
+
append = stack.frames.append
|
|
422
|
+
|
|
423
|
+
def get_locals(
|
|
424
|
+
iter_locals: Iterable[Tuple[str, object]]
|
|
425
|
+
) -> Iterable[Tuple[str, object]]:
|
|
426
|
+
"""Extract locals from an iterator of key pairs."""
|
|
427
|
+
if not (locals_hide_dunder or locals_hide_sunder):
|
|
428
|
+
yield from iter_locals
|
|
429
|
+
return
|
|
430
|
+
for key, value in iter_locals:
|
|
431
|
+
if locals_hide_dunder and key.startswith("__"):
|
|
432
|
+
continue
|
|
433
|
+
if locals_hide_sunder and key.startswith("_"):
|
|
434
|
+
continue
|
|
435
|
+
yield key, value
|
|
436
|
+
|
|
437
|
+
for frame_summary, line_no in walk_tb(traceback):
|
|
438
|
+
filename = frame_summary.f_code.co_filename
|
|
439
|
+
if filename and not filename.startswith("<"):
|
|
440
|
+
if not os.path.isabs(filename):
|
|
441
|
+
filename = os.path.join(_IMPORT_CWD, filename)
|
|
442
|
+
if frame_summary.f_locals.get("_rich_traceback_omit", False):
|
|
443
|
+
continue
|
|
444
|
+
|
|
445
|
+
frame = Frame(
|
|
446
|
+
filename=filename or "?",
|
|
447
|
+
lineno=line_no,
|
|
448
|
+
name=frame_summary.f_code.co_name,
|
|
449
|
+
locals={
|
|
450
|
+
key: pretty.traverse(
|
|
451
|
+
value,
|
|
452
|
+
max_length=locals_max_length,
|
|
453
|
+
max_string=locals_max_string,
|
|
454
|
+
)
|
|
455
|
+
for key, value in get_locals(frame_summary.f_locals.items())
|
|
456
|
+
}
|
|
457
|
+
if show_locals
|
|
458
|
+
else None,
|
|
459
|
+
)
|
|
460
|
+
append(frame)
|
|
461
|
+
if frame_summary.f_locals.get("_rich_traceback_guard", False):
|
|
462
|
+
del stack.frames[:]
|
|
463
|
+
|
|
464
|
+
cause = getattr(exc_value, "__cause__", None)
|
|
465
|
+
if cause:
|
|
466
|
+
exc_type = cause.__class__
|
|
467
|
+
exc_value = cause
|
|
468
|
+
# __traceback__ can be None, e.g. for exceptions raised by the
|
|
469
|
+
# 'multiprocessing' module
|
|
470
|
+
traceback = cause.__traceback__
|
|
471
|
+
is_cause = True
|
|
472
|
+
continue
|
|
473
|
+
|
|
474
|
+
cause = exc_value.__context__
|
|
475
|
+
if cause and not getattr(exc_value, "__suppress_context__", False):
|
|
476
|
+
exc_type = cause.__class__
|
|
477
|
+
exc_value = cause
|
|
478
|
+
traceback = cause.__traceback__
|
|
479
|
+
is_cause = False
|
|
480
|
+
continue
|
|
481
|
+
# No cover, code is reached but coverage doesn't recognize it.
|
|
482
|
+
break # pragma: no cover
|
|
483
|
+
|
|
484
|
+
trace = Trace(stacks=stacks)
|
|
485
|
+
return trace
|
|
486
|
+
|
|
487
|
+
def __rich_console__(
|
|
488
|
+
self, console: Console, options: ConsoleOptions
|
|
489
|
+
) -> RenderResult:
|
|
490
|
+
theme = self.theme
|
|
491
|
+
background_style = theme.get_background_style()
|
|
492
|
+
token_style = theme.get_style_for_token
|
|
493
|
+
|
|
494
|
+
traceback_theme = Theme(
|
|
495
|
+
{
|
|
496
|
+
"pretty": token_style(TextToken),
|
|
497
|
+
"pygments.text": token_style(Token),
|
|
498
|
+
"pygments.string": token_style(String),
|
|
499
|
+
"pygments.function": token_style(Name.Function),
|
|
500
|
+
"pygments.number": token_style(Number),
|
|
501
|
+
"repr.indent": token_style(Comment) + Style(dim=True),
|
|
502
|
+
"repr.str": token_style(String),
|
|
503
|
+
"repr.brace": token_style(TextToken) + Style(bold=True),
|
|
504
|
+
"repr.number": token_style(Number),
|
|
505
|
+
"repr.bool_true": token_style(Keyword.Constant),
|
|
506
|
+
"repr.bool_false": token_style(Keyword.Constant),
|
|
507
|
+
"repr.none": token_style(Keyword.Constant),
|
|
508
|
+
"scope.border": token_style(String.Delimiter),
|
|
509
|
+
"scope.equals": token_style(Operator),
|
|
510
|
+
"scope.key": token_style(Name),
|
|
511
|
+
"scope.key.special": token_style(Name.Constant) + Style(dim=True),
|
|
512
|
+
},
|
|
513
|
+
inherit=False,
|
|
514
|
+
)
|
|
515
|
+
|
|
516
|
+
highlighter = ReprHighlighter()
|
|
517
|
+
for last, stack in loop_last(reversed(self.trace.stacks)):
|
|
518
|
+
if stack.frames:
|
|
519
|
+
stack_renderable: ConsoleRenderable = Panel(
|
|
520
|
+
self._render_stack(stack),
|
|
521
|
+
title="[traceback.title]Traceback [dim](most recent call last)",
|
|
522
|
+
style=background_style,
|
|
523
|
+
border_style="traceback.border",
|
|
524
|
+
expand=True,
|
|
525
|
+
padding=(0, 1),
|
|
526
|
+
)
|
|
527
|
+
stack_renderable = Constrain(stack_renderable, self.width)
|
|
528
|
+
with console.use_theme(traceback_theme):
|
|
529
|
+
yield stack_renderable
|
|
530
|
+
if stack.syntax_error is not None:
|
|
531
|
+
with console.use_theme(traceback_theme):
|
|
532
|
+
yield Constrain(
|
|
533
|
+
Panel(
|
|
534
|
+
self._render_syntax_error(stack.syntax_error),
|
|
535
|
+
style=background_style,
|
|
536
|
+
border_style="traceback.border.syntax_error",
|
|
537
|
+
expand=True,
|
|
538
|
+
padding=(0, 1),
|
|
539
|
+
width=self.width,
|
|
540
|
+
),
|
|
541
|
+
self.width,
|
|
542
|
+
)
|
|
543
|
+
yield Text.assemble(
|
|
544
|
+
(f"{stack.exc_type}: ", "traceback.exc_type"),
|
|
545
|
+
highlighter(stack.syntax_error.msg),
|
|
546
|
+
)
|
|
547
|
+
elif stack.exc_value:
|
|
548
|
+
yield Text.assemble(
|
|
549
|
+
(f"{stack.exc_type}: ", "traceback.exc_type"),
|
|
550
|
+
highlighter(stack.exc_value),
|
|
551
|
+
)
|
|
552
|
+
else:
|
|
553
|
+
yield Text.assemble((f"{stack.exc_type}", "traceback.exc_type"))
|
|
554
|
+
|
|
555
|
+
if not last:
|
|
556
|
+
if stack.is_cause:
|
|
557
|
+
yield Text.from_markup(
|
|
558
|
+
"\n[i]The above exception was the direct cause of the following exception:\n",
|
|
559
|
+
)
|
|
560
|
+
else:
|
|
561
|
+
yield Text.from_markup(
|
|
562
|
+
"\n[i]During handling of the above exception, another exception occurred:\n",
|
|
563
|
+
)
|
|
564
|
+
|
|
565
|
+
@group()
|
|
566
|
+
def _render_syntax_error(self, syntax_error: _SyntaxError) -> RenderResult:
|
|
567
|
+
highlighter = ReprHighlighter()
|
|
568
|
+
path_highlighter = PathHighlighter()
|
|
569
|
+
if syntax_error.filename != "<stdin>":
|
|
570
|
+
if os.path.exists(syntax_error.filename):
|
|
571
|
+
text = Text.assemble(
|
|
572
|
+
(f" {syntax_error.filename}", "pygments.string"),
|
|
573
|
+
(":", "pygments.text"),
|
|
574
|
+
(str(syntax_error.lineno), "pygments.number"),
|
|
575
|
+
style="pygments.text",
|
|
576
|
+
)
|
|
577
|
+
yield path_highlighter(text)
|
|
578
|
+
syntax_error_text = highlighter(syntax_error.line.rstrip())
|
|
579
|
+
syntax_error_text.no_wrap = True
|
|
580
|
+
offset = min(syntax_error.offset - 1, len(syntax_error_text))
|
|
581
|
+
syntax_error_text.stylize("bold underline", offset, offset)
|
|
582
|
+
syntax_error_text += Text.from_markup(
|
|
583
|
+
"\n" + " " * offset + "[traceback.offset]▲[/]",
|
|
584
|
+
style="pygments.text",
|
|
585
|
+
)
|
|
586
|
+
yield syntax_error_text
|
|
587
|
+
|
|
588
|
+
@classmethod
|
|
589
|
+
def _guess_lexer(cls, filename: str, code: str) -> str:
|
|
590
|
+
ext = os.path.splitext(filename)[-1]
|
|
591
|
+
if not ext:
|
|
592
|
+
# No extension, look at first line to see if it is a hashbang
|
|
593
|
+
# Note, this is an educated guess and not a guarantee
|
|
594
|
+
# If it fails, the only downside is that the code is highlighted strangely
|
|
595
|
+
new_line_index = code.index("\n")
|
|
596
|
+
first_line = code[:new_line_index] if new_line_index != -1 else code
|
|
597
|
+
if first_line.startswith("#!") and "python" in first_line.lower():
|
|
598
|
+
return "python"
|
|
599
|
+
try:
|
|
600
|
+
return cls.LEXERS.get(ext) or guess_lexer_for_filename(filename, code).name
|
|
601
|
+
except ClassNotFound:
|
|
602
|
+
return "text"
|
|
603
|
+
|
|
604
|
+
@group()
|
|
605
|
+
def _render_stack(self, stack: Stack) -> RenderResult:
|
|
606
|
+
path_highlighter = PathHighlighter()
|
|
607
|
+
theme = self.theme
|
|
608
|
+
|
|
609
|
+
def read_code(filename: str) -> str:
|
|
610
|
+
"""Read files, and cache results on filename.
|
|
611
|
+
|
|
612
|
+
Args:
|
|
613
|
+
filename (str): Filename to read
|
|
614
|
+
|
|
615
|
+
Returns:
|
|
616
|
+
str: Contents of file
|
|
617
|
+
"""
|
|
618
|
+
return "".join(linecache.getlines(filename))
|
|
619
|
+
|
|
620
|
+
def render_locals(frame: Frame) -> Iterable[ConsoleRenderable]:
|
|
621
|
+
if frame.locals:
|
|
622
|
+
yield render_scope(
|
|
623
|
+
frame.locals,
|
|
624
|
+
title="locals",
|
|
625
|
+
indent_guides=self.indent_guides,
|
|
626
|
+
max_length=self.locals_max_length,
|
|
627
|
+
max_string=self.locals_max_string,
|
|
628
|
+
)
|
|
629
|
+
|
|
630
|
+
exclude_frames: Optional[range] = None
|
|
631
|
+
if self.max_frames != 0:
|
|
632
|
+
exclude_frames = range(
|
|
633
|
+
self.max_frames // 2,
|
|
634
|
+
len(stack.frames) - self.max_frames // 2,
|
|
635
|
+
)
|
|
636
|
+
|
|
637
|
+
excluded = False
|
|
638
|
+
for frame_index, frame in enumerate(stack.frames):
|
|
639
|
+
|
|
640
|
+
if exclude_frames and frame_index in exclude_frames:
|
|
641
|
+
excluded = True
|
|
642
|
+
continue
|
|
643
|
+
|
|
644
|
+
if excluded:
|
|
645
|
+
assert exclude_frames is not None
|
|
646
|
+
yield Text(
|
|
647
|
+
f"\n... {len(exclude_frames)} frames hidden ...",
|
|
648
|
+
justify="center",
|
|
649
|
+
style="traceback.error",
|
|
650
|
+
)
|
|
651
|
+
excluded = False
|
|
652
|
+
|
|
653
|
+
first = frame_index == 0
|
|
654
|
+
frame_filename = frame.filename
|
|
655
|
+
suppressed = any(frame_filename.startswith(path) for path in self.suppress)
|
|
656
|
+
|
|
657
|
+
if os.path.exists(frame.filename):
|
|
658
|
+
text = Text.assemble(
|
|
659
|
+
path_highlighter(Text(frame.filename, style="pygments.string")),
|
|
660
|
+
(":", "pygments.text"),
|
|
661
|
+
(str(frame.lineno), "pygments.number"),
|
|
662
|
+
" in ",
|
|
663
|
+
(frame.name, "pygments.function"),
|
|
664
|
+
style="pygments.text",
|
|
665
|
+
)
|
|
666
|
+
else:
|
|
667
|
+
text = Text.assemble(
|
|
668
|
+
"in ",
|
|
669
|
+
(frame.name, "pygments.function"),
|
|
670
|
+
(":", "pygments.text"),
|
|
671
|
+
(str(frame.lineno), "pygments.number"),
|
|
672
|
+
style="pygments.text",
|
|
673
|
+
)
|
|
674
|
+
if not frame.filename.startswith("<") and not first:
|
|
675
|
+
yield ""
|
|
676
|
+
yield text
|
|
677
|
+
if frame.filename.startswith("<"):
|
|
678
|
+
yield from render_locals(frame)
|
|
679
|
+
continue
|
|
680
|
+
if not suppressed:
|
|
681
|
+
try:
|
|
682
|
+
code = read_code(frame.filename)
|
|
683
|
+
if not code:
|
|
684
|
+
# code may be an empty string if the file doesn't exist, OR
|
|
685
|
+
# if the traceback filename is generated dynamically
|
|
686
|
+
continue
|
|
687
|
+
lexer_name = self._guess_lexer(frame.filename, code)
|
|
688
|
+
syntax = Syntax(
|
|
689
|
+
code,
|
|
690
|
+
lexer_name,
|
|
691
|
+
theme=theme,
|
|
692
|
+
line_numbers=True,
|
|
693
|
+
line_range=(
|
|
694
|
+
frame.lineno - self.extra_lines,
|
|
695
|
+
frame.lineno + self.extra_lines,
|
|
696
|
+
),
|
|
697
|
+
highlight_lines={frame.lineno},
|
|
698
|
+
word_wrap=self.word_wrap,
|
|
699
|
+
code_width=88,
|
|
700
|
+
indent_guides=self.indent_guides,
|
|
701
|
+
dedent=False,
|
|
702
|
+
)
|
|
703
|
+
yield ""
|
|
704
|
+
except Exception as error:
|
|
705
|
+
yield Text.assemble(
|
|
706
|
+
(f"\n{error}", "traceback.error"),
|
|
707
|
+
)
|
|
708
|
+
else:
|
|
709
|
+
yield (
|
|
710
|
+
Columns(
|
|
711
|
+
[
|
|
712
|
+
syntax,
|
|
713
|
+
*render_locals(frame),
|
|
714
|
+
],
|
|
715
|
+
padding=1,
|
|
716
|
+
)
|
|
717
|
+
if frame.locals
|
|
718
|
+
else syntax
|
|
719
|
+
)
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
if __name__ == "__main__": # pragma: no cover
|
|
723
|
+
|
|
724
|
+
from .console import Console
|
|
725
|
+
|
|
726
|
+
console = Console()
|
|
727
|
+
import sys
|
|
728
|
+
|
|
729
|
+
def bar(a: Any) -> None: # 这是对亚洲语言支持的测试。面对模棱两可的想法,拒绝猜测的诱惑
|
|
730
|
+
one = 1
|
|
731
|
+
print(one / a)
|
|
732
|
+
|
|
733
|
+
def foo(a: Any) -> None:
|
|
734
|
+
_rich_traceback_guard = True
|
|
735
|
+
zed = {
|
|
736
|
+
"characters": {
|
|
737
|
+
"Paul Atreides",
|
|
738
|
+
"Vladimir Harkonnen",
|
|
739
|
+
"Thufir Hawat",
|
|
740
|
+
"Duncan Idaho",
|
|
741
|
+
},
|
|
742
|
+
"atomic_types": (None, False, True),
|
|
743
|
+
}
|
|
744
|
+
bar(a)
|
|
745
|
+
|
|
746
|
+
def error() -> None:
|
|
747
|
+
|
|
748
|
+
try:
|
|
749
|
+
try:
|
|
750
|
+
foo(0)
|
|
751
|
+
except:
|
|
752
|
+
slfkjsldkfj # type: ignore[name-defined]
|
|
753
|
+
except:
|
|
754
|
+
console.print_exception(show_locals=True)
|
|
755
|
+
|
|
756
|
+
error()
|