Upload evaluation code and non-image data (part 130)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +2 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/INSTALLER +1 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/METADATA +141 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/RECORD +870 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/REQUESTED +0 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/WHEEL +5 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/direct_url.json +1 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/entry_points.txt +51 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/licenses/LICENSE +17 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/top_level.txt +3 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/platformdirs-4.2.2.dist-info/INSTALLER +1 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/platformdirs-4.2.2.dist-info/METADATA +319 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/platformdirs-4.2.2.dist-info/RECORD +23 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/platformdirs-4.2.2.dist-info/REQUESTED +0 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/platformdirs-4.2.2.dist-info/WHEEL +4 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/platformdirs-4.2.2.dist-info/licenses/LICENSE +21 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/platformdirs/version.py +16 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/platformdirs/windows.py +272 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli-2.0.1.dist-info/INSTALLER +1 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli-2.0.1.dist-info/LICENSE +21 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli-2.0.1.dist-info/METADATA +206 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli-2.0.1.dist-info/RECORD +15 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli-2.0.1.dist-info/REQUESTED +0 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli-2.0.1.dist-info/WHEEL +4 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli/__init__.py +11 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli/_parser.py +691 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli/_re.py +107 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli/_types.py +10 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli/py.typed +1 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard-4.3.0.dist-info/INSTALLER +1 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard-4.3.0.dist-info/LICENSE +19 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard-4.3.0.dist-info/METADATA +81 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard-4.3.0.dist-info/RECORD +34 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard-4.3.0.dist-info/WHEEL +5 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard-4.3.0.dist-info/entry_points.txt +2 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard-4.3.0.dist-info/top_level.txt +1 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/__init__.py +48 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_checkers.py +993 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_config.py +108 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_decorators.py +235 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_exceptions.py +42 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_functions.py +308 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_importhook.py +213 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_memo.py +48 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_pytest_plugin.py +127 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_suppression.py +86 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_transformer.py +1229 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_union_transformer.py +55 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_utils.py +173 -0
- evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/py.typed +0 -0
.gitattributes
CHANGED
|
@@ -694,3 +694,5 @@ evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/test
|
|
| 694 |
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/pip/_vendor/distlib/t64.exe filter=lfs diff=lfs merge=lfs -text
|
| 695 |
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/pip/_vendor/distlib/w64-arm.exe filter=lfs diff=lfs merge=lfs -text
|
| 696 |
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/pip/_vendor/distlib/w64.exe filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 694 |
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/pip/_vendor/distlib/t64.exe filter=lfs diff=lfs merge=lfs -text
|
| 695 |
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/pip/_vendor/distlib/w64-arm.exe filter=lfs diff=lfs merge=lfs -text
|
| 696 |
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/pip/_vendor/distlib/w64.exe filter=lfs diff=lfs merge=lfs -text
|
| 697 |
+
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/urllib/__pycache__/request.cpython-311.pyc filter=lfs diff=lfs merge=lfs -text
|
| 698 |
+
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/tk8.6/demos/images/teapot.ppm filter=lfs diff=lfs merge=lfs -text
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/INSTALLER
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
pip
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/METADATA
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.4
|
| 2 |
+
Name: setuptools
|
| 3 |
+
Version: 80.9.0
|
| 4 |
+
Summary: Easily download, build, install, upgrade, and uninstall Python packages
|
| 5 |
+
Author-email: Python Packaging Authority <distutils-sig@python.org>
|
| 6 |
+
License-Expression: MIT
|
| 7 |
+
Project-URL: Source, https://github.com/pypa/setuptools
|
| 8 |
+
Project-URL: Documentation, https://setuptools.pypa.io/
|
| 9 |
+
Project-URL: Changelog, https://setuptools.pypa.io/en/stable/history.html
|
| 10 |
+
Keywords: CPAN PyPI distutils eggs package management
|
| 11 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 12 |
+
Classifier: Intended Audience :: Developers
|
| 13 |
+
Classifier: Programming Language :: Python :: 3
|
| 14 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
| 15 |
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
| 16 |
+
Classifier: Topic :: System :: Archiving :: Packaging
|
| 17 |
+
Classifier: Topic :: System :: Systems Administration
|
| 18 |
+
Classifier: Topic :: Utilities
|
| 19 |
+
Requires-Python: >=3.9
|
| 20 |
+
Description-Content-Type: text/x-rst
|
| 21 |
+
License-File: LICENSE
|
| 22 |
+
Provides-Extra: test
|
| 23 |
+
Requires-Dist: pytest!=8.1.*,>=6; extra == "test"
|
| 24 |
+
Requires-Dist: virtualenv>=13.0.0; extra == "test"
|
| 25 |
+
Requires-Dist: wheel>=0.44.0; extra == "test"
|
| 26 |
+
Requires-Dist: pip>=19.1; extra == "test"
|
| 27 |
+
Requires-Dist: packaging>=24.2; extra == "test"
|
| 28 |
+
Requires-Dist: jaraco.envs>=2.2; extra == "test"
|
| 29 |
+
Requires-Dist: pytest-xdist>=3; extra == "test"
|
| 30 |
+
Requires-Dist: jaraco.path>=3.7.2; extra == "test"
|
| 31 |
+
Requires-Dist: build[virtualenv]>=1.0.3; extra == "test"
|
| 32 |
+
Requires-Dist: filelock>=3.4.0; extra == "test"
|
| 33 |
+
Requires-Dist: ini2toml[lite]>=0.14; extra == "test"
|
| 34 |
+
Requires-Dist: tomli-w>=1.0.0; extra == "test"
|
| 35 |
+
Requires-Dist: pytest-timeout; extra == "test"
|
| 36 |
+
Requires-Dist: pytest-perf; sys_platform != "cygwin" and extra == "test"
|
| 37 |
+
Requires-Dist: jaraco.develop>=7.21; (python_version >= "3.9" and sys_platform != "cygwin") and extra == "test"
|
| 38 |
+
Requires-Dist: pytest-home>=0.5; extra == "test"
|
| 39 |
+
Requires-Dist: pytest-subprocess; extra == "test"
|
| 40 |
+
Requires-Dist: pyproject-hooks!=1.1; extra == "test"
|
| 41 |
+
Requires-Dist: jaraco.test>=5.5; extra == "test"
|
| 42 |
+
Provides-Extra: doc
|
| 43 |
+
Requires-Dist: sphinx>=3.5; extra == "doc"
|
| 44 |
+
Requires-Dist: jaraco.packaging>=9.3; extra == "doc"
|
| 45 |
+
Requires-Dist: rst.linker>=1.9; extra == "doc"
|
| 46 |
+
Requires-Dist: furo; extra == "doc"
|
| 47 |
+
Requires-Dist: sphinx-lint; extra == "doc"
|
| 48 |
+
Requires-Dist: jaraco.tidelift>=1.4; extra == "doc"
|
| 49 |
+
Requires-Dist: pygments-github-lexers==0.0.5; extra == "doc"
|
| 50 |
+
Requires-Dist: sphinx-favicon; extra == "doc"
|
| 51 |
+
Requires-Dist: sphinx-inline-tabs; extra == "doc"
|
| 52 |
+
Requires-Dist: sphinx-reredirects; extra == "doc"
|
| 53 |
+
Requires-Dist: sphinxcontrib-towncrier; extra == "doc"
|
| 54 |
+
Requires-Dist: sphinx-notfound-page<2,>=1; extra == "doc"
|
| 55 |
+
Requires-Dist: pyproject-hooks!=1.1; extra == "doc"
|
| 56 |
+
Requires-Dist: towncrier<24.7; extra == "doc"
|
| 57 |
+
Provides-Extra: ssl
|
| 58 |
+
Provides-Extra: certs
|
| 59 |
+
Provides-Extra: core
|
| 60 |
+
Requires-Dist: packaging>=24.2; extra == "core"
|
| 61 |
+
Requires-Dist: more_itertools>=8.8; extra == "core"
|
| 62 |
+
Requires-Dist: jaraco.text>=3.7; extra == "core"
|
| 63 |
+
Requires-Dist: importlib_metadata>=6; python_version < "3.10" and extra == "core"
|
| 64 |
+
Requires-Dist: tomli>=2.0.1; python_version < "3.11" and extra == "core"
|
| 65 |
+
Requires-Dist: wheel>=0.43.0; extra == "core"
|
| 66 |
+
Requires-Dist: platformdirs>=4.2.2; extra == "core"
|
| 67 |
+
Requires-Dist: jaraco.functools>=4; extra == "core"
|
| 68 |
+
Requires-Dist: more_itertools; extra == "core"
|
| 69 |
+
Provides-Extra: check
|
| 70 |
+
Requires-Dist: pytest-checkdocs>=2.4; extra == "check"
|
| 71 |
+
Requires-Dist: pytest-ruff>=0.2.1; sys_platform != "cygwin" and extra == "check"
|
| 72 |
+
Requires-Dist: ruff>=0.8.0; sys_platform != "cygwin" and extra == "check"
|
| 73 |
+
Provides-Extra: cover
|
| 74 |
+
Requires-Dist: pytest-cov; extra == "cover"
|
| 75 |
+
Provides-Extra: enabler
|
| 76 |
+
Requires-Dist: pytest-enabler>=2.2; extra == "enabler"
|
| 77 |
+
Provides-Extra: type
|
| 78 |
+
Requires-Dist: pytest-mypy; extra == "type"
|
| 79 |
+
Requires-Dist: mypy==1.14.*; extra == "type"
|
| 80 |
+
Requires-Dist: importlib_metadata>=7.0.2; python_version < "3.10" and extra == "type"
|
| 81 |
+
Requires-Dist: jaraco.develop>=7.21; sys_platform != "cygwin" and extra == "type"
|
| 82 |
+
Dynamic: license-file
|
| 83 |
+
|
| 84 |
+
.. |pypi-version| image:: https://img.shields.io/pypi/v/setuptools.svg
|
| 85 |
+
:target: https://pypi.org/project/setuptools
|
| 86 |
+
|
| 87 |
+
.. |py-version| image:: https://img.shields.io/pypi/pyversions/setuptools.svg
|
| 88 |
+
|
| 89 |
+
.. |test-badge| image:: https://github.com/pypa/setuptools/actions/workflows/main.yml/badge.svg
|
| 90 |
+
:target: https://github.com/pypa/setuptools/actions?query=workflow%3A%22tests%22
|
| 91 |
+
:alt: tests
|
| 92 |
+
|
| 93 |
+
.. |ruff-badge| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
|
| 94 |
+
:target: https://github.com/astral-sh/ruff
|
| 95 |
+
:alt: Ruff
|
| 96 |
+
|
| 97 |
+
.. |docs-badge| image:: https://img.shields.io/readthedocs/setuptools/latest.svg
|
| 98 |
+
:target: https://setuptools.pypa.io
|
| 99 |
+
|
| 100 |
+
.. |skeleton-badge| image:: https://img.shields.io/badge/skeleton-2025-informational
|
| 101 |
+
:target: https://blog.jaraco.com/skeleton
|
| 102 |
+
|
| 103 |
+
.. |codecov-badge| image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg?logo=codecov&logoColor=white
|
| 104 |
+
:target: https://codecov.io/gh/pypa/setuptools
|
| 105 |
+
|
| 106 |
+
.. |tidelift-badge| image:: https://tidelift.com/badges/github/pypa/setuptools?style=flat
|
| 107 |
+
:target: https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=readme
|
| 108 |
+
|
| 109 |
+
.. |discord-badge| image:: https://img.shields.io/discord/803025117553754132
|
| 110 |
+
:target: https://discord.com/channels/803025117553754132/815945031150993468
|
| 111 |
+
:alt: Discord
|
| 112 |
+
|
| 113 |
+
|pypi-version| |py-version| |test-badge| |ruff-badge| |docs-badge| |skeleton-badge| |codecov-badge| |discord-badge|
|
| 114 |
+
|
| 115 |
+
See the `Quickstart <https://setuptools.pypa.io/en/latest/userguide/quickstart.html>`_
|
| 116 |
+
and the `User's Guide <https://setuptools.pypa.io/en/latest/userguide/>`_ for
|
| 117 |
+
instructions on how to use Setuptools.
|
| 118 |
+
|
| 119 |
+
Questions and comments should be directed to `GitHub Discussions
|
| 120 |
+
<https://github.com/pypa/setuptools/discussions>`_.
|
| 121 |
+
Bug reports and especially tested patches may be
|
| 122 |
+
submitted directly to the `bug tracker
|
| 123 |
+
<https://github.com/pypa/setuptools/issues>`_.
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
Code of Conduct
|
| 127 |
+
===============
|
| 128 |
+
|
| 129 |
+
Everyone interacting in the setuptools project's codebases, issue trackers,
|
| 130 |
+
chat rooms, and fora is expected to follow the
|
| 131 |
+
`PSF Code of Conduct <https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md>`_.
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
For Enterprise
|
| 135 |
+
==============
|
| 136 |
+
|
| 137 |
+
Available as part of the Tidelift Subscription.
|
| 138 |
+
|
| 139 |
+
Setuptools and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.
|
| 140 |
+
|
| 141 |
+
`Learn more <https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=referral&utm_campaign=github>`_.
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/RECORD
ADDED
|
@@ -0,0 +1,870 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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 1 |
+
_distutils_hack/__init__.py,sha256=34HmvLo07j45Uvd2VR-2aRQ7lJD91sTK6zJgn5fphbQ,6755
|
| 2 |
+
_distutils_hack/__pycache__/__init__.cpython-311.pyc,,
|
| 3 |
+
_distutils_hack/__pycache__/override.cpython-311.pyc,,
|
| 4 |
+
_distutils_hack/override.py,sha256=Eu_s-NF6VIZ4Cqd0tbbA5wtWky2IZPNd8et6GLt1mzo,44
|
| 5 |
+
distutils-precedence.pth,sha256=JjjOniUA5XKl4N5_rtZmHrVp0baW_LoHsN0iPaX10iQ,151
|
| 6 |
+
pkg_resources/__init__.py,sha256=uxrWmKF3lxsG4q6ojHlu4tB8j8Kw9jqx_SNMyDKP5q4,126219
|
| 7 |
+
pkg_resources/__pycache__/__init__.cpython-311.pyc,,
|
| 8 |
+
pkg_resources/api_tests.txt,sha256=XEdvy4igHHrq2qNHNMHnlfO6XSQKNqOyLHbl6QcpfAI,12595
|
| 9 |
+
pkg_resources/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 10 |
+
pkg_resources/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 11 |
+
pkg_resources/tests/__pycache__/__init__.cpython-311.pyc,,
|
| 12 |
+
pkg_resources/tests/__pycache__/test_find_distributions.cpython-311.pyc,,
|
| 13 |
+
pkg_resources/tests/__pycache__/test_integration_zope_interface.cpython-311.pyc,,
|
| 14 |
+
pkg_resources/tests/__pycache__/test_markers.cpython-311.pyc,,
|
| 15 |
+
pkg_resources/tests/__pycache__/test_pkg_resources.cpython-311.pyc,,
|
| 16 |
+
pkg_resources/tests/__pycache__/test_resources.cpython-311.pyc,,
|
| 17 |
+
pkg_resources/tests/__pycache__/test_working_set.cpython-311.pyc,,
|
| 18 |
+
pkg_resources/tests/data/my-test-package-source/__pycache__/setup.cpython-311.pyc,,
|
| 19 |
+
pkg_resources/tests/data/my-test-package-source/setup.cfg,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 20 |
+
pkg_resources/tests/data/my-test-package-source/setup.py,sha256=1VobhAZbMb7M9mfhb_NE8PwDsvukoWLs9aUAS0pYhe8,105
|
| 21 |
+
pkg_resources/tests/data/my-test-package-zip/my-test-package.zip,sha256=AYRcQ39GVePPnMT8TknP1gdDHyJnXhthESmpAjnzSCI,1809
|
| 22 |
+
pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/PKG-INFO,sha256=JvWv9Io2PAuYwEEw2fBW4Qc5YvdbkscpKX1kmLzsoHk,187
|
| 23 |
+
pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/SOURCES.txt,sha256=4ClkH8eTovZrdVrJFsVuxdbMEF--lBVSuKonDAPE5Jc,208
|
| 24 |
+
pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/dependency_links.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
| 25 |
+
pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
| 26 |
+
pkg_resources/tests/data/my-test-package_unpacked-egg/my_test_package-1.0-py3.7.egg/EGG-INFO/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
| 27 |
+
pkg_resources/tests/data/my-test-package_zipped-egg/my_test_package-1.0-py3.7.egg,sha256=ZTlMGxjRGiKDNkiA2c75jbQH2TWIteP00irF9gvczbo,843
|
| 28 |
+
pkg_resources/tests/test_find_distributions.py,sha256=U91cov5L1COAIWLNq3Xy4plU7_MnOE1WtXMu6iV2waM,1972
|
| 29 |
+
pkg_resources/tests/test_integration_zope_interface.py,sha256=nzVoK557KZQN0V3DIQ1sVeaCOgt4Kpl-CODAWsO7pmc,1652
|
| 30 |
+
pkg_resources/tests/test_markers.py,sha256=0orKg7UMDf7fnuNQvRMOc-EF9EAP_JTQnk4mtGgbW50,241
|
| 31 |
+
pkg_resources/tests/test_pkg_resources.py,sha256=5Mt4bJQhLCL8j8cC46Uv32Np2Xc1TTxLGawIfET55Fk,17111
|
| 32 |
+
pkg_resources/tests/test_resources.py,sha256=K0LqMAUGpRQ9pUb9K0vyI7GesvtlQvTH074m-E2VQlo,31252
|
| 33 |
+
pkg_resources/tests/test_working_set.py,sha256=lRtGJWIixSwSMSbjHgRxeJEQiLMRXcz3xzJL2qL7eXY,8602
|
| 34 |
+
setuptools-80.9.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 35 |
+
setuptools-80.9.0.dist-info/METADATA,sha256=f4kMqNvBa2O1aMiTEu1qf58KedCyt_PIO_eWrD2TBhU,6572
|
| 36 |
+
setuptools-80.9.0.dist-info/RECORD,,
|
| 37 |
+
setuptools-80.9.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 38 |
+
setuptools-80.9.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
| 39 |
+
setuptools-80.9.0.dist-info/direct_url.json,sha256=bAU2myO-FPc7kOV3GJH-vYnZ-V7RtH_uj9OohDYACmY,250
|
| 40 |
+
setuptools-80.9.0.dist-info/entry_points.txt,sha256=zkgthpf_Fa9NVE9p6FKT3Xk9DR1faAcRU4coggsV7jA,2449
|
| 41 |
+
setuptools-80.9.0.dist-info/licenses/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
|
| 42 |
+
setuptools-80.9.0.dist-info/top_level.txt,sha256=d9yL39v_W7qmKDDSH6sT4bE0j_Ls1M3P161OGgdsm4g,41
|
| 43 |
+
setuptools/__init__.py,sha256=7duacBaImxzrUa0OghIz8lVgaJ1fIw7-uL2v16vY_SE,9004
|
| 44 |
+
setuptools/__pycache__/__init__.cpython-311.pyc,,
|
| 45 |
+
setuptools/__pycache__/_core_metadata.cpython-311.pyc,,
|
| 46 |
+
setuptools/__pycache__/_discovery.cpython-311.pyc,,
|
| 47 |
+
setuptools/__pycache__/_entry_points.cpython-311.pyc,,
|
| 48 |
+
setuptools/__pycache__/_imp.cpython-311.pyc,,
|
| 49 |
+
setuptools/__pycache__/_importlib.cpython-311.pyc,,
|
| 50 |
+
setuptools/__pycache__/_itertools.cpython-311.pyc,,
|
| 51 |
+
setuptools/__pycache__/_normalization.cpython-311.pyc,,
|
| 52 |
+
setuptools/__pycache__/_path.cpython-311.pyc,,
|
| 53 |
+
setuptools/__pycache__/_reqs.cpython-311.pyc,,
|
| 54 |
+
setuptools/__pycache__/_scripts.cpython-311.pyc,,
|
| 55 |
+
setuptools/__pycache__/_shutil.cpython-311.pyc,,
|
| 56 |
+
setuptools/__pycache__/_static.cpython-311.pyc,,
|
| 57 |
+
setuptools/__pycache__/archive_util.cpython-311.pyc,,
|
| 58 |
+
setuptools/__pycache__/build_meta.cpython-311.pyc,,
|
| 59 |
+
setuptools/__pycache__/depends.cpython-311.pyc,,
|
| 60 |
+
setuptools/__pycache__/discovery.cpython-311.pyc,,
|
| 61 |
+
setuptools/__pycache__/dist.cpython-311.pyc,,
|
| 62 |
+
setuptools/__pycache__/errors.cpython-311.pyc,,
|
| 63 |
+
setuptools/__pycache__/extension.cpython-311.pyc,,
|
| 64 |
+
setuptools/__pycache__/glob.cpython-311.pyc,,
|
| 65 |
+
setuptools/__pycache__/installer.cpython-311.pyc,,
|
| 66 |
+
setuptools/__pycache__/launch.cpython-311.pyc,,
|
| 67 |
+
setuptools/__pycache__/logging.cpython-311.pyc,,
|
| 68 |
+
setuptools/__pycache__/modified.cpython-311.pyc,,
|
| 69 |
+
setuptools/__pycache__/monkey.cpython-311.pyc,,
|
| 70 |
+
setuptools/__pycache__/msvc.cpython-311.pyc,,
|
| 71 |
+
setuptools/__pycache__/namespaces.cpython-311.pyc,,
|
| 72 |
+
setuptools/__pycache__/unicode_utils.cpython-311.pyc,,
|
| 73 |
+
setuptools/__pycache__/version.cpython-311.pyc,,
|
| 74 |
+
setuptools/__pycache__/warnings.cpython-311.pyc,,
|
| 75 |
+
setuptools/__pycache__/wheel.cpython-311.pyc,,
|
| 76 |
+
setuptools/__pycache__/windows_support.cpython-311.pyc,,
|
| 77 |
+
setuptools/_core_metadata.py,sha256=T7Tjp-WSoN881adev3R1wzXCPnkDHqbC2MgylN1yjS8,11978
|
| 78 |
+
setuptools/_discovery.py,sha256=HxEpgYQ8zUaLOOSp8JIA4y2Mdvn9ysVxspPT-ppfzM4,836
|
| 79 |
+
setuptools/_distutils/__init__.py,sha256=xGYuhWwLG07J0Q49BVnEjPy6wyDcd6veJMDJX7ljlyM,359
|
| 80 |
+
setuptools/_distutils/__pycache__/__init__.cpython-311.pyc,,
|
| 81 |
+
setuptools/_distutils/__pycache__/_log.cpython-311.pyc,,
|
| 82 |
+
setuptools/_distutils/__pycache__/_macos_compat.cpython-311.pyc,,
|
| 83 |
+
setuptools/_distutils/__pycache__/_modified.cpython-311.pyc,,
|
| 84 |
+
setuptools/_distutils/__pycache__/_msvccompiler.cpython-311.pyc,,
|
| 85 |
+
setuptools/_distutils/__pycache__/archive_util.cpython-311.pyc,,
|
| 86 |
+
setuptools/_distutils/__pycache__/ccompiler.cpython-311.pyc,,
|
| 87 |
+
setuptools/_distutils/__pycache__/cmd.cpython-311.pyc,,
|
| 88 |
+
setuptools/_distutils/__pycache__/core.cpython-311.pyc,,
|
| 89 |
+
setuptools/_distutils/__pycache__/cygwinccompiler.cpython-311.pyc,,
|
| 90 |
+
setuptools/_distutils/__pycache__/debug.cpython-311.pyc,,
|
| 91 |
+
setuptools/_distutils/__pycache__/dep_util.cpython-311.pyc,,
|
| 92 |
+
setuptools/_distutils/__pycache__/dir_util.cpython-311.pyc,,
|
| 93 |
+
setuptools/_distutils/__pycache__/dist.cpython-311.pyc,,
|
| 94 |
+
setuptools/_distutils/__pycache__/errors.cpython-311.pyc,,
|
| 95 |
+
setuptools/_distutils/__pycache__/extension.cpython-311.pyc,,
|
| 96 |
+
setuptools/_distutils/__pycache__/fancy_getopt.cpython-311.pyc,,
|
| 97 |
+
setuptools/_distutils/__pycache__/file_util.cpython-311.pyc,,
|
| 98 |
+
setuptools/_distutils/__pycache__/filelist.cpython-311.pyc,,
|
| 99 |
+
setuptools/_distutils/__pycache__/log.cpython-311.pyc,,
|
| 100 |
+
setuptools/_distutils/__pycache__/spawn.cpython-311.pyc,,
|
| 101 |
+
setuptools/_distutils/__pycache__/sysconfig.cpython-311.pyc,,
|
| 102 |
+
setuptools/_distutils/__pycache__/text_file.cpython-311.pyc,,
|
| 103 |
+
setuptools/_distutils/__pycache__/unixccompiler.cpython-311.pyc,,
|
| 104 |
+
setuptools/_distutils/__pycache__/util.cpython-311.pyc,,
|
| 105 |
+
setuptools/_distutils/__pycache__/version.cpython-311.pyc,,
|
| 106 |
+
setuptools/_distutils/__pycache__/versionpredicate.cpython-311.pyc,,
|
| 107 |
+
setuptools/_distutils/__pycache__/zosccompiler.cpython-311.pyc,,
|
| 108 |
+
setuptools/_distutils/_log.py,sha256=i-lNTTcXS8TmWITJ6DODGvtW5z5tMattJQ76h8rZxQU,42
|
| 109 |
+
setuptools/_distutils/_macos_compat.py,sha256=JzUGhF4E5yIITHbUaPobZEWjGHdrrcNV63z86S4RjBc,239
|
| 110 |
+
setuptools/_distutils/_modified.py,sha256=RF1n1CexyDYV3lvGbeXS0s-XCJVboDOIUbA8wEQqYTY,3211
|
| 111 |
+
setuptools/_distutils/_msvccompiler.py,sha256=9PSfSHxvJnHnQL6Sqz4Xcz7iaBIT62p6BheQzGsSlwo,335
|
| 112 |
+
setuptools/_distutils/archive_util.py,sha256=Qw2z-Pt-NV8lNUQrzjs3XDGWCWHMPnqHLyt8TiD2XEA,8884
|
| 113 |
+
setuptools/_distutils/ccompiler.py,sha256=FKVjqzGJ7c-FtouNjhLiaMPm5LKMZHHAruXf8LU216c,524
|
| 114 |
+
setuptools/_distutils/cmd.py,sha256=hXtaRaH7QBnfNOIqEvCt47iwZzD9MVvBdhhdQctHsxM,22186
|
| 115 |
+
setuptools/_distutils/command/__init__.py,sha256=GfFAzbBqk1qxSH4BdaKioKS4hRRnD44BAmwEN85C4u8,386
|
| 116 |
+
setuptools/_distutils/command/__pycache__/__init__.cpython-311.pyc,,
|
| 117 |
+
setuptools/_distutils/command/__pycache__/_framework_compat.cpython-311.pyc,,
|
| 118 |
+
setuptools/_distutils/command/__pycache__/bdist.cpython-311.pyc,,
|
| 119 |
+
setuptools/_distutils/command/__pycache__/bdist_dumb.cpython-311.pyc,,
|
| 120 |
+
setuptools/_distutils/command/__pycache__/bdist_rpm.cpython-311.pyc,,
|
| 121 |
+
setuptools/_distutils/command/__pycache__/build.cpython-311.pyc,,
|
| 122 |
+
setuptools/_distutils/command/__pycache__/build_clib.cpython-311.pyc,,
|
| 123 |
+
setuptools/_distutils/command/__pycache__/build_ext.cpython-311.pyc,,
|
| 124 |
+
setuptools/_distutils/command/__pycache__/build_py.cpython-311.pyc,,
|
| 125 |
+
setuptools/_distutils/command/__pycache__/build_scripts.cpython-311.pyc,,
|
| 126 |
+
setuptools/_distutils/command/__pycache__/check.cpython-311.pyc,,
|
| 127 |
+
setuptools/_distutils/command/__pycache__/clean.cpython-311.pyc,,
|
| 128 |
+
setuptools/_distutils/command/__pycache__/config.cpython-311.pyc,,
|
| 129 |
+
setuptools/_distutils/command/__pycache__/install.cpython-311.pyc,,
|
| 130 |
+
setuptools/_distutils/command/__pycache__/install_data.cpython-311.pyc,,
|
| 131 |
+
setuptools/_distutils/command/__pycache__/install_egg_info.cpython-311.pyc,,
|
| 132 |
+
setuptools/_distutils/command/__pycache__/install_headers.cpython-311.pyc,,
|
| 133 |
+
setuptools/_distutils/command/__pycache__/install_lib.cpython-311.pyc,,
|
| 134 |
+
setuptools/_distutils/command/__pycache__/install_scripts.cpython-311.pyc,,
|
| 135 |
+
setuptools/_distutils/command/__pycache__/sdist.cpython-311.pyc,,
|
| 136 |
+
setuptools/_distutils/command/_framework_compat.py,sha256=0iZdSJYzGRWCCvzRDKE-R0-_yaAYvFMd1ylXb2eYXug,1609
|
| 137 |
+
setuptools/_distutils/command/bdist.py,sha256=jWtk61R7fWNUUNxJV0thTZzU5n80L3Ay1waSiP9kiLA,5854
|
| 138 |
+
setuptools/_distutils/command/bdist_dumb.py,sha256=Hx1jAqoZNxYIy4N5TLzUp6J5fi8Ls18py7UlLNFhO2E,4631
|
| 139 |
+
setuptools/_distutils/command/bdist_rpm.py,sha256=nxcXXv5a7B-1ntWu4DbGmCtES4EBINrJaBQcRNAYCJI,21785
|
| 140 |
+
setuptools/_distutils/command/build.py,sha256=SpHlagf0iNaKVyIhxDfhPFZ8X1-LAWOCQACy-yt2K0w,5923
|
| 141 |
+
setuptools/_distutils/command/build_clib.py,sha256=aMqZcUfCbOAu_xr-A9iW-Q9YZHzpDGLRTezOgMQJmSQ,7777
|
| 142 |
+
setuptools/_distutils/command/build_ext.py,sha256=zrrsu9HXnzV6bXYbJuZCK4SwVZMjKnl4pG1o3bNcxtc,32710
|
| 143 |
+
setuptools/_distutils/command/build_py.py,sha256=Vfq-INemoMbg6f003BTy_Ufp8bjOZhmFIhpKMcfXLgs,16696
|
| 144 |
+
setuptools/_distutils/command/build_scripts.py,sha256=emMEOONkNLPC-AMjKy45UksUlY1wk06esOGThpwidIM,5135
|
| 145 |
+
setuptools/_distutils/command/check.py,sha256=yoNe2MPY4JcTM7rwoIQdfZ75q5Ri058I2coi-Gq9CjM,4946
|
| 146 |
+
setuptools/_distutils/command/clean.py,sha256=dQAacOabwBXU9JoZ-1GFusq3eFltDaeXJFSYncqGbvE,2644
|
| 147 |
+
setuptools/_distutils/command/config.py,sha256=qrrfz6NEQORmbqiY2XlvCDWYhsbLyxZXJsURKfYN_kw,12724
|
| 148 |
+
setuptools/_distutils/command/install.py,sha256=-JenB-mua4hc2RI_-W8F9PnP_J-OaFO7E0PJGKxLo1o,30072
|
| 149 |
+
setuptools/_distutils/command/install_data.py,sha256=GzBlUWWKubTYJlP-L0auUriq9cL-5RKOcoyHTttKj0Q,2875
|
| 150 |
+
setuptools/_distutils/command/install_egg_info.py,sha256=ffiLoU1ivQJ8q2_WL7ZygZbUcOsgdFLKL7otEIJWWkI,2868
|
| 151 |
+
setuptools/_distutils/command/install_headers.py,sha256=5ciKCj8c3XKsYNKdkdMvnypaUCKcoWCDeeZij3fD-Z4,1272
|
| 152 |
+
setuptools/_distutils/command/install_lib.py,sha256=2s9-m5-b1qKm51F28lB5L39Z6vv_GHMlv9dNBSupok0,8588
|
| 153 |
+
setuptools/_distutils/command/install_scripts.py,sha256=M0pPdiaqB7TGmqTMujpGGeiL0Iq_CTeGjMFtrmDmwzM,2002
|
| 154 |
+
setuptools/_distutils/command/sdist.py,sha256=cRIF6Ht1hJ6ayOOFVycMFBUNxjo94e_rFYPx4Hi8Ahc,19151
|
| 155 |
+
setuptools/_distutils/compat/__init__.py,sha256=J20aXGjJ86Rg41xFLIWlcWCgZ9edMdJ9vvdNEQ87vPQ,522
|
| 156 |
+
setuptools/_distutils/compat/__pycache__/__init__.cpython-311.pyc,,
|
| 157 |
+
setuptools/_distutils/compat/__pycache__/numpy.cpython-311.pyc,,
|
| 158 |
+
setuptools/_distutils/compat/__pycache__/py39.cpython-311.pyc,,
|
| 159 |
+
setuptools/_distutils/compat/numpy.py,sha256=UFgneZw9w97g4c-yGoAIOyLxUOWQ-fPRIhhfMs7_Ouc,167
|
| 160 |
+
setuptools/_distutils/compat/py39.py,sha256=hOsD6lwZLqZoMnacNJ3P6nUA-LJQhEpVtYTzVH0o96M,1964
|
| 161 |
+
setuptools/_distutils/compilers/C/__pycache__/base.cpython-311.pyc,,
|
| 162 |
+
setuptools/_distutils/compilers/C/__pycache__/cygwin.cpython-311.pyc,,
|
| 163 |
+
setuptools/_distutils/compilers/C/__pycache__/errors.cpython-311.pyc,,
|
| 164 |
+
setuptools/_distutils/compilers/C/__pycache__/msvc.cpython-311.pyc,,
|
| 165 |
+
setuptools/_distutils/compilers/C/__pycache__/unix.cpython-311.pyc,,
|
| 166 |
+
setuptools/_distutils/compilers/C/__pycache__/zos.cpython-311.pyc,,
|
| 167 |
+
setuptools/_distutils/compilers/C/base.py,sha256=XR1rBCStCquqm7QOYXD41-LfvsFcPpGxrwxeXzJyn_w,54876
|
| 168 |
+
setuptools/_distutils/compilers/C/cygwin.py,sha256=DUlwQSb55aj7OdcmcddrmCmVEjEaxIiJ5hHUO3GBPNs,11844
|
| 169 |
+
setuptools/_distutils/compilers/C/errors.py,sha256=sKOVzJajMUmNdfywo9UM_QQGsKFcclDhtI5TlCiXMLc,573
|
| 170 |
+
setuptools/_distutils/compilers/C/msvc.py,sha256=elzG8v9jN5QytLMwLCdUdSuZ3eZ3R98VUvnm9Y2PBCA,21404
|
| 171 |
+
setuptools/_distutils/compilers/C/tests/__pycache__/test_base.cpython-311.pyc,,
|
| 172 |
+
setuptools/_distutils/compilers/C/tests/__pycache__/test_cygwin.cpython-311.pyc,,
|
| 173 |
+
setuptools/_distutils/compilers/C/tests/__pycache__/test_mingw.cpython-311.pyc,,
|
| 174 |
+
setuptools/_distutils/compilers/C/tests/__pycache__/test_msvc.cpython-311.pyc,,
|
| 175 |
+
setuptools/_distutils/compilers/C/tests/__pycache__/test_unix.cpython-311.pyc,,
|
| 176 |
+
setuptools/_distutils/compilers/C/tests/test_base.py,sha256=rdhHc56bhXtm5NnN9BSHwr6c69UqzMItZQzlw2AsdMc,2706
|
| 177 |
+
setuptools/_distutils/compilers/C/tests/test_cygwin.py,sha256=UgV2VgUXj3VulcbDc0UBWfEyJDx42tgSwS4LzHix3mY,2701
|
| 178 |
+
setuptools/_distutils/compilers/C/tests/test_mingw.py,sha256=hCmwyywISpRoyOySbFHBL4TprWRV0mUWDKmOLO8XBXE,1900
|
| 179 |
+
setuptools/_distutils/compilers/C/tests/test_msvc.py,sha256=DlGjmZ1mBSMXIgmlu80BKc7V-EJOZuYucwJwFh5dn28,4151
|
| 180 |
+
setuptools/_distutils/compilers/C/tests/test_unix.py,sha256=AyadWw1fR-UeDl2TvIbYBzOJVHkpE_oRRQ3JTJWqaEA,14642
|
| 181 |
+
setuptools/_distutils/compilers/C/unix.py,sha256=YH-y9g_pjBFjaJyHJQkDEBQ7q4D20I2-cWJNdgw-Yho,16531
|
| 182 |
+
setuptools/_distutils/compilers/C/zos.py,sha256=vnNeWLRZkdIkdZ-YyBnL8idTUfcCOn0tLMW5OBJ0ScU,6586
|
| 183 |
+
setuptools/_distutils/core.py,sha256=GEHKaFC48T3o-_SmH4864GvKyx1IgbVC6ISIPVlx7a4,9364
|
| 184 |
+
setuptools/_distutils/cygwinccompiler.py,sha256=mG_cU8SVZ4amD_VtF5vH6BXP0-kghGsDPbDSXrQ963c,594
|
| 185 |
+
setuptools/_distutils/debug.py,sha256=N6MrTAqK6l9SVk6tWweR108PM8Ol7qNlfyV-nHcLhsY,139
|
| 186 |
+
setuptools/_distutils/dep_util.py,sha256=xN75p6ZpHhMiHEc-rpL2XilJQynHnDNiafHteaZ4tjU,349
|
| 187 |
+
setuptools/_distutils/dir_util.py,sha256=DXPUlfVVGsg9B-Jgg4At_j9T7vM60OgwNXkQHqTo7-I,7236
|
| 188 |
+
setuptools/_distutils/dist.py,sha256=gW598UE0WMkzXQQ31Nr-8L7MPw0oIOz5OSSRzYZlwrM,55794
|
| 189 |
+
setuptools/_distutils/errors.py,sha256=PPE2oDRh5y9Q1beKK9rhdvDaCzQhi4HCXs4KcqfqgZY,3092
|
| 190 |
+
setuptools/_distutils/extension.py,sha256=Foyu4gULcPqm1_U9zrYYHxNk4NqglXv1rbsOk_QrSds,11155
|
| 191 |
+
setuptools/_distutils/fancy_getopt.py,sha256=PjdO-bWCW0imV_UN-MGEw9R2GP2OiE8pHjITgmTAY3Q,17895
|
| 192 |
+
setuptools/_distutils/file_util.py,sha256=YFQL_pD3hLuER9II_H6-hDC_YIGEookdd4wedLuiTW0,7978
|
| 193 |
+
setuptools/_distutils/filelist.py,sha256=MBeSRJmPcKmDv8ooZgSU4BiQPZ0Khwv8l_jhD50XycI,15337
|
| 194 |
+
setuptools/_distutils/log.py,sha256=VyBs5j7z4-K6XTEEBThUc9HyMpoPLGtQpERqbz5ylww,1200
|
| 195 |
+
setuptools/_distutils/spawn.py,sha256=zseCh9sEifyp0I5Vg719JNIASlROJ2ehXqQnHlpt89Q,4086
|
| 196 |
+
setuptools/_distutils/sysconfig.py,sha256=KeI8OHbMuEzHJ8Q0cBez9KZny8iRy6Z6Y0AkMz1jlsU,19728
|
| 197 |
+
setuptools/_distutils/tests/__init__.py,sha256=j-IoPZEtQv3EOPuqNTwalr6GLyRjzCC-OOaNvZzmHsI,1485
|
| 198 |
+
setuptools/_distutils/tests/__pycache__/__init__.cpython-311.pyc,,
|
| 199 |
+
setuptools/_distutils/tests/__pycache__/support.cpython-311.pyc,,
|
| 200 |
+
setuptools/_distutils/tests/__pycache__/test_archive_util.cpython-311.pyc,,
|
| 201 |
+
setuptools/_distutils/tests/__pycache__/test_bdist.cpython-311.pyc,,
|
| 202 |
+
setuptools/_distutils/tests/__pycache__/test_bdist_dumb.cpython-311.pyc,,
|
| 203 |
+
setuptools/_distutils/tests/__pycache__/test_bdist_rpm.cpython-311.pyc,,
|
| 204 |
+
setuptools/_distutils/tests/__pycache__/test_build.cpython-311.pyc,,
|
| 205 |
+
setuptools/_distutils/tests/__pycache__/test_build_clib.cpython-311.pyc,,
|
| 206 |
+
setuptools/_distutils/tests/__pycache__/test_build_ext.cpython-311.pyc,,
|
| 207 |
+
setuptools/_distutils/tests/__pycache__/test_build_py.cpython-311.pyc,,
|
| 208 |
+
setuptools/_distutils/tests/__pycache__/test_build_scripts.cpython-311.pyc,,
|
| 209 |
+
setuptools/_distutils/tests/__pycache__/test_check.cpython-311.pyc,,
|
| 210 |
+
setuptools/_distutils/tests/__pycache__/test_clean.cpython-311.pyc,,
|
| 211 |
+
setuptools/_distutils/tests/__pycache__/test_cmd.cpython-311.pyc,,
|
| 212 |
+
setuptools/_distutils/tests/__pycache__/test_config_cmd.cpython-311.pyc,,
|
| 213 |
+
setuptools/_distutils/tests/__pycache__/test_core.cpython-311.pyc,,
|
| 214 |
+
setuptools/_distutils/tests/__pycache__/test_dir_util.cpython-311.pyc,,
|
| 215 |
+
setuptools/_distutils/tests/__pycache__/test_dist.cpython-311.pyc,,
|
| 216 |
+
setuptools/_distutils/tests/__pycache__/test_extension.cpython-311.pyc,,
|
| 217 |
+
setuptools/_distutils/tests/__pycache__/test_file_util.cpython-311.pyc,,
|
| 218 |
+
setuptools/_distutils/tests/__pycache__/test_filelist.cpython-311.pyc,,
|
| 219 |
+
setuptools/_distutils/tests/__pycache__/test_install.cpython-311.pyc,,
|
| 220 |
+
setuptools/_distutils/tests/__pycache__/test_install_data.cpython-311.pyc,,
|
| 221 |
+
setuptools/_distutils/tests/__pycache__/test_install_headers.cpython-311.pyc,,
|
| 222 |
+
setuptools/_distutils/tests/__pycache__/test_install_lib.cpython-311.pyc,,
|
| 223 |
+
setuptools/_distutils/tests/__pycache__/test_install_scripts.cpython-311.pyc,,
|
| 224 |
+
setuptools/_distutils/tests/__pycache__/test_log.cpython-311.pyc,,
|
| 225 |
+
setuptools/_distutils/tests/__pycache__/test_modified.cpython-311.pyc,,
|
| 226 |
+
setuptools/_distutils/tests/__pycache__/test_sdist.cpython-311.pyc,,
|
| 227 |
+
setuptools/_distutils/tests/__pycache__/test_spawn.cpython-311.pyc,,
|
| 228 |
+
setuptools/_distutils/tests/__pycache__/test_sysconfig.cpython-311.pyc,,
|
| 229 |
+
setuptools/_distutils/tests/__pycache__/test_text_file.cpython-311.pyc,,
|
| 230 |
+
setuptools/_distutils/tests/__pycache__/test_util.cpython-311.pyc,,
|
| 231 |
+
setuptools/_distutils/tests/__pycache__/test_version.cpython-311.pyc,,
|
| 232 |
+
setuptools/_distutils/tests/__pycache__/test_versionpredicate.cpython-311.pyc,,
|
| 233 |
+
setuptools/_distutils/tests/__pycache__/unix_compat.cpython-311.pyc,,
|
| 234 |
+
setuptools/_distutils/tests/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 235 |
+
setuptools/_distutils/tests/compat/__pycache__/__init__.cpython-311.pyc,,
|
| 236 |
+
setuptools/_distutils/tests/compat/__pycache__/py39.cpython-311.pyc,,
|
| 237 |
+
setuptools/_distutils/tests/compat/py39.py,sha256=t0GBTM-30jX-9zCfkwlNBFtzzabemx6065mJ0d9_VRw,1026
|
| 238 |
+
setuptools/_distutils/tests/support.py,sha256=tjsYsyxvpTK4NrkCseh2ujvDIGV0Mf_b5SI5fP2T0yM,4099
|
| 239 |
+
setuptools/_distutils/tests/test_archive_util.py,sha256=jozimSwPBF-JoJfN_vDaiVGZp66BNcWZGh34FlW57DQ,11787
|
| 240 |
+
setuptools/_distutils/tests/test_bdist.py,sha256=xNHxUsLlHsZQRwkzLb_iSD24s-9Mk-NX2ffBWwOyPyc,1396
|
| 241 |
+
setuptools/_distutils/tests/test_bdist_dumb.py,sha256=QF05MHNhPOdZyh88Xpw8KsO64s7pRFkl8KL-RoV4XK0,2247
|
| 242 |
+
setuptools/_distutils/tests/test_bdist_rpm.py,sha256=Hdm-pwWgyaoGdGbEcGZa8cRhGU45y8gHK8umOanTjik,3932
|
| 243 |
+
setuptools/_distutils/tests/test_build.py,sha256=JJY5XpOZco25ZY0pstxl-iI8mHsWP0ujf5o8aOtuZYY,1742
|
| 244 |
+
setuptools/_distutils/tests/test_build_clib.py,sha256=Mo1ZFb4C1VXBYOGvnallwN7YCnTtr24akLDO8Zi4CsY,4331
|
| 245 |
+
setuptools/_distutils/tests/test_build_ext.py,sha256=QFO9qYVhWWdJu17HXc4x9RMnLZlhk0lAHi9HVppbuX4,22545
|
| 246 |
+
setuptools/_distutils/tests/test_build_py.py,sha256=NsfmRrojOHBXNMqWR_mp5g4PLTgjhD7iZFUffGZFIdw,6882
|
| 247 |
+
setuptools/_distutils/tests/test_build_scripts.py,sha256=cD-FRy-oX55sXRX5Ez5xQCaeHrWajyKc4Xuwv2fe48w,2880
|
| 248 |
+
setuptools/_distutils/tests/test_check.py,sha256=hHSV07qf7YoSxGsTbbsUQ9tssZz5RRNdbrY1s2SwaFI,6226
|
| 249 |
+
setuptools/_distutils/tests/test_clean.py,sha256=hPH6jfIpGFUrvWbF1txkiNVSNaAxt2wq5XjV499zO4E,1240
|
| 250 |
+
setuptools/_distutils/tests/test_cmd.py,sha256=bgRB79mitoOKR1OiyZHnCogvGxt3pWkxeTqIC04lQWQ,3254
|
| 251 |
+
setuptools/_distutils/tests/test_config_cmd.py,sha256=Zs6WX0IfxDvmuC19XzuVNnYCnTr9Y-hl73TAmDSBN4Y,2664
|
| 252 |
+
setuptools/_distutils/tests/test_core.py,sha256=L7XKVAxa-MGoAZeANopnuK9fRKneYhkSQpgw8XQvcF8,3829
|
| 253 |
+
setuptools/_distutils/tests/test_dir_util.py,sha256=E84lC-k4riVUwURyWaQ0Jqx2ui2-io-0RuJa3M7qkJs,4500
|
| 254 |
+
setuptools/_distutils/tests/test_dist.py,sha256=a6wlc5fQJd5qQ6HOndzcupNhjTxvj6-_JLtpuYvaP1M,18793
|
| 255 |
+
setuptools/_distutils/tests/test_extension.py,sha256=-YejLgZCuycFrOBd64pVH0JvwMc9NwhzHvQxvvjXHqk,3670
|
| 256 |
+
setuptools/_distutils/tests/test_file_util.py,sha256=livjnl3FkilQlrB2rFdFQq9nvjEVZHynNya0bfzv_b4,3522
|
| 257 |
+
setuptools/_distutils/tests/test_filelist.py,sha256=rJwkqCUfkGDgWlD22TozsT8ycbupMHB8DXqThzwT1T4,10766
|
| 258 |
+
setuptools/_distutils/tests/test_install.py,sha256=TfCB0ykhIxydIC2Q4SuTAZzSHvteMHgrBL9whoSgK9Q,8618
|
| 259 |
+
setuptools/_distutils/tests/test_install_data.py,sha256=vKq3K97k0hBAnOg38nmwEdf7cEDVr9rTVyCeJolgb4A,2464
|
| 260 |
+
setuptools/_distutils/tests/test_install_headers.py,sha256=PVAYpo_tYl980Qf64DPOmmSvyefIHdU06f7VsJeZykE,936
|
| 261 |
+
setuptools/_distutils/tests/test_install_lib.py,sha256=qri6Rl-maNTQrNDV8DbeXNl0hjsfRIKiI4rfZLrmWBI,3612
|
| 262 |
+
setuptools/_distutils/tests/test_install_scripts.py,sha256=KE3v0cDkFW-90IOID-OmZZGM2mhy-ZkEuuW7UXS2SHw,1600
|
| 263 |
+
setuptools/_distutils/tests/test_log.py,sha256=isFtOufloCyEdZaQOV7cVUr46GwtdVMj43mGBB5XH7k,323
|
| 264 |
+
setuptools/_distutils/tests/test_modified.py,sha256=h1--bOWmtJo1bpVV6uRhdnS9br71CBiNDM1MDwSGpug,4221
|
| 265 |
+
setuptools/_distutils/tests/test_sdist.py,sha256=cfzUhlCA418-1vH9ta3IBs26c_jUBbkJoFOK5GnAyNk,15062
|
| 266 |
+
setuptools/_distutils/tests/test_spawn.py,sha256=eS8w9D7bTxyFLSyRahJWeuh8Kc1F8RWWiY_dSG5B5Bc,4803
|
| 267 |
+
setuptools/_distutils/tests/test_sysconfig.py,sha256=lxM8LsUi1TomjDV4HoYK8u5nUoBkeNL60Uq8PY1DcwU,11986
|
| 268 |
+
setuptools/_distutils/tests/test_text_file.py,sha256=WQWSB5AfdBDZaMA8BFgipJPnsJb_2SKMfL90fSkRVtw,3460
|
| 269 |
+
setuptools/_distutils/tests/test_util.py,sha256=H9zlZ4z4Vh4TfjNYDBsxP7wguQLpxCfJYyOcm1yZU3c,7988
|
| 270 |
+
setuptools/_distutils/tests/test_version.py,sha256=ahfg_mP8wRy1sgwY-_Px5hrjgf6_upTIpnCgpR4yWRk,2750
|
| 271 |
+
setuptools/_distutils/tests/test_versionpredicate.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 272 |
+
setuptools/_distutils/tests/unix_compat.py,sha256=z-op6C2iVdX1aq5BIBR7cqOxijKE97alNwJqHNdLpoI,386
|
| 273 |
+
setuptools/_distutils/text_file.py,sha256=z4dkOJBr9Bo2LG0TNqm8sD63LEEaKSSP0J0bWBrFG3c,12101
|
| 274 |
+
setuptools/_distutils/unixccompiler.py,sha256=1bXJWH4fiu_A2WfriHzf88xjllQTXnnjUkZdRKs9cWU,212
|
| 275 |
+
setuptools/_distutils/util.py,sha256=Njfnqk60zMdkiAjRnGcTWX3t49-obHapOlbNvyIl02I,18094
|
| 276 |
+
setuptools/_distutils/version.py,sha256=vImT5-ECXkQ21oKL0XYFiTqK6NyM09cpzBNoA_34CQU,12619
|
| 277 |
+
setuptools/_distutils/versionpredicate.py,sha256=qBWQ6wTj12ODytoTmIydefIY2jb4uY1sdbgbuLn-IJM,5205
|
| 278 |
+
setuptools/_distutils/zosccompiler.py,sha256=svdiXZ2kdcwKrJKfhUhib03y8gz7aGZKukXH3I7YkBc,58
|
| 279 |
+
setuptools/_entry_points.py,sha256=10TjbzfGdqWGH06lQuPPGDDci-OnXoIzrfpIWba5AZw,2468
|
| 280 |
+
setuptools/_imp.py,sha256=YY1EjZEN-0zYci1cxO10B_adAEOr7i8eK8JoCc9Ierc,2435
|
| 281 |
+
setuptools/_importlib.py,sha256=aKIjcK0HKXNz2D-XTrxaixGn_juTkONwmu3dcheMOF0,223
|
| 282 |
+
setuptools/_itertools.py,sha256=jWRfsIrpC7myooz3hDURj9GtvpswZeKXg2HakmEhNjo,657
|
| 283 |
+
setuptools/_normalization.py,sha256=-SxdhisW3W1JKzqKYxd3XeHyRjIj3J9EVRkt3aL8nKY,5747
|
| 284 |
+
setuptools/_path.py,sha256=2Bv1q9_Hrd4oizKwcH3pv_05YVR6meovQE6ZtyD45yI,2976
|
| 285 |
+
setuptools/_reqs.py,sha256=RRX-qYsz_fy6K66XchCHcIszK3bSAtU6aO1s3ZaLV14,1380
|
| 286 |
+
setuptools/_scripts.py,sha256=5TrIWDVOuO3cRcfzcZAUBKPRH7K4svQRdQLZKKiD1bQ,11247
|
| 287 |
+
setuptools/_shutil.py,sha256=IQQ1gcPX4X_wPilYGJGxChyMCqG43VOejoQZTIrCTY8,1578
|
| 288 |
+
setuptools/_static.py,sha256=GTR79gESF1_JaK4trLkpDrEuCeEtPlwQW0MRv7VNQX4,4855
|
| 289 |
+
setuptools/_vendor/__pycache__/typing_extensions.cpython-311.pyc,,
|
| 290 |
+
setuptools/_vendor/autocommand-2.2.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 291 |
+
setuptools/_vendor/autocommand-2.2.2.dist-info/LICENSE,sha256=reeNBJgtaZctREqOFKlPh6IzTdOFXMgDSOqOJAqg3y0,7634
|
| 292 |
+
setuptools/_vendor/autocommand-2.2.2.dist-info/METADATA,sha256=OADZuR3O6iBlpu1ieTgzYul6w4uOVrk0P0BO5TGGAJk,15006
|
| 293 |
+
setuptools/_vendor/autocommand-2.2.2.dist-info/RECORD,sha256=giu6ZrQVJvpUcYa4AiH4XaUNZSvuVJPb_l0UCFES8MM,1308
|
| 294 |
+
setuptools/_vendor/autocommand-2.2.2.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
| 295 |
+
setuptools/_vendor/autocommand-2.2.2.dist-info/top_level.txt,sha256=AzfhgKKS8EdAwWUTSF8mgeVQbXOY9kokHB6kSqwwqu0,12
|
| 296 |
+
setuptools/_vendor/autocommand/__init__.py,sha256=zko5Rnvolvb-UXjCx_2ArPTGBWwUK5QY4LIQIKYR7As,1037
|
| 297 |
+
setuptools/_vendor/autocommand/__pycache__/__init__.cpython-311.pyc,,
|
| 298 |
+
setuptools/_vendor/autocommand/__pycache__/autoasync.cpython-311.pyc,,
|
| 299 |
+
setuptools/_vendor/autocommand/__pycache__/autocommand.cpython-311.pyc,,
|
| 300 |
+
setuptools/_vendor/autocommand/__pycache__/automain.cpython-311.pyc,,
|
| 301 |
+
setuptools/_vendor/autocommand/__pycache__/autoparse.cpython-311.pyc,,
|
| 302 |
+
setuptools/_vendor/autocommand/__pycache__/errors.cpython-311.pyc,,
|
| 303 |
+
setuptools/_vendor/autocommand/autoasync.py,sha256=AMdyrxNS4pqWJfP_xuoOcImOHWD-qT7x06wmKN1Vp-U,5680
|
| 304 |
+
setuptools/_vendor/autocommand/autocommand.py,sha256=hmkEmQ72HtL55gnURVjDOnsfYlGd5lLXbvT4KG496Qw,2505
|
| 305 |
+
setuptools/_vendor/autocommand/automain.py,sha256=A2b8i754Mxc_DjU9WFr6vqYDWlhz0cn8miu8d8EsxV8,2076
|
| 306 |
+
setuptools/_vendor/autocommand/autoparse.py,sha256=WVWmZJPcbzUKXP40raQw_0HD8qPJ2V9VG1eFFmmnFxw,11642
|
| 307 |
+
setuptools/_vendor/autocommand/errors.py,sha256=7aa3roh9Herd6nIKpQHNWEslWE8oq7GiHYVUuRqORnA,886
|
| 308 |
+
setuptools/_vendor/backports.tarfile-1.2.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 309 |
+
setuptools/_vendor/backports.tarfile-1.2.0.dist-info/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
|
| 310 |
+
setuptools/_vendor/backports.tarfile-1.2.0.dist-info/METADATA,sha256=ghXFTq132dxaEIolxr3HK1mZqm9iyUmaRANZQSr6WlE,2020
|
| 311 |
+
setuptools/_vendor/backports.tarfile-1.2.0.dist-info/RECORD,sha256=JYofHISeEXUGmlWl1s41ev3QTjTNXeJwk-Ss7HqdLOE,1360
|
| 312 |
+
setuptools/_vendor/backports.tarfile-1.2.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 313 |
+
setuptools/_vendor/backports.tarfile-1.2.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
| 314 |
+
setuptools/_vendor/backports.tarfile-1.2.0.dist-info/top_level.txt,sha256=cGjaLMOoBR1FK0ApojtzWVmViTtJ7JGIK_HwXiEsvtU,10
|
| 315 |
+
setuptools/_vendor/backports/__init__.py,sha256=iOEMwnlORWezdO8-2vxBIPSR37D7JGjluZ8f55vzxls,81
|
| 316 |
+
setuptools/_vendor/backports/__pycache__/__init__.cpython-311.pyc,,
|
| 317 |
+
setuptools/_vendor/backports/tarfile/__init__.py,sha256=Pwf2qUIfB0SolJPCKcx3vz3UEu_aids4g4sAfxy94qg,108491
|
| 318 |
+
setuptools/_vendor/backports/tarfile/__main__.py,sha256=Yw2oGT1afrz2eBskzdPYL8ReB_3liApmhFkN2EbDmc4,59
|
| 319 |
+
setuptools/_vendor/backports/tarfile/__pycache__/__init__.cpython-311.pyc,,
|
| 320 |
+
setuptools/_vendor/backports/tarfile/__pycache__/__main__.cpython-311.pyc,,
|
| 321 |
+
setuptools/_vendor/backports/tarfile/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 322 |
+
setuptools/_vendor/backports/tarfile/compat/__pycache__/__init__.cpython-311.pyc,,
|
| 323 |
+
setuptools/_vendor/backports/tarfile/compat/__pycache__/py38.cpython-311.pyc,,
|
| 324 |
+
setuptools/_vendor/backports/tarfile/compat/py38.py,sha256=iYkyt_gvWjLzGUTJD9TuTfMMjOk-ersXZmRlvQYN2qE,568
|
| 325 |
+
setuptools/_vendor/importlib_metadata-8.0.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 326 |
+
setuptools/_vendor/importlib_metadata-8.0.0.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
| 327 |
+
setuptools/_vendor/importlib_metadata-8.0.0.dist-info/METADATA,sha256=anuQ7_7h4J1bSEzfcjIBakPi2cyVQ7y7jklLHsBeH1k,4648
|
| 328 |
+
setuptools/_vendor/importlib_metadata-8.0.0.dist-info/RECORD,sha256=DY08buueu-hsrH1ghhVSQzwynanqUSSLYdAr4uXmQDA,2518
|
| 329 |
+
setuptools/_vendor/importlib_metadata-8.0.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 330 |
+
setuptools/_vendor/importlib_metadata-8.0.0.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
|
| 331 |
+
setuptools/_vendor/importlib_metadata-8.0.0.dist-info/top_level.txt,sha256=CO3fD9yylANiXkrMo4qHLV_mqXL2sC5JFKgt1yWAT-A,19
|
| 332 |
+
setuptools/_vendor/importlib_metadata/__init__.py,sha256=tZNB-23h8Bixi9uCrQqj9Yf0aeC--Josdy3IZRIQeB0,33798
|
| 333 |
+
setuptools/_vendor/importlib_metadata/__pycache__/__init__.cpython-311.pyc,,
|
| 334 |
+
setuptools/_vendor/importlib_metadata/__pycache__/_adapters.cpython-311.pyc,,
|
| 335 |
+
setuptools/_vendor/importlib_metadata/__pycache__/_collections.cpython-311.pyc,,
|
| 336 |
+
setuptools/_vendor/importlib_metadata/__pycache__/_compat.cpython-311.pyc,,
|
| 337 |
+
setuptools/_vendor/importlib_metadata/__pycache__/_functools.cpython-311.pyc,,
|
| 338 |
+
setuptools/_vendor/importlib_metadata/__pycache__/_itertools.cpython-311.pyc,,
|
| 339 |
+
setuptools/_vendor/importlib_metadata/__pycache__/_meta.cpython-311.pyc,,
|
| 340 |
+
setuptools/_vendor/importlib_metadata/__pycache__/_text.cpython-311.pyc,,
|
| 341 |
+
setuptools/_vendor/importlib_metadata/__pycache__/diagnose.cpython-311.pyc,,
|
| 342 |
+
setuptools/_vendor/importlib_metadata/_adapters.py,sha256=rIhWTwBvYA1bV7i-5FfVX38qEXDTXFeS5cb5xJtP3ks,2317
|
| 343 |
+
setuptools/_vendor/importlib_metadata/_collections.py,sha256=CJ0OTCHIjWA0ZIVS4voORAsn2R4R2cQBEtPsZEJpASY,743
|
| 344 |
+
setuptools/_vendor/importlib_metadata/_compat.py,sha256=73QKrN9KNoaZzhbX5yPCCZa-FaALwXe8TPlDR72JgBU,1314
|
| 345 |
+
setuptools/_vendor/importlib_metadata/_functools.py,sha256=PsY2-4rrKX4RVeRC1oGp1lB1pmC9eKN88_f-bD9uOoA,2895
|
| 346 |
+
setuptools/_vendor/importlib_metadata/_itertools.py,sha256=cvr_2v8BRbxcIl5x5ldfqdHjhI8Yi8s8yk50G_nm6jQ,2068
|
| 347 |
+
setuptools/_vendor/importlib_metadata/_meta.py,sha256=nxZ7C8GVlcBFAKWyVOn_dn7ot_twBcbm1NmvjIetBHI,1801
|
| 348 |
+
setuptools/_vendor/importlib_metadata/_text.py,sha256=HCsFksZpJLeTP3NEk_ngrAeXVRRtTrtyh9eOABoRP4A,2166
|
| 349 |
+
setuptools/_vendor/importlib_metadata/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 350 |
+
setuptools/_vendor/importlib_metadata/compat/__pycache__/__init__.cpython-311.pyc,,
|
| 351 |
+
setuptools/_vendor/importlib_metadata/compat/__pycache__/py311.cpython-311.pyc,,
|
| 352 |
+
setuptools/_vendor/importlib_metadata/compat/__pycache__/py39.cpython-311.pyc,,
|
| 353 |
+
setuptools/_vendor/importlib_metadata/compat/py311.py,sha256=uqm-K-uohyj1042TH4a9Er_I5o7667DvulcD-gC_fSA,608
|
| 354 |
+
setuptools/_vendor/importlib_metadata/compat/py39.py,sha256=cPkMv6-0ilK-0Jw_Tkn0xYbOKJZc4WJKQHow0c2T44w,1102
|
| 355 |
+
setuptools/_vendor/importlib_metadata/diagnose.py,sha256=nkSRMiowlmkhLYhKhvCg9glmt_11Cox-EmLzEbqYTa8,379
|
| 356 |
+
setuptools/_vendor/importlib_metadata/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 357 |
+
setuptools/_vendor/inflect-7.3.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 358 |
+
setuptools/_vendor/inflect-7.3.1.dist-info/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
|
| 359 |
+
setuptools/_vendor/inflect-7.3.1.dist-info/METADATA,sha256=ZgMNY0WAZRs-U8wZiV2SMfjSKqBrMngXyDMs_CAwMwg,21079
|
| 360 |
+
setuptools/_vendor/inflect-7.3.1.dist-info/RECORD,sha256=XXg0rBuiYSxoAQUP3lenuYsPNqz4jDwtTzdv2JEbMJE,943
|
| 361 |
+
setuptools/_vendor/inflect-7.3.1.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
|
| 362 |
+
setuptools/_vendor/inflect-7.3.1.dist-info/top_level.txt,sha256=m52ujdp10CqT6jh1XQxZT6kEntcnv-7Tl7UiGNTzWZA,8
|
| 363 |
+
setuptools/_vendor/inflect/__init__.py,sha256=Jxy1HJXZiZ85kHeLAhkmvz6EMTdFqBe-duvt34R6IOc,103796
|
| 364 |
+
setuptools/_vendor/inflect/__pycache__/__init__.cpython-311.pyc,,
|
| 365 |
+
setuptools/_vendor/inflect/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 366 |
+
setuptools/_vendor/inflect/compat/__pycache__/__init__.cpython-311.pyc,,
|
| 367 |
+
setuptools/_vendor/inflect/compat/__pycache__/py38.cpython-311.pyc,,
|
| 368 |
+
setuptools/_vendor/inflect/compat/py38.py,sha256=oObVfVnWX9_OpnOuEJn1mFbJxVhwyR5epbiTNXDDaso,160
|
| 369 |
+
setuptools/_vendor/inflect/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 370 |
+
setuptools/_vendor/jaraco.collections-5.1.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 371 |
+
setuptools/_vendor/jaraco.collections-5.1.0.dist-info/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
|
| 372 |
+
setuptools/_vendor/jaraco.collections-5.1.0.dist-info/METADATA,sha256=IMUaliNsA5X1Ox9MXUWOagch5R4Wwb_3M7erp29dBtg,3933
|
| 373 |
+
setuptools/_vendor/jaraco.collections-5.1.0.dist-info/RECORD,sha256=HptivXDkpfom6VlMu4CGD_7KPev-6Hc9rvp3TNJZygY,873
|
| 374 |
+
setuptools/_vendor/jaraco.collections-5.1.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 375 |
+
setuptools/_vendor/jaraco.collections-5.1.0.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
|
| 376 |
+
setuptools/_vendor/jaraco.collections-5.1.0.dist-info/top_level.txt,sha256=0JnN3LfXH4LIRfXL-QFOGCJzQWZO3ELx4R1d_louoQM,7
|
| 377 |
+
setuptools/_vendor/jaraco.context-5.3.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 378 |
+
setuptools/_vendor/jaraco.context-5.3.0.dist-info/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
|
| 379 |
+
setuptools/_vendor/jaraco.context-5.3.0.dist-info/METADATA,sha256=xDtguJej0tN9iEXCUvxEJh2a7xceIRVBEakBLSr__tY,4020
|
| 380 |
+
setuptools/_vendor/jaraco.context-5.3.0.dist-info/RECORD,sha256=VRl7iKeEQyl7stgnp1uq50CzOJYlHYcoNdS0x17C9X4,641
|
| 381 |
+
setuptools/_vendor/jaraco.context-5.3.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
| 382 |
+
setuptools/_vendor/jaraco.context-5.3.0.dist-info/top_level.txt,sha256=0JnN3LfXH4LIRfXL-QFOGCJzQWZO3ELx4R1d_louoQM,7
|
| 383 |
+
setuptools/_vendor/jaraco.functools-4.0.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 384 |
+
setuptools/_vendor/jaraco.functools-4.0.1.dist-info/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
|
| 385 |
+
setuptools/_vendor/jaraco.functools-4.0.1.dist-info/METADATA,sha256=i4aUaQDX-jjdEQK5wevhegyx8JyLfin2HyvaSk3FHso,2891
|
| 386 |
+
setuptools/_vendor/jaraco.functools-4.0.1.dist-info/RECORD,sha256=YyqnwE98S8wBwCevW5vHb-iVj0oYEDW5V6O9MBS6JIs,843
|
| 387 |
+
setuptools/_vendor/jaraco.functools-4.0.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
| 388 |
+
setuptools/_vendor/jaraco.functools-4.0.1.dist-info/top_level.txt,sha256=0JnN3LfXH4LIRfXL-QFOGCJzQWZO3ELx4R1d_louoQM,7
|
| 389 |
+
setuptools/_vendor/jaraco.text-3.12.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 390 |
+
setuptools/_vendor/jaraco.text-3.12.1.dist-info/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
|
| 391 |
+
setuptools/_vendor/jaraco.text-3.12.1.dist-info/METADATA,sha256=AzWdm6ViMfDOPoQMfLWn2zgBQSGJScyqeN29TcuWXVI,3658
|
| 392 |
+
setuptools/_vendor/jaraco.text-3.12.1.dist-info/RECORD,sha256=gW2UV0HcokYJk4jKPu10_AZnrLqjb3C1WbJJTDl5sfY,1500
|
| 393 |
+
setuptools/_vendor/jaraco.text-3.12.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 394 |
+
setuptools/_vendor/jaraco.text-3.12.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
| 395 |
+
setuptools/_vendor/jaraco.text-3.12.1.dist-info/top_level.txt,sha256=0JnN3LfXH4LIRfXL-QFOGCJzQWZO3ELx4R1d_louoQM,7
|
| 396 |
+
setuptools/_vendor/jaraco/__pycache__/context.cpython-311.pyc,,
|
| 397 |
+
setuptools/_vendor/jaraco/collections/__init__.py,sha256=Pc1-SqjWm81ad1P0-GttpkwO_LWlnaY6gUq8gcKh2v0,26640
|
| 398 |
+
setuptools/_vendor/jaraco/collections/__pycache__/__init__.cpython-311.pyc,,
|
| 399 |
+
setuptools/_vendor/jaraco/collections/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 400 |
+
setuptools/_vendor/jaraco/context.py,sha256=REoLIxDkO5MfEYowt_WoupNCRoxBS5v7YX2PbW8lIcs,9552
|
| 401 |
+
setuptools/_vendor/jaraco/functools/__init__.py,sha256=hEAJaS2uSZRuF_JY4CxCHIYh79ZpxaPp9OiHyr9EJ1w,16642
|
| 402 |
+
setuptools/_vendor/jaraco/functools/__init__.pyi,sha256=gk3dsgHzo5F_U74HzAvpNivFAPCkPJ1b2-yCd62dfnw,3878
|
| 403 |
+
setuptools/_vendor/jaraco/functools/__pycache__/__init__.cpython-311.pyc,,
|
| 404 |
+
setuptools/_vendor/jaraco/functools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 405 |
+
setuptools/_vendor/jaraco/text/Lorem ipsum.txt,sha256=N_7c_79zxOufBY9HZ3yzMgOkNv-TkOTTio4BydrSjgs,1335
|
| 406 |
+
setuptools/_vendor/jaraco/text/__init__.py,sha256=Y2YUqXR_orUoDaY4SkPRe6ZZhb5HUHB_Ah9RCNsVyho,16250
|
| 407 |
+
setuptools/_vendor/jaraco/text/__pycache__/__init__.cpython-311.pyc,,
|
| 408 |
+
setuptools/_vendor/jaraco/text/__pycache__/layouts.cpython-311.pyc,,
|
| 409 |
+
setuptools/_vendor/jaraco/text/__pycache__/show-newlines.cpython-311.pyc,,
|
| 410 |
+
setuptools/_vendor/jaraco/text/__pycache__/strip-prefix.cpython-311.pyc,,
|
| 411 |
+
setuptools/_vendor/jaraco/text/__pycache__/to-dvorak.cpython-311.pyc,,
|
| 412 |
+
setuptools/_vendor/jaraco/text/__pycache__/to-qwerty.cpython-311.pyc,,
|
| 413 |
+
setuptools/_vendor/jaraco/text/layouts.py,sha256=HTC8aSTLZ7uXipyOXapRMC158juecjK6RVwitfmZ9_w,643
|
| 414 |
+
setuptools/_vendor/jaraco/text/show-newlines.py,sha256=WGQa65e8lyhb92LUOLqVn6KaCtoeVgVws6WtSRmLk6w,904
|
| 415 |
+
setuptools/_vendor/jaraco/text/strip-prefix.py,sha256=NfVXV8JVNo6nqcuYASfMV7_y4Eo8zMQqlCOGvAnRIVw,412
|
| 416 |
+
setuptools/_vendor/jaraco/text/to-dvorak.py,sha256=1SNcbSsvISpXXg-LnybIHHY-RUFOQr36zcHkY1pWFqw,119
|
| 417 |
+
setuptools/_vendor/jaraco/text/to-qwerty.py,sha256=s4UMQUnPwFn_dB5uZC27BurHOQcYondBfzIpVL5pEzw,119
|
| 418 |
+
setuptools/_vendor/more_itertools-10.3.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 419 |
+
setuptools/_vendor/more_itertools-10.3.0.dist-info/LICENSE,sha256=CfHIyelBrz5YTVlkHqm4fYPAyw_QB-te85Gn4mQ8GkY,1053
|
| 420 |
+
setuptools/_vendor/more_itertools-10.3.0.dist-info/METADATA,sha256=BFO90O-fLNiVQMpj7oIS5ztzgJUUQZ3TA32P5HH3N-A,36293
|
| 421 |
+
setuptools/_vendor/more_itertools-10.3.0.dist-info/RECORD,sha256=d8jnPgGNwP1-ntbICwWkQEVF9kH7CFIgzkKzaLWao9M,1259
|
| 422 |
+
setuptools/_vendor/more_itertools-10.3.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 423 |
+
setuptools/_vendor/more_itertools-10.3.0.dist-info/WHEEL,sha256=rSgq_JpHF9fHR1lx53qwg_1-2LypZE_qmcuXbVUq948,81
|
| 424 |
+
setuptools/_vendor/more_itertools/__init__.py,sha256=dtAbGjTDmn_ghiU5YXfhyDy0phAlXVdt5klZA5fUa-Q,149
|
| 425 |
+
setuptools/_vendor/more_itertools/__init__.pyi,sha256=5B3eTzON1BBuOLob1vCflyEb2lSd6usXQQ-Cv-hXkeA,43
|
| 426 |
+
setuptools/_vendor/more_itertools/__pycache__/__init__.cpython-311.pyc,,
|
| 427 |
+
setuptools/_vendor/more_itertools/__pycache__/more.cpython-311.pyc,,
|
| 428 |
+
setuptools/_vendor/more_itertools/__pycache__/recipes.cpython-311.pyc,,
|
| 429 |
+
setuptools/_vendor/more_itertools/more.py,sha256=1E5kzFncRKTDw0cYv1yRXMgDdunstLQd1QStcnL6U90,148370
|
| 430 |
+
setuptools/_vendor/more_itertools/more.pyi,sha256=iXXeqt48Nxe8VGmIWpkVXuKpR2FYNuu2DU8nQLWCCu0,21484
|
| 431 |
+
setuptools/_vendor/more_itertools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 432 |
+
setuptools/_vendor/more_itertools/recipes.py,sha256=WedhhfhGVgr6zii8fIbGJVmRTw0ZKRiLKnYBDGJv4nY,28591
|
| 433 |
+
setuptools/_vendor/more_itertools/recipes.pyi,sha256=T_mdGpcFdfrP3JSWbwzYP9JyNV-Go-7RPfpxfftAWlA,4617
|
| 434 |
+
setuptools/_vendor/packaging-24.2.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2
|
| 435 |
+
setuptools/_vendor/packaging-24.2.dist-info/LICENSE,sha256=ytHvW9NA1z4HS6YU0m996spceUDD2MNIUuZcSQlobEg,197
|
| 436 |
+
setuptools/_vendor/packaging-24.2.dist-info/LICENSE.APACHE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
|
| 437 |
+
setuptools/_vendor/packaging-24.2.dist-info/LICENSE.BSD,sha256=tw5-m3QvHMb5SLNMFqo5_-zpQZY2S8iP8NIYDwAo-sU,1344
|
| 438 |
+
setuptools/_vendor/packaging-24.2.dist-info/METADATA,sha256=ohH86s6k5mIfQxY2TS0LcSfADeOFa4BiCC-bxZV-pNs,3204
|
| 439 |
+
setuptools/_vendor/packaging-24.2.dist-info/RECORD,sha256=Y4DrXM0KY0ArfzhbAEa1LYFPwW3WEgEeL4iCqXe-A-M,2009
|
| 440 |
+
setuptools/_vendor/packaging-24.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 441 |
+
setuptools/_vendor/packaging-24.2.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
| 442 |
+
setuptools/_vendor/packaging/__init__.py,sha256=dk4Ta_vmdVJxYHDcfyhvQNw8V3PgSBomKNXqg-D2JDY,494
|
| 443 |
+
setuptools/_vendor/packaging/__pycache__/__init__.cpython-311.pyc,,
|
| 444 |
+
setuptools/_vendor/packaging/__pycache__/_elffile.cpython-311.pyc,,
|
| 445 |
+
setuptools/_vendor/packaging/__pycache__/_manylinux.cpython-311.pyc,,
|
| 446 |
+
setuptools/_vendor/packaging/__pycache__/_musllinux.cpython-311.pyc,,
|
| 447 |
+
setuptools/_vendor/packaging/__pycache__/_parser.cpython-311.pyc,,
|
| 448 |
+
setuptools/_vendor/packaging/__pycache__/_structures.cpython-311.pyc,,
|
| 449 |
+
setuptools/_vendor/packaging/__pycache__/_tokenizer.cpython-311.pyc,,
|
| 450 |
+
setuptools/_vendor/packaging/__pycache__/markers.cpython-311.pyc,,
|
| 451 |
+
setuptools/_vendor/packaging/__pycache__/metadata.cpython-311.pyc,,
|
| 452 |
+
setuptools/_vendor/packaging/__pycache__/requirements.cpython-311.pyc,,
|
| 453 |
+
setuptools/_vendor/packaging/__pycache__/specifiers.cpython-311.pyc,,
|
| 454 |
+
setuptools/_vendor/packaging/__pycache__/tags.cpython-311.pyc,,
|
| 455 |
+
setuptools/_vendor/packaging/__pycache__/utils.cpython-311.pyc,,
|
| 456 |
+
setuptools/_vendor/packaging/__pycache__/version.cpython-311.pyc,,
|
| 457 |
+
setuptools/_vendor/packaging/_elffile.py,sha256=cflAQAkE25tzhYmq_aCi72QfbT_tn891tPzfpbeHOwE,3306
|
| 458 |
+
setuptools/_vendor/packaging/_manylinux.py,sha256=vl5OCoz4kx80H5rwXKeXWjl9WNISGmr4ZgTpTP9lU9c,9612
|
| 459 |
+
setuptools/_vendor/packaging/_musllinux.py,sha256=p9ZqNYiOItGee8KcZFeHF_YcdhVwGHdK6r-8lgixvGQ,2694
|
| 460 |
+
setuptools/_vendor/packaging/_parser.py,sha256=s_TvTvDNK0NrM2QB3VKThdWFM4Nc0P6JnkObkl3MjpM,10236
|
| 461 |
+
setuptools/_vendor/packaging/_structures.py,sha256=q3eVNmbWJGG_S0Dit_S3Ao8qQqz_5PYTXFAKBZe5yr4,1431
|
| 462 |
+
setuptools/_vendor/packaging/_tokenizer.py,sha256=J6v5H7Jzvb-g81xp_2QACKwO7LxHQA6ikryMU7zXwN8,5273
|
| 463 |
+
setuptools/_vendor/packaging/licenses/__init__.py,sha256=1x5M1nEYjcgwEbLt0dXwz2ukjr18DiCzC0sraQqJ-Ww,5715
|
| 464 |
+
setuptools/_vendor/packaging/licenses/__pycache__/__init__.cpython-311.pyc,,
|
| 465 |
+
setuptools/_vendor/packaging/licenses/__pycache__/_spdx.cpython-311.pyc,,
|
| 466 |
+
setuptools/_vendor/packaging/licenses/_spdx.py,sha256=oAm1ztPFwlsmCKe7lAAsv_OIOfS1cWDu9bNBkeu-2ns,48398
|
| 467 |
+
setuptools/_vendor/packaging/markers.py,sha256=c89TNzB7ZdGYhkovm6PYmqGyHxXlYVaLW591PHUNKD8,10561
|
| 468 |
+
setuptools/_vendor/packaging/metadata.py,sha256=YJibM7GYe4re8-0a3OlXmGS-XDgTEoO4tlBt2q25Bng,34762
|
| 469 |
+
setuptools/_vendor/packaging/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 470 |
+
setuptools/_vendor/packaging/requirements.py,sha256=gYyRSAdbrIyKDY66ugIDUQjRMvxkH2ALioTmX3tnL6o,2947
|
| 471 |
+
setuptools/_vendor/packaging/specifiers.py,sha256=GG1wPNMcL0fMJO68vF53wKMdwnfehDcaI-r9NpTfilA,40074
|
| 472 |
+
setuptools/_vendor/packaging/tags.py,sha256=CFqrJzAzc2XNGexerH__T-Y5Iwq7WbsYXsiLERLWxY0,21014
|
| 473 |
+
setuptools/_vendor/packaging/utils.py,sha256=0F3Hh9OFuRgrhTgGZUl5K22Fv1YP2tZl1z_2gO6kJiA,5050
|
| 474 |
+
setuptools/_vendor/packaging/version.py,sha256=olfyuk_DPbflNkJ4wBWetXQ17c74x3DB501degUv7DY,16676
|
| 475 |
+
setuptools/_vendor/platformdirs-4.2.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 476 |
+
setuptools/_vendor/platformdirs-4.2.2.dist-info/METADATA,sha256=zmsie01G1MtXR0wgIv5XpVeTO7idr0WWvfmxKsKWuGk,11429
|
| 477 |
+
setuptools/_vendor/platformdirs-4.2.2.dist-info/RECORD,sha256=TCEddtQu1A78Os_Mhm2JEqcYr7yit-UYSUQjZtbpn-g,1642
|
| 478 |
+
setuptools/_vendor/platformdirs-4.2.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 479 |
+
setuptools/_vendor/platformdirs-4.2.2.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
| 480 |
+
setuptools/_vendor/platformdirs-4.2.2.dist-info/licenses/LICENSE,sha256=KeD9YukphQ6G6yjD_czwzv30-pSHkBHP-z0NS-1tTbY,1089
|
| 481 |
+
setuptools/_vendor/platformdirs/__init__.py,sha256=EMGE8qeHRR9CzDFr8kL3tA8hdZZniYjXBVZd0UGTWK0,22225
|
| 482 |
+
setuptools/_vendor/platformdirs/__main__.py,sha256=HnsUQHpiBaiTxwcmwVw-nFaPdVNZtQIdi1eWDtI-MzI,1493
|
| 483 |
+
setuptools/_vendor/platformdirs/__pycache__/__init__.cpython-311.pyc,,
|
| 484 |
+
setuptools/_vendor/platformdirs/__pycache__/__main__.cpython-311.pyc,,
|
| 485 |
+
setuptools/_vendor/platformdirs/__pycache__/android.cpython-311.pyc,,
|
| 486 |
+
setuptools/_vendor/platformdirs/__pycache__/api.cpython-311.pyc,,
|
| 487 |
+
setuptools/_vendor/platformdirs/__pycache__/macos.cpython-311.pyc,,
|
| 488 |
+
setuptools/_vendor/platformdirs/__pycache__/unix.cpython-311.pyc,,
|
| 489 |
+
setuptools/_vendor/platformdirs/__pycache__/version.cpython-311.pyc,,
|
| 490 |
+
setuptools/_vendor/platformdirs/__pycache__/windows.cpython-311.pyc,,
|
| 491 |
+
setuptools/_vendor/platformdirs/android.py,sha256=xZXY9Jd46WOsxT2U6-5HsNtDZ-IQqxcEUrBLl3hYk4o,9016
|
| 492 |
+
setuptools/_vendor/platformdirs/api.py,sha256=QBYdUac2eC521ek_y53uD1Dcq-lJX8IgSRVd4InC6uc,8996
|
| 493 |
+
setuptools/_vendor/platformdirs/macos.py,sha256=wftsbsvq6nZ0WORXSiCrZNkRHz_WKuktl0a6mC7MFkI,5580
|
| 494 |
+
setuptools/_vendor/platformdirs/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 495 |
+
setuptools/_vendor/platformdirs/unix.py,sha256=Cci9Wqt35dAMsg6HT9nRGHSBW5obb0pR3AE1JJnsCXg,10643
|
| 496 |
+
setuptools/_vendor/platformdirs/version.py,sha256=r7F76tZRjgQKzrpx_I0_ZMQOMU-PS7eGnHD7zEK3KB0,411
|
| 497 |
+
setuptools/_vendor/platformdirs/windows.py,sha256=IFpiohUBwxPtCzlyKwNtxyW4Jk8haa6W8o59mfrDXVo,10125
|
| 498 |
+
setuptools/_vendor/tomli-2.0.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 499 |
+
setuptools/_vendor/tomli-2.0.1.dist-info/LICENSE,sha256=uAgWsNUwuKzLTCIReDeQmEpuO2GSLCte6S8zcqsnQv4,1072
|
| 500 |
+
setuptools/_vendor/tomli-2.0.1.dist-info/METADATA,sha256=zPDceKmPwJGLWtZykrHixL7WVXWmJGzZ1jyRT5lCoPI,8875
|
| 501 |
+
setuptools/_vendor/tomli-2.0.1.dist-info/RECORD,sha256=DLn5pFGh42WsVLTIhmLh2gy1SnLRalJY-wq_-dPhwCI,999
|
| 502 |
+
setuptools/_vendor/tomli-2.0.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 503 |
+
setuptools/_vendor/tomli-2.0.1.dist-info/WHEEL,sha256=jPMR_Dzkc4X4icQtmz81lnNY_kAsfog7ry7qoRvYLXw,81
|
| 504 |
+
setuptools/_vendor/tomli/__init__.py,sha256=JhUwV66DB1g4Hvt1UQCVMdfCu-IgAV8FXmvDU9onxd4,396
|
| 505 |
+
setuptools/_vendor/tomli/__pycache__/__init__.cpython-311.pyc,,
|
| 506 |
+
setuptools/_vendor/tomli/__pycache__/_parser.cpython-311.pyc,,
|
| 507 |
+
setuptools/_vendor/tomli/__pycache__/_re.cpython-311.pyc,,
|
| 508 |
+
setuptools/_vendor/tomli/__pycache__/_types.cpython-311.pyc,,
|
| 509 |
+
setuptools/_vendor/tomli/_parser.py,sha256=g9-ENaALS-B8dokYpCuzUFalWlog7T-SIYMjLZSWrtM,22633
|
| 510 |
+
setuptools/_vendor/tomli/_re.py,sha256=dbjg5ChZT23Ka9z9DHOXfdtSpPwUfdgMXnj8NOoly-w,2943
|
| 511 |
+
setuptools/_vendor/tomli/_types.py,sha256=-GTG2VUqkpxwMqzmVO4F7ybKddIbAnuAHXfmWQcTi3Q,254
|
| 512 |
+
setuptools/_vendor/tomli/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
|
| 513 |
+
setuptools/_vendor/typeguard-4.3.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 514 |
+
setuptools/_vendor/typeguard-4.3.0.dist-info/LICENSE,sha256=YWP3mH37ONa8MgzitwsvArhivEESZRbVUu8c1DJH51g,1130
|
| 515 |
+
setuptools/_vendor/typeguard-4.3.0.dist-info/METADATA,sha256=z2dcHAp0TwhYCFU5Deh8x31nazElgujUz9tbuP0pjSE,3717
|
| 516 |
+
setuptools/_vendor/typeguard-4.3.0.dist-info/RECORD,sha256=SKUZWVgkeDUidUKM7s1473fXmsna55bjmi6vJUAoJVI,2402
|
| 517 |
+
setuptools/_vendor/typeguard-4.3.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
| 518 |
+
setuptools/_vendor/typeguard-4.3.0.dist-info/entry_points.txt,sha256=qp7NQ1aLtiSgMQqo6gWlfGpy0IIXzoMJmeQTLpzqFZQ,48
|
| 519 |
+
setuptools/_vendor/typeguard-4.3.0.dist-info/top_level.txt,sha256=4z28AhuDodwRS_c1J_l8H51t5QuwfTseskYzlxp6grs,10
|
| 520 |
+
setuptools/_vendor/typeguard/__init__.py,sha256=Onh4w38elPCjtlcU3JY9k3h70NjsxXIkAflmQn-Z0FY,2071
|
| 521 |
+
setuptools/_vendor/typeguard/__pycache__/__init__.cpython-311.pyc,,
|
| 522 |
+
setuptools/_vendor/typeguard/__pycache__/_checkers.cpython-311.pyc,,
|
| 523 |
+
setuptools/_vendor/typeguard/__pycache__/_config.cpython-311.pyc,,
|
| 524 |
+
setuptools/_vendor/typeguard/__pycache__/_decorators.cpython-311.pyc,,
|
| 525 |
+
setuptools/_vendor/typeguard/__pycache__/_exceptions.cpython-311.pyc,,
|
| 526 |
+
setuptools/_vendor/typeguard/__pycache__/_functions.cpython-311.pyc,,
|
| 527 |
+
setuptools/_vendor/typeguard/__pycache__/_importhook.cpython-311.pyc,,
|
| 528 |
+
setuptools/_vendor/typeguard/__pycache__/_memo.cpython-311.pyc,,
|
| 529 |
+
setuptools/_vendor/typeguard/__pycache__/_pytest_plugin.cpython-311.pyc,,
|
| 530 |
+
setuptools/_vendor/typeguard/__pycache__/_suppression.cpython-311.pyc,,
|
| 531 |
+
setuptools/_vendor/typeguard/__pycache__/_transformer.cpython-311.pyc,,
|
| 532 |
+
setuptools/_vendor/typeguard/__pycache__/_union_transformer.cpython-311.pyc,,
|
| 533 |
+
setuptools/_vendor/typeguard/__pycache__/_utils.cpython-311.pyc,,
|
| 534 |
+
setuptools/_vendor/typeguard/_checkers.py,sha256=JRrgKicdOEfIBoNEtegYCEIlhpad-a1u1Em7GCj0WCI,31360
|
| 535 |
+
setuptools/_vendor/typeguard/_config.py,sha256=nIz8QwDa-oFO3L9O8_6srzlmd99pSby2wOM4Wb7F_B0,2846
|
| 536 |
+
setuptools/_vendor/typeguard/_decorators.py,sha256=v6dsIeWvPhExGLP_wXF-RmDUyjZf_Ak28g7gBJ_v0-0,9033
|
| 537 |
+
setuptools/_vendor/typeguard/_exceptions.py,sha256=ZIPeiV-FBd5Emw2EaWd2Fvlsrwi4ocwT2fVGBIAtHcQ,1121
|
| 538 |
+
setuptools/_vendor/typeguard/_functions.py,sha256=ibgSAKa5ptIm1eR9ARG0BSozAFJPFNASZqhPVyQeqig,10393
|
| 539 |
+
setuptools/_vendor/typeguard/_importhook.py,sha256=ugjCDvFcdWMU7UugqlJG91IpVNpEIxtRr-99s0h1k7M,6389
|
| 540 |
+
setuptools/_vendor/typeguard/_memo.py,sha256=1juQV_vxnD2JYKbSrebiQuj4oKHz6n67v9pYA-CCISg,1303
|
| 541 |
+
setuptools/_vendor/typeguard/_pytest_plugin.py,sha256=-fcSqkv54rIfIF8pDavY5YQPkj4OX8GMt_lL7CQSD4I,4416
|
| 542 |
+
setuptools/_vendor/typeguard/_suppression.py,sha256=VQfzxcwIbu3if0f7VBkKM7hkYOA7tNFw9a7jMBsmMg4,2266
|
| 543 |
+
setuptools/_vendor/typeguard/_transformer.py,sha256=9Ha7_QhdwoUni_6hvdY-hZbuEergowHrNL2vzHIakFY,44937
|
| 544 |
+
setuptools/_vendor/typeguard/_union_transformer.py,sha256=v_42r7-6HuRX2SoFwnyJ-E5PlxXpVeUJPJR1-HU9qSo,1354
|
| 545 |
+
setuptools/_vendor/typeguard/_utils.py,sha256=5HhO1rPn5f1M6ymkVAEv7Xmlz1cX-j0OnTMlyHqqrR8,5270
|
| 546 |
+
setuptools/_vendor/typeguard/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 547 |
+
setuptools/_vendor/typing_extensions-4.12.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 548 |
+
setuptools/_vendor/typing_extensions-4.12.2.dist-info/LICENSE,sha256=Oy-B_iHRgcSZxZolbI4ZaEVdZonSaaqFNzv7avQdo78,13936
|
| 549 |
+
setuptools/_vendor/typing_extensions-4.12.2.dist-info/METADATA,sha256=BeUQIa8cnYbrjWx-N8TOznM9UGW5Gm2DicVpDtRA8W0,3018
|
| 550 |
+
setuptools/_vendor/typing_extensions-4.12.2.dist-info/RECORD,sha256=dxAALYGXHmMqpqL8M9xddKr118quIgQKZdPjFQOwXuk,571
|
| 551 |
+
setuptools/_vendor/typing_extensions-4.12.2.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
| 552 |
+
setuptools/_vendor/typing_extensions.py,sha256=gwekpyG9DVG3lxWKX4ni8u7nk3We5slG98mA9F3DJQw,134451
|
| 553 |
+
setuptools/_vendor/wheel-0.45.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 554 |
+
setuptools/_vendor/wheel-0.45.1.dist-info/LICENSE.txt,sha256=MMI2GGeRCPPo6h0qZYx8pBe9_IkcmO8aifpP8MmChlQ,1107
|
| 555 |
+
setuptools/_vendor/wheel-0.45.1.dist-info/METADATA,sha256=mKz84H7m7jsxJyzeIcTVORiTb0NPMV39KvOIYhGgmjA,2313
|
| 556 |
+
setuptools/_vendor/wheel-0.45.1.dist-info/RECORD,sha256=1jnxrHyZPDcVvULyfGFhiba4Z5L9_RsXr9dxcNbhaYQ,4900
|
| 557 |
+
setuptools/_vendor/wheel-0.45.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 558 |
+
setuptools/_vendor/wheel-0.45.1.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
| 559 |
+
setuptools/_vendor/wheel-0.45.1.dist-info/entry_points.txt,sha256=rTY1BbkPHhkGMm4Q3F0pIzJBzW2kMxoG1oriffvGdA0,104
|
| 560 |
+
setuptools/_vendor/wheel/__init__.py,sha256=mrxMnvdXACur_LWegbUfh5g5ysWZrd63UJn890wvGNk,59
|
| 561 |
+
setuptools/_vendor/wheel/__main__.py,sha256=NkMUnuTCGcOkgY0IBLgBCVC_BGGcWORx2K8jYGS12UE,455
|
| 562 |
+
setuptools/_vendor/wheel/__pycache__/__init__.cpython-311.pyc,,
|
| 563 |
+
setuptools/_vendor/wheel/__pycache__/__main__.cpython-311.pyc,,
|
| 564 |
+
setuptools/_vendor/wheel/__pycache__/_bdist_wheel.cpython-311.pyc,,
|
| 565 |
+
setuptools/_vendor/wheel/__pycache__/_setuptools_logging.cpython-311.pyc,,
|
| 566 |
+
setuptools/_vendor/wheel/__pycache__/bdist_wheel.cpython-311.pyc,,
|
| 567 |
+
setuptools/_vendor/wheel/__pycache__/macosx_libfile.cpython-311.pyc,,
|
| 568 |
+
setuptools/_vendor/wheel/__pycache__/metadata.cpython-311.pyc,,
|
| 569 |
+
setuptools/_vendor/wheel/__pycache__/util.cpython-311.pyc,,
|
| 570 |
+
setuptools/_vendor/wheel/__pycache__/wheelfile.cpython-311.pyc,,
|
| 571 |
+
setuptools/_vendor/wheel/_bdist_wheel.py,sha256=UghCQjSH_pVfcZh6oRjzSw_TQhcf3anSx1OkiLSL82M,21694
|
| 572 |
+
setuptools/_vendor/wheel/_setuptools_logging.py,sha256=-5KC-lne0ilOUWIDfOkqapUWGMFZhuKYDIavIZiB5kM,781
|
| 573 |
+
setuptools/_vendor/wheel/bdist_wheel.py,sha256=tpf9WufiSO1RuEMg5oPhIfSG8DMziCZ_4muCKF69Cqo,1107
|
| 574 |
+
setuptools/_vendor/wheel/cli/__init__.py,sha256=Npq6_jKi03dhIcRnmbuFhwviVJxwO0tYEnEhWMv9cJo,4402
|
| 575 |
+
setuptools/_vendor/wheel/cli/__pycache__/__init__.cpython-311.pyc,,
|
| 576 |
+
setuptools/_vendor/wheel/cli/__pycache__/convert.cpython-311.pyc,,
|
| 577 |
+
setuptools/_vendor/wheel/cli/__pycache__/pack.cpython-311.pyc,,
|
| 578 |
+
setuptools/_vendor/wheel/cli/__pycache__/tags.cpython-311.pyc,,
|
| 579 |
+
setuptools/_vendor/wheel/cli/__pycache__/unpack.cpython-311.pyc,,
|
| 580 |
+
setuptools/_vendor/wheel/cli/convert.py,sha256=Bi0ntEXb9nTllCxWeTRQ4j-nPs3szWSEKipG_GgnMkQ,12634
|
| 581 |
+
setuptools/_vendor/wheel/cli/pack.py,sha256=CAFcHdBVulvsHYJlndKVO7KMI9JqBTZz5ii0PKxxCOs,3103
|
| 582 |
+
setuptools/_vendor/wheel/cli/tags.py,sha256=lHw-LaWrkS5Jy_qWcw-6pSjeNM6yAjDnqKI3E5JTTCU,4760
|
| 583 |
+
setuptools/_vendor/wheel/cli/unpack.py,sha256=Y_J7ynxPSoFFTT7H0fMgbBlVErwyDGcObgme5MBuz58,1021
|
| 584 |
+
setuptools/_vendor/wheel/macosx_libfile.py,sha256=k1x7CE3LPtOVGqj6NXQ1nTGYVPaeRrhVzUG_KPq3zDs,16572
|
| 585 |
+
setuptools/_vendor/wheel/metadata.py,sha256=JC4p7jlQZu2bUTAQ2fevkqLjg_X6gnNyRhLn6OUO1tc,6171
|
| 586 |
+
setuptools/_vendor/wheel/util.py,sha256=aL7aibHwYUgfc8WlolL5tXdkV4DatbJxZHb1kwHFJAU,423
|
| 587 |
+
setuptools/_vendor/wheel/vendored/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 588 |
+
setuptools/_vendor/wheel/vendored/__pycache__/__init__.cpython-311.pyc,,
|
| 589 |
+
setuptools/_vendor/wheel/vendored/packaging/LICENSE,sha256=ytHvW9NA1z4HS6YU0m996spceUDD2MNIUuZcSQlobEg,197
|
| 590 |
+
setuptools/_vendor/wheel/vendored/packaging/LICENSE.APACHE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
|
| 591 |
+
setuptools/_vendor/wheel/vendored/packaging/LICENSE.BSD,sha256=tw5-m3QvHMb5SLNMFqo5_-zpQZY2S8iP8NIYDwAo-sU,1344
|
| 592 |
+
setuptools/_vendor/wheel/vendored/packaging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 593 |
+
setuptools/_vendor/wheel/vendored/packaging/__pycache__/__init__.cpython-311.pyc,,
|
| 594 |
+
setuptools/_vendor/wheel/vendored/packaging/__pycache__/_elffile.cpython-311.pyc,,
|
| 595 |
+
setuptools/_vendor/wheel/vendored/packaging/__pycache__/_manylinux.cpython-311.pyc,,
|
| 596 |
+
setuptools/_vendor/wheel/vendored/packaging/__pycache__/_musllinux.cpython-311.pyc,,
|
| 597 |
+
setuptools/_vendor/wheel/vendored/packaging/__pycache__/_parser.cpython-311.pyc,,
|
| 598 |
+
setuptools/_vendor/wheel/vendored/packaging/__pycache__/_structures.cpython-311.pyc,,
|
| 599 |
+
setuptools/_vendor/wheel/vendored/packaging/__pycache__/_tokenizer.cpython-311.pyc,,
|
| 600 |
+
setuptools/_vendor/wheel/vendored/packaging/__pycache__/markers.cpython-311.pyc,,
|
| 601 |
+
setuptools/_vendor/wheel/vendored/packaging/__pycache__/requirements.cpython-311.pyc,,
|
| 602 |
+
setuptools/_vendor/wheel/vendored/packaging/__pycache__/specifiers.cpython-311.pyc,,
|
| 603 |
+
setuptools/_vendor/wheel/vendored/packaging/__pycache__/tags.cpython-311.pyc,,
|
| 604 |
+
setuptools/_vendor/wheel/vendored/packaging/__pycache__/utils.cpython-311.pyc,,
|
| 605 |
+
setuptools/_vendor/wheel/vendored/packaging/__pycache__/version.cpython-311.pyc,,
|
| 606 |
+
setuptools/_vendor/wheel/vendored/packaging/_elffile.py,sha256=hbmK8OD6Z7fY6hwinHEUcD1by7czkGiNYu7ShnFEk2k,3266
|
| 607 |
+
setuptools/_vendor/wheel/vendored/packaging/_manylinux.py,sha256=P7sdR5_7XBY09LVYYPhHmydMJIIwPXWsh4olk74Uuj4,9588
|
| 608 |
+
setuptools/_vendor/wheel/vendored/packaging/_musllinux.py,sha256=z1s8To2hQ0vpn_d-O2i5qxGwEK8WmGlLt3d_26V7NeY,2674
|
| 609 |
+
setuptools/_vendor/wheel/vendored/packaging/_parser.py,sha256=4tT4emSl2qTaU7VTQE1Xa9o1jMPCsBezsYBxyNMUN-s,10347
|
| 610 |
+
setuptools/_vendor/wheel/vendored/packaging/_structures.py,sha256=q3eVNmbWJGG_S0Dit_S3Ao8qQqz_5PYTXFAKBZe5yr4,1431
|
| 611 |
+
setuptools/_vendor/wheel/vendored/packaging/_tokenizer.py,sha256=alCtbwXhOFAmFGZ6BQ-wCTSFoRAJ2z-ysIf7__MTJ_k,5292
|
| 612 |
+
setuptools/_vendor/wheel/vendored/packaging/markers.py,sha256=_TSPI1BhJYO7Bp9AzTmHQxIqHEVXaTjmDh9G-w8qzPA,8232
|
| 613 |
+
setuptools/_vendor/wheel/vendored/packaging/requirements.py,sha256=dgoBeVprPu2YE6Q8nGfwOPTjATHbRa_ZGLyXhFEln6Q,2933
|
| 614 |
+
setuptools/_vendor/wheel/vendored/packaging/specifiers.py,sha256=IWSt0SrLSP72heWhAC8UL0eGvas7XIQHjqiViVfmPKE,39778
|
| 615 |
+
setuptools/_vendor/wheel/vendored/packaging/tags.py,sha256=fedHXiOHkBxNZTXotXv8uXPmMFU9ae-TKBujgYHigcA,18950
|
| 616 |
+
setuptools/_vendor/wheel/vendored/packaging/utils.py,sha256=XgdmP3yx9-wQEFjO7OvMj9RjEf5JlR5HFFR69v7SQ9E,5268
|
| 617 |
+
setuptools/_vendor/wheel/vendored/packaging/version.py,sha256=PFJaYZDxBgyxkfYhH3SQw4qfE9ICCWrTmitvq14y3bs,16234
|
| 618 |
+
setuptools/_vendor/wheel/vendored/vendor.txt,sha256=Z2ENjB1i5prfez8CdM1Sdr3c6Zxv2rRRolMpLmBncAE,16
|
| 619 |
+
setuptools/_vendor/wheel/wheelfile.py,sha256=USCttNlJwafxt51YYFFKG7jnxz8dfhbyqAZL6jMTA9s,8411
|
| 620 |
+
setuptools/_vendor/zipp-3.19.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 621 |
+
setuptools/_vendor/zipp-3.19.2.dist-info/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
|
| 622 |
+
setuptools/_vendor/zipp-3.19.2.dist-info/METADATA,sha256=UIrk_kMIHGSwsKKChYizqMw0MMZpPRZ2ZiVpQAsN_bE,3575
|
| 623 |
+
setuptools/_vendor/zipp-3.19.2.dist-info/RECORD,sha256=8xby4D_ZrefrvAsVRwaEjiu4_VaLkJNRCfDY484rm_4,1039
|
| 624 |
+
setuptools/_vendor/zipp-3.19.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 625 |
+
setuptools/_vendor/zipp-3.19.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
| 626 |
+
setuptools/_vendor/zipp-3.19.2.dist-info/top_level.txt,sha256=iAbdoSHfaGqBfVb2XuR9JqSQHCoOsOtG6y9C_LSpqFw,5
|
| 627 |
+
setuptools/_vendor/zipp/__init__.py,sha256=QuI1g00G4fRAcGt-HqbV0oWIkmSgedCGGYsHHYzNa8A,13412
|
| 628 |
+
setuptools/_vendor/zipp/__pycache__/__init__.cpython-311.pyc,,
|
| 629 |
+
setuptools/_vendor/zipp/__pycache__/glob.cpython-311.pyc,,
|
| 630 |
+
setuptools/_vendor/zipp/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 631 |
+
setuptools/_vendor/zipp/compat/__pycache__/__init__.cpython-311.pyc,,
|
| 632 |
+
setuptools/_vendor/zipp/compat/__pycache__/py310.cpython-311.pyc,,
|
| 633 |
+
setuptools/_vendor/zipp/compat/py310.py,sha256=eZpkW0zRtunkhEh8jjX3gCGe22emoKCBJw72Zt4RkhA,219
|
| 634 |
+
setuptools/_vendor/zipp/glob.py,sha256=etWpnfEoRyfUvrUsi6sTiGmErvPwe6HzY6pT8jg_lUI,3082
|
| 635 |
+
setuptools/archive_util.py,sha256=Tl_64hSTtc4y8x7xa98rFVUbG24oArpjzLAYGYP2_sI,7356
|
| 636 |
+
setuptools/build_meta.py,sha256=3cHAWucJaLA9DU5OfCbKkkteTDiQ5bB4LokfTRMgJT4,19968
|
| 637 |
+
setuptools/cli-32.exe,sha256=MqzBvFQxFsviz_EMuGd3LfLyVP8mNMhwrvC0bEtpb9s,11776
|
| 638 |
+
setuptools/cli-64.exe,sha256=u7PeVwdinmpgoMI4zUd7KPB_AGaYL9qVP6b87DkHOko,14336
|
| 639 |
+
setuptools/cli-arm64.exe,sha256=uafQjaiA36yLz1SOuksG-1m28JsX0zFIoPZhgyiSbGE,13824
|
| 640 |
+
setuptools/cli.exe,sha256=MqzBvFQxFsviz_EMuGd3LfLyVP8mNMhwrvC0bEtpb9s,11776
|
| 641 |
+
setuptools/command/__init__.py,sha256=wdSrlNR0P6nCz9_oFtCAiAkeFJMsZa1jPcpXT53f0SM,803
|
| 642 |
+
setuptools/command/__pycache__/__init__.cpython-311.pyc,,
|
| 643 |
+
setuptools/command/__pycache__/_requirestxt.cpython-311.pyc,,
|
| 644 |
+
setuptools/command/__pycache__/alias.cpython-311.pyc,,
|
| 645 |
+
setuptools/command/__pycache__/bdist_egg.cpython-311.pyc,,
|
| 646 |
+
setuptools/command/__pycache__/bdist_rpm.cpython-311.pyc,,
|
| 647 |
+
setuptools/command/__pycache__/bdist_wheel.cpython-311.pyc,,
|
| 648 |
+
setuptools/command/__pycache__/build.cpython-311.pyc,,
|
| 649 |
+
setuptools/command/__pycache__/build_clib.cpython-311.pyc,,
|
| 650 |
+
setuptools/command/__pycache__/build_ext.cpython-311.pyc,,
|
| 651 |
+
setuptools/command/__pycache__/build_py.cpython-311.pyc,,
|
| 652 |
+
setuptools/command/__pycache__/develop.cpython-311.pyc,,
|
| 653 |
+
setuptools/command/__pycache__/dist_info.cpython-311.pyc,,
|
| 654 |
+
setuptools/command/__pycache__/easy_install.cpython-311.pyc,,
|
| 655 |
+
setuptools/command/__pycache__/editable_wheel.cpython-311.pyc,,
|
| 656 |
+
setuptools/command/__pycache__/egg_info.cpython-311.pyc,,
|
| 657 |
+
setuptools/command/__pycache__/install.cpython-311.pyc,,
|
| 658 |
+
setuptools/command/__pycache__/install_egg_info.cpython-311.pyc,,
|
| 659 |
+
setuptools/command/__pycache__/install_lib.cpython-311.pyc,,
|
| 660 |
+
setuptools/command/__pycache__/install_scripts.cpython-311.pyc,,
|
| 661 |
+
setuptools/command/__pycache__/rotate.cpython-311.pyc,,
|
| 662 |
+
setuptools/command/__pycache__/saveopts.cpython-311.pyc,,
|
| 663 |
+
setuptools/command/__pycache__/sdist.cpython-311.pyc,,
|
| 664 |
+
setuptools/command/__pycache__/setopt.cpython-311.pyc,,
|
| 665 |
+
setuptools/command/__pycache__/test.cpython-311.pyc,,
|
| 666 |
+
setuptools/command/_requirestxt.py,sha256=ItYMTJGh_i5TlQstX_nFopqEhkC4PJFadBL2Zd3V670,4228
|
| 667 |
+
setuptools/command/alias.py,sha256=rDdrMt32DS6qf3K7tjZZyHD_dMKrm77AXcAtx-nBQ0I,2380
|
| 668 |
+
setuptools/command/bdist_egg.py,sha256=JmtKoIbiwgEHcJBkbc7zyXCZcAF851t6ek18gme-60Q,16948
|
| 669 |
+
setuptools/command/bdist_rpm.py,sha256=LyqI49w48SKk0FmuHsE9MLzX1SuXjL7YMNbZMFZqFII,1435
|
| 670 |
+
setuptools/command/bdist_wheel.py,sha256=SknYPVwhrRPfXudmO_gvqNHHHhzSfU8cEmFtQomQ9xI,22247
|
| 671 |
+
setuptools/command/build.py,sha256=eI7STMERGGZEpzk1tvJN8p9IOjAAXMcGLzljv2mwI3M,6052
|
| 672 |
+
setuptools/command/build_clib.py,sha256=AbgpPIF_3qL8fZr3JIebI-WHTMTBiMfrFkVQz8K40G4,4528
|
| 673 |
+
setuptools/command/build_ext.py,sha256=Wddi6ho4MnVh84qqZUNqTvjKLqeoWe6cbwdJOUitXCc,18465
|
| 674 |
+
setuptools/command/build_py.py,sha256=DCbjvB18kkL-xUK5rvlzm0C6twTeOxNhyvJDxxa7fII,15539
|
| 675 |
+
setuptools/command/develop.py,sha256=1dsb2lkjcPQQAlQNVVlfPIJUBZ9di0l5bs4l83g9-9Y,1610
|
| 676 |
+
setuptools/command/dist_info.py,sha256=HU752iLLmmYMHbsDBgz2ubRjkgJobugOp8H71LzzDys,3450
|
| 677 |
+
setuptools/command/easy_install.py,sha256=XrN5cV51mfzbCDoapZ6iT8nCzaLpumdwJYRKeMHEjCQ,780
|
| 678 |
+
setuptools/command/editable_wheel.py,sha256=MXyQx41gwu3d1raYSZGgzCVp5kkVtlCKftZKvTma3wY,34836
|
| 679 |
+
setuptools/command/egg_info.py,sha256=GXyvq5E8huO4g-FDoNzf3MHjeXfxzPoS0Hkvbta_zc8,25878
|
| 680 |
+
setuptools/command/install.py,sha256=4x2hiNgBGQrFEXKuPBQMrb8ecSwIfYF4TYHZQLjPVAg,5066
|
| 681 |
+
setuptools/command/install_egg_info.py,sha256=3I9IPCH7D59Sh-6aVYz-h6wwyxq-wkxrKwKg3nDdJqs,2075
|
| 682 |
+
setuptools/command/install_lib.py,sha256=9n1_U83eHcERL_a_rv_LhHCkhXlLdqyZ4SdBow-9qcE,4319
|
| 683 |
+
setuptools/command/install_scripts.py,sha256=JmDGngHzCO2Y1j4maFNdHB_ILhGPhk-b5KhxsZwUwiQ,2490
|
| 684 |
+
setuptools/command/launcher manifest.xml,sha256=xlLbjWrB01tKC0-hlVkOKkiSPbzMml2eOPtJ_ucCnbE,628
|
| 685 |
+
setuptools/command/rotate.py,sha256=XNd_BEEOWAJHW1FcLTMUWWl4QB6zAuk7b8VWQg3FHos,2187
|
| 686 |
+
setuptools/command/saveopts.py,sha256=Np0PVb7SD7oTbu9Z9sosS7D-CkkIkU7x4glu5Es1tjA,692
|
| 687 |
+
setuptools/command/sdist.py,sha256=5ZiA8yfdNfl-kLTnfPAht1yKnS1o_HrSFphsJd-9foU,7369
|
| 688 |
+
setuptools/command/setopt.py,sha256=xZF2RCc4ABvE9eHHAzF50-fkQg3au8fcRUVVGd58k3U,5100
|
| 689 |
+
setuptools/command/test.py,sha256=k7xcq7D7bEehgxarbw-dW3AtmGZORqz8HjKR6FGJ3jk,1343
|
| 690 |
+
setuptools/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 691 |
+
setuptools/compat/__pycache__/__init__.cpython-311.pyc,,
|
| 692 |
+
setuptools/compat/__pycache__/py310.cpython-311.pyc,,
|
| 693 |
+
setuptools/compat/__pycache__/py311.cpython-311.pyc,,
|
| 694 |
+
setuptools/compat/__pycache__/py312.cpython-311.pyc,,
|
| 695 |
+
setuptools/compat/__pycache__/py39.cpython-311.pyc,,
|
| 696 |
+
setuptools/compat/py310.py,sha256=JwjQZ3cNTizfpDLNl9GLsUGzBr-tVlMPxmMYVDTlhiI,344
|
| 697 |
+
setuptools/compat/py311.py,sha256=e6tJAFwZEP82hmMBl10HYeSypelo_Ti2wTjKZVKLwOE,790
|
| 698 |
+
setuptools/compat/py312.py,sha256=vYKVtdrdOTsO_R90dJkEXsFwfMJFuIFJflhIgHrjJ-Y,366
|
| 699 |
+
setuptools/compat/py39.py,sha256=BJMtnkfcqyTfccqjYQxfoRtU2nTnWaEESBVkshTiXqY,493
|
| 700 |
+
setuptools/config/NOTICE,sha256=Ld3wiBgpejuJ1D2V_2WdjahXQRCMkTbfo6TYVsBiO9g,493
|
| 701 |
+
setuptools/config/__init__.py,sha256=aiPnL9BJn1O6MfmuNXyn8W2Lp8u9qizRVqwPiOdPIjY,1499
|
| 702 |
+
setuptools/config/__pycache__/__init__.cpython-311.pyc,,
|
| 703 |
+
setuptools/config/__pycache__/_apply_pyprojecttoml.cpython-311.pyc,,
|
| 704 |
+
setuptools/config/__pycache__/expand.cpython-311.pyc,,
|
| 705 |
+
setuptools/config/__pycache__/pyprojecttoml.cpython-311.pyc,,
|
| 706 |
+
setuptools/config/__pycache__/setupcfg.cpython-311.pyc,,
|
| 707 |
+
setuptools/config/_apply_pyprojecttoml.py,sha256=SUyTw7A2btZ1lBuWKN5o42-Diyv95eGTiYJ3rZOnGSc,19120
|
| 708 |
+
setuptools/config/_validate_pyproject/NOTICE,sha256=XTANv6ZDE4sBO3WsnK7uWR-VG4sO4kKIw0zNkmxHgMg,18737
|
| 709 |
+
setuptools/config/_validate_pyproject/__init__.py,sha256=dnp6T7ePP1R5z4OuC7Fd2dkFlIrtIfizUfvpGJP6nz0,1042
|
| 710 |
+
setuptools/config/_validate_pyproject/__pycache__/__init__.cpython-311.pyc,,
|
| 711 |
+
setuptools/config/_validate_pyproject/__pycache__/error_reporting.cpython-311.pyc,,
|
| 712 |
+
setuptools/config/_validate_pyproject/__pycache__/extra_validations.cpython-311.pyc,,
|
| 713 |
+
setuptools/config/_validate_pyproject/__pycache__/fastjsonschema_exceptions.cpython-311.pyc,,
|
| 714 |
+
setuptools/config/_validate_pyproject/__pycache__/fastjsonschema_validations.cpython-311.pyc,,
|
| 715 |
+
setuptools/config/_validate_pyproject/__pycache__/formats.cpython-311.pyc,,
|
| 716 |
+
setuptools/config/_validate_pyproject/error_reporting.py,sha256=meldD7nBQdolQhvG-43r1Ue-gU1n7ORAJR86vh3Rrvk,11813
|
| 717 |
+
setuptools/config/_validate_pyproject/extra_validations.py,sha256=-GUG5S--ijY8WfXbdXPoHl6ywGsyEF9dtDpenSoJPHg,2858
|
| 718 |
+
setuptools/config/_validate_pyproject/fastjsonschema_exceptions.py,sha256=w749JgqKi8clBFcObdcbZVqsmF4oJ_QByhZ1SGbUFNw,1612
|
| 719 |
+
setuptools/config/_validate_pyproject/fastjsonschema_validations.py,sha256=FihD5ZcM6p77BPZ04CGqh3BEwVNoPMKJZJAyuJpkAU0,354682
|
| 720 |
+
setuptools/config/_validate_pyproject/formats.py,sha256=TETokJBK9hjl-cVg1olsojkJwLxfP7_chgJQNmzAB98,13564
|
| 721 |
+
setuptools/config/distutils.schema.json,sha256=Tcp32kRnhwORGw_9p6GEi08lj2h15tQRzOYBbzGmcBU,972
|
| 722 |
+
setuptools/config/expand.py,sha256=JNAktRCsyyRB-rQodbPnCucmLWqcYvzCDC8Ebn2Z7xM,16041
|
| 723 |
+
setuptools/config/pyprojecttoml.py,sha256=YMu5PdbJJI5azp6kR_boM1mflf5nqOA-InF4s6LnLgw,18320
|
| 724 |
+
setuptools/config/setupcfg.py,sha256=VZDkwE7DYv45SbadJD8CwKrDtiXvjgllL8PYSvoRCyg,26575
|
| 725 |
+
setuptools/config/setuptools.schema.json,sha256=dZBRuSEnZkatoVlt1kVwG8ocTeRdO7BD0xvOWKH54PY,16071
|
| 726 |
+
setuptools/depends.py,sha256=jKYfjmt_2ZQYVghb8L9bU7LJ6erHJ5ze-K_fKV1BMXk,5965
|
| 727 |
+
setuptools/discovery.py,sha256=-42c3XhwzkfodDKKP50C2YBzr11fncAgmUzBdBRb0-Q,21258
|
| 728 |
+
setuptools/dist.py,sha256=jrLGf-4udZjoZyULuGrXEPzgFDVq1CHCfGsqjTq52Gg,44887
|
| 729 |
+
setuptools/errors.py,sha256=gY2x2PIaIgy01yRANRC-zcCwxDCqCScgJoCOZFe0yio,3024
|
| 730 |
+
setuptools/extension.py,sha256=KCnv9p3tgm0ZVqtgE451fyILsm4hCyvOiUtOu787D-4,6683
|
| 731 |
+
setuptools/glob.py,sha256=AC_B33DY8g-CHELxDsJrtwFrpiucSAZsakPFdSOQzhc,6062
|
| 732 |
+
setuptools/gui-32.exe,sha256=hdrh6V13hF8stZvKw9Sv50u-TJGpvMW_SnHNQxBNvnw,11776
|
| 733 |
+
setuptools/gui-64.exe,sha256=NHG2FA6txkEid9u-_j_vjDRaDxpZd2CGuAo2GMOoPjs,14336
|
| 734 |
+
setuptools/gui-arm64.exe,sha256=5pT0dDQFyLWSb_RX22_n8aEt7HwWqcOGR4TT9OB64Jc,13824
|
| 735 |
+
setuptools/gui.exe,sha256=hdrh6V13hF8stZvKw9Sv50u-TJGpvMW_SnHNQxBNvnw,11776
|
| 736 |
+
setuptools/installer.py,sha256=veio-PDCseWN0J1E_1gjvVLkcIhPpQLlEKpSaA03WWk,5093
|
| 737 |
+
setuptools/launch.py,sha256=IBb5lEv69CyuZ9ewIrmKlXh154kdLmP29LKfTMkximE,820
|
| 738 |
+
setuptools/logging.py,sha256=W16iHJ1HcCXYQ0RxyrEfJ83FT4175tCtoYg-E6uSpVI,1261
|
| 739 |
+
setuptools/modified.py,sha256=ZwbfBfCFP88ltvbv_dJDz-t1LsQjnM-JUpgZnnQZjjM,568
|
| 740 |
+
setuptools/monkey.py,sha256=FwMWl2n1v2bHbeqBy-o9g8yUNaAkYFbszCbXe9d5Za8,3717
|
| 741 |
+
setuptools/msvc.py,sha256=vmM0qL4rIzrtD9pia9ZEwtqZ4LbbrgL0dU0EANVYRm8,41631
|
| 742 |
+
setuptools/namespaces.py,sha256=2GGqYY1BNDEhMtBc1rHTv7klgmNVRdksJeW-L1f--ys,3171
|
| 743 |
+
setuptools/script (dev).tmpl,sha256=RUzQzCQUaXtwdLtYHWYbIQmOaES5Brqq1FvUA_tu-5I,218
|
| 744 |
+
setuptools/script.tmpl,sha256=WGTt5piezO27c-Dbx6l5Q4T3Ff20A5z7872hv3aAhYY,138
|
| 745 |
+
setuptools/tests/__init__.py,sha256=AnBfls2iJbTDQzmMKeLRt-9lxhaOHUVOZEgXv89Uwvs,335
|
| 746 |
+
setuptools/tests/__pycache__/__init__.cpython-311.pyc,,
|
| 747 |
+
setuptools/tests/__pycache__/contexts.cpython-311.pyc,,
|
| 748 |
+
setuptools/tests/__pycache__/environment.cpython-311.pyc,,
|
| 749 |
+
setuptools/tests/__pycache__/fixtures.cpython-311.pyc,,
|
| 750 |
+
setuptools/tests/__pycache__/mod_with_constant.cpython-311.pyc,,
|
| 751 |
+
setuptools/tests/__pycache__/namespaces.cpython-311.pyc,,
|
| 752 |
+
setuptools/tests/__pycache__/script-with-bom.cpython-311.pyc,,
|
| 753 |
+
setuptools/tests/__pycache__/test_archive_util.cpython-311.pyc,,
|
| 754 |
+
setuptools/tests/__pycache__/test_bdist_deprecations.cpython-311.pyc,,
|
| 755 |
+
setuptools/tests/__pycache__/test_bdist_egg.cpython-311.pyc,,
|
| 756 |
+
setuptools/tests/__pycache__/test_bdist_wheel.cpython-311.pyc,,
|
| 757 |
+
setuptools/tests/__pycache__/test_build.cpython-311.pyc,,
|
| 758 |
+
setuptools/tests/__pycache__/test_build_clib.cpython-311.pyc,,
|
| 759 |
+
setuptools/tests/__pycache__/test_build_ext.cpython-311.pyc,,
|
| 760 |
+
setuptools/tests/__pycache__/test_build_meta.cpython-311.pyc,,
|
| 761 |
+
setuptools/tests/__pycache__/test_build_py.cpython-311.pyc,,
|
| 762 |
+
setuptools/tests/__pycache__/test_config_discovery.cpython-311.pyc,,
|
| 763 |
+
setuptools/tests/__pycache__/test_core_metadata.cpython-311.pyc,,
|
| 764 |
+
setuptools/tests/__pycache__/test_depends.cpython-311.pyc,,
|
| 765 |
+
setuptools/tests/__pycache__/test_develop.cpython-311.pyc,,
|
| 766 |
+
setuptools/tests/__pycache__/test_dist.cpython-311.pyc,,
|
| 767 |
+
setuptools/tests/__pycache__/test_dist_info.cpython-311.pyc,,
|
| 768 |
+
setuptools/tests/__pycache__/test_distutils_adoption.cpython-311.pyc,,
|
| 769 |
+
setuptools/tests/__pycache__/test_editable_install.cpython-311.pyc,,
|
| 770 |
+
setuptools/tests/__pycache__/test_egg_info.cpython-311.pyc,,
|
| 771 |
+
setuptools/tests/__pycache__/test_extern.cpython-311.pyc,,
|
| 772 |
+
setuptools/tests/__pycache__/test_find_packages.cpython-311.pyc,,
|
| 773 |
+
setuptools/tests/__pycache__/test_find_py_modules.cpython-311.pyc,,
|
| 774 |
+
setuptools/tests/__pycache__/test_glob.cpython-311.pyc,,
|
| 775 |
+
setuptools/tests/__pycache__/test_install_scripts.cpython-311.pyc,,
|
| 776 |
+
setuptools/tests/__pycache__/test_logging.cpython-311.pyc,,
|
| 777 |
+
setuptools/tests/__pycache__/test_manifest.cpython-311.pyc,,
|
| 778 |
+
setuptools/tests/__pycache__/test_namespaces.cpython-311.pyc,,
|
| 779 |
+
setuptools/tests/__pycache__/test_scripts.cpython-311.pyc,,
|
| 780 |
+
setuptools/tests/__pycache__/test_sdist.cpython-311.pyc,,
|
| 781 |
+
setuptools/tests/__pycache__/test_setopt.cpython-311.pyc,,
|
| 782 |
+
setuptools/tests/__pycache__/test_setuptools.cpython-311.pyc,,
|
| 783 |
+
setuptools/tests/__pycache__/test_shutil_wrapper.cpython-311.pyc,,
|
| 784 |
+
setuptools/tests/__pycache__/test_unicode_utils.cpython-311.pyc,,
|
| 785 |
+
setuptools/tests/__pycache__/test_virtualenv.cpython-311.pyc,,
|
| 786 |
+
setuptools/tests/__pycache__/test_warnings.cpython-311.pyc,,
|
| 787 |
+
setuptools/tests/__pycache__/test_wheel.cpython-311.pyc,,
|
| 788 |
+
setuptools/tests/__pycache__/test_windows_wrappers.cpython-311.pyc,,
|
| 789 |
+
setuptools/tests/__pycache__/text.cpython-311.pyc,,
|
| 790 |
+
setuptools/tests/__pycache__/textwrap.cpython-311.pyc,,
|
| 791 |
+
setuptools/tests/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 792 |
+
setuptools/tests/compat/__pycache__/__init__.cpython-311.pyc,,
|
| 793 |
+
setuptools/tests/compat/__pycache__/py39.cpython-311.pyc,,
|
| 794 |
+
setuptools/tests/compat/py39.py,sha256=eUy7_F-6KRTOIKl-veshUu6I0EdTSdBZMh0EV0lZ1-g,135
|
| 795 |
+
setuptools/tests/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 796 |
+
setuptools/tests/config/__pycache__/__init__.cpython-311.pyc,,
|
| 797 |
+
setuptools/tests/config/__pycache__/test_apply_pyprojecttoml.cpython-311.pyc,,
|
| 798 |
+
setuptools/tests/config/__pycache__/test_expand.cpython-311.pyc,,
|
| 799 |
+
setuptools/tests/config/__pycache__/test_pyprojecttoml.cpython-311.pyc,,
|
| 800 |
+
setuptools/tests/config/__pycache__/test_pyprojecttoml_dynamic_deps.cpython-311.pyc,,
|
| 801 |
+
setuptools/tests/config/__pycache__/test_setupcfg.cpython-311.pyc,,
|
| 802 |
+
setuptools/tests/config/downloads/__init__.py,sha256=9ixnDEdyL_arKbUzfuiJftAj9bGxKz8M9alOFZMjx9Y,1827
|
| 803 |
+
setuptools/tests/config/downloads/__pycache__/__init__.cpython-311.pyc,,
|
| 804 |
+
setuptools/tests/config/downloads/__pycache__/preload.cpython-311.pyc,,
|
| 805 |
+
setuptools/tests/config/downloads/preload.py,sha256=sIGGZpY3cmMpMwiJYYYYHG2ifZJkvJgEotRFtiulV1I,450
|
| 806 |
+
setuptools/tests/config/setupcfg_examples.txt,sha256=cAbVvCbkFZuTUL6xRRzRgqyB0rLvJTfvw3D30glo2OE,1912
|
| 807 |
+
setuptools/tests/config/test_apply_pyprojecttoml.py,sha256=l6nE4d8WLU_eSWRic7VSoqeKv9Bi7CZGHcEuB2ehk2w,28807
|
| 808 |
+
setuptools/tests/config/test_expand.py,sha256=S0oT6JvgA_oujR4YS4RUuf5gmOt1CTQV66RQDzV8xd4,8933
|
| 809 |
+
setuptools/tests/config/test_pyprojecttoml.py,sha256=0LefSljUhA6MqtJ5AVzLhomqZcYiFKdu_1ckDeMT1LY,12406
|
| 810 |
+
setuptools/tests/config/test_pyprojecttoml_dynamic_deps.py,sha256=9W73-yLhZJmvCiO4rTiQoBpZT5wNA90Xbd5n2HCshd4,3271
|
| 811 |
+
setuptools/tests/config/test_setupcfg.py,sha256=ZvN-O-2Dgon1adp6oM6il8JWdgT9y196fRvqESU5ELI,33427
|
| 812 |
+
setuptools/tests/contexts.py,sha256=Ozdfc2KydF9x9wODUsdun800myLuP27uxoeT06Gbk7M,3166
|
| 813 |
+
setuptools/tests/environment.py,sha256=95_UtTaRiuvwYC9eXKEHbn02kDtZysvZq3UZJmPUj1I,3102
|
| 814 |
+
setuptools/tests/fixtures.py,sha256=aPewdPHlKHRAsMo9H828c3ZC8l3OJqgyfRYwpLBvgCk,11705
|
| 815 |
+
setuptools/tests/indexes/test_links_priority/external.html,sha256=eL9euOuE93JKZdqlXxBOlHbKwIuNuIdq7GBRpsaPMcU,92
|
| 816 |
+
setuptools/tests/indexes/test_links_priority/simple/foobar/index.html,sha256=DD-TKr7UU4zAjHHz4VexYDNSAzR27levSh1c-k3ZdLE,174
|
| 817 |
+
setuptools/tests/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 818 |
+
setuptools/tests/integration/__pycache__/__init__.cpython-311.pyc,,
|
| 819 |
+
setuptools/tests/integration/__pycache__/helpers.cpython-311.pyc,,
|
| 820 |
+
setuptools/tests/integration/__pycache__/test_pbr.cpython-311.pyc,,
|
| 821 |
+
setuptools/tests/integration/__pycache__/test_pip_install_sdist.cpython-311.pyc,,
|
| 822 |
+
setuptools/tests/integration/helpers.py,sha256=3PHcS9SCA-fwVJmUP2ad5NQOttJAETI5Nnoc_xroO5k,2522
|
| 823 |
+
setuptools/tests/integration/test_pbr.py,sha256=2eKuklFNmpnBgA_eEhYPBr6rLLG2Xm4MY6PlcmzZgGU,432
|
| 824 |
+
setuptools/tests/integration/test_pip_install_sdist.py,sha256=SFbvuYF_hDzt6OtsQ5GjFNnxmoJ_eElfvpYsiyyGJ-g,8256
|
| 825 |
+
setuptools/tests/mod_with_constant.py,sha256=X_Kj80M55w1tmQ4f7uZY91ZTALo4hKVT6EHxgYocUMQ,22
|
| 826 |
+
setuptools/tests/namespaces.py,sha256=HPcI3nR5MCFWXpaADIJ1fwKxymcQgBkuw87Ic5PUSAQ,2774
|
| 827 |
+
setuptools/tests/script-with-bom.py,sha256=hRRgIizEULGiG_ZTNoMY46HhKhxpWfy5FGcD6Qbh5fc,18
|
| 828 |
+
setuptools/tests/test_archive_util.py,sha256=buuKdY8XkW26Pe3IKAoBRGHG0MDumnuNoPg2WsAQzIg,845
|
| 829 |
+
setuptools/tests/test_bdist_deprecations.py,sha256=75Xq3gYn79LIIyusEltbHan0bEgAt2e_CaL7KLS8-KQ,775
|
| 830 |
+
setuptools/tests/test_bdist_egg.py,sha256=6PaYN1F3JDbIh1uK0urv7yJFcx98z5dn9SOJ8Mv91l8,1957
|
| 831 |
+
setuptools/tests/test_bdist_wheel.py,sha256=dZ9a7OT_UyRvLnoCi2KGEIbtzhEQjM3YutYMA6ZCezs,23083
|
| 832 |
+
setuptools/tests/test_build.py,sha256=wJgMz2hwHADcLFg-nXrwRVhus7hjmAeEGgrpIQwCGnA,798
|
| 833 |
+
setuptools/tests/test_build_clib.py,sha256=bX51XRAf4uO7IuHFpjePnoK8mE74N2gsoeEqF-ofgws,3123
|
| 834 |
+
setuptools/tests/test_build_ext.py,sha256=e4ZSxsYPB5zq1KSqGEuATZ0t0PJQzMhjjkKJ-hIjcgc,10099
|
| 835 |
+
setuptools/tests/test_build_meta.py,sha256=kvi0Bn4p9DBVme3zyWQsn3QgB9oPdq8S15agj1m69L0,33289
|
| 836 |
+
setuptools/tests/test_build_py.py,sha256=gobME_Cvzf6Ugxq70iWfXekb_xyyT61khwjFq8zkwfw,14186
|
| 837 |
+
setuptools/tests/test_config_discovery.py,sha256=FqV-lOtkqaI-ayzU2zocSdD5TaRAgCZnixNDilKA6FQ,22580
|
| 838 |
+
setuptools/tests/test_core_metadata.py,sha256=vbVJ5_Lsx_hsO_GdB6nQEXJRjA2ydx6_qSbr5LpheAA,20881
|
| 839 |
+
setuptools/tests/test_depends.py,sha256=yQBXoQbNQlJit6mbRVoz6Bb553f3sNrq02lZimNz5XY,424
|
| 840 |
+
setuptools/tests/test_develop.py,sha256=MHYL_YDqNMU5jhKkjsBUGKMGCkrva8CFR8dRc6kkYKE,3072
|
| 841 |
+
setuptools/tests/test_dist.py,sha256=_IYleHR9YVqzV-nLq_JqSup6DNeUdPzuQ0EXhp009Uk,8893
|
| 842 |
+
setuptools/tests/test_dist_info.py,sha256=F_xTXc5TGhjiujtGukFt6wNstqpTW7sVQtUnL1IX7yo,4988
|
| 843 |
+
setuptools/tests/test_distutils_adoption.py,sha256=_eynrOfyEqXFEmjUJhzpe8GXPyTUPvNSObs4qAAmBy8,5987
|
| 844 |
+
setuptools/tests/test_editable_install.py,sha256=Tg4kunvwYoDLYsfvSkggneUgpKQferUDx3EEvvdfmwE,42619
|
| 845 |
+
setuptools/tests/test_egg_info.py,sha256=R7nT27YhVz9oSuDyimAGerWglkbRWiMSPBs5FzcSnBM,44941
|
| 846 |
+
setuptools/tests/test_extern.py,sha256=rpKU6oCcksumLwf5TeKlDluFQ0TUfbPwTLQbpxcFrCU,296
|
| 847 |
+
setuptools/tests/test_find_packages.py,sha256=CTLAcTzWGWBLCcd2aAsUVkvO3ibrlqexFBdDKOWPoq8,7819
|
| 848 |
+
setuptools/tests/test_find_py_modules.py,sha256=zQjuhIG5TQN2SJPix9ARo4DL_w84Ln8QsHDUjjbrtAQ,2404
|
| 849 |
+
setuptools/tests/test_glob.py,sha256=P3JvpH-kXQ4BZ3zvRF-zKxOgwyWzwIaQIz0WHdxS0kk,887
|
| 850 |
+
setuptools/tests/test_install_scripts.py,sha256=scIrJ6a_ssKqg4vIBNaUjmAKHEYLUUZ9WKnPeKnE6gc,3433
|
| 851 |
+
setuptools/tests/test_logging.py,sha256=zlE5DlldukC7Jc54FNvDV_7ux3ErAkrfrN5CSsnNOUQ,2099
|
| 852 |
+
setuptools/tests/test_manifest.py,sha256=eMg65pIA52DizB6mpktSU-b8CjwaNCS5MSgL_V1LrFI,18562
|
| 853 |
+
setuptools/tests/test_namespaces.py,sha256=Y6utoe5PHHqL_DlgawqB9F8XpsUDPvvw1sQMenK04e0,4515
|
| 854 |
+
setuptools/tests/test_scripts.py,sha256=_ra506yQF7n72ROUDcz2r3CTsGsawO1m-1oqA9EQCfw,379
|
| 855 |
+
setuptools/tests/test_sdist.py,sha256=RYLvPa_nfyC1ZmoinzqMzJynTDG4RtPYC19_0LU6pvs,32872
|
| 856 |
+
setuptools/tests/test_setopt.py,sha256=3VxxM4ATfP-P4AGnDjoWCnHr5-i9CSEQTFYU1-FTnvI,1365
|
| 857 |
+
setuptools/tests/test_setuptools.py,sha256=_eIhqKf45-OtHqxRf20KndOZJlJdS0PuFLXBO3M-LN8,9008
|
| 858 |
+
setuptools/tests/test_shutil_wrapper.py,sha256=g15E11PtZxG-InB2BWNFyH-svObXx2XcMhgMLJPuFnc,641
|
| 859 |
+
setuptools/tests/test_unicode_utils.py,sha256=xWfEEl8jkQCt9othUTXJfFmdyATAFggJs2tTxjbumbw,316
|
| 860 |
+
setuptools/tests/test_virtualenv.py,sha256=g-njC_9JTAs1YVx_1dGJ_Q6RlInO4qKVu9-XAgNb6TY,3730
|
| 861 |
+
setuptools/tests/test_warnings.py,sha256=zwR2zcnCeCeDqILZlJOPAcuyPHoDvGu1OtOVYiLMk74,3347
|
| 862 |
+
setuptools/tests/test_wheel.py,sha256=I709mQO4YCztxI2L8x7bu_rE818vC9SXHR8qtZPwZW8,18752
|
| 863 |
+
setuptools/tests/test_windows_wrappers.py,sha256=wBjXN3iGldkzRGTgKTrx99xqUqwPJ0V-ldyiB1pWD-g,7868
|
| 864 |
+
setuptools/tests/text.py,sha256=a12197pMVTvB6FAWQ0ujT8fIQiLIWJlFAl1UCaDUDfg,123
|
| 865 |
+
setuptools/tests/textwrap.py,sha256=FNNNq_MiaEJx88PnsbJQIRxmj1qmgcAOCXXRsODPJN4,98
|
| 866 |
+
setuptools/unicode_utils.py,sha256=ukMGh8pEAw6F_Ezb-K5D3c-078RgA_GcF0oW6lg4lSs,3189
|
| 867 |
+
setuptools/version.py,sha256=WJCeUuyq74Aok2TeK9-OexZOu8XrlQy7-y0BEuWNovQ,161
|
| 868 |
+
setuptools/warnings.py,sha256=oY0Se5eOqje_FEyjTgonUc0XGwgsrI5cgm1kkwulz_w,3796
|
| 869 |
+
setuptools/wheel.py,sha256=_JuhinWmlQwBHJrdIh1yfhrDS7GFMacCiJiOY3H5gwA,9477
|
| 870 |
+
setuptools/windows_support.py,sha256=wW4IYLM1Bv7Z1MaauP2xmPjyy-wkmQnXdyvXscAf9fw,726
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/REQUESTED
ADDED
|
File without changes
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/WHEEL
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Wheel-Version: 1.0
|
| 2 |
+
Generator: setuptools (80.9.0)
|
| 3 |
+
Root-Is-Purelib: true
|
| 4 |
+
Tag: py3-none-any
|
| 5 |
+
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/direct_url.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"archive_info": {"hash": "sha256=062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922", "hashes": {"sha256": "062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922"}}, "url": "file:///build/setuptools-80.9.0-py3-none-any.whl"}
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/entry_points.txt
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[distutils.commands]
|
| 2 |
+
alias = setuptools.command.alias:alias
|
| 3 |
+
bdist_egg = setuptools.command.bdist_egg:bdist_egg
|
| 4 |
+
bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm
|
| 5 |
+
bdist_wheel = setuptools.command.bdist_wheel:bdist_wheel
|
| 6 |
+
build = setuptools.command.build:build
|
| 7 |
+
build_clib = setuptools.command.build_clib:build_clib
|
| 8 |
+
build_ext = setuptools.command.build_ext:build_ext
|
| 9 |
+
build_py = setuptools.command.build_py:build_py
|
| 10 |
+
develop = setuptools.command.develop:develop
|
| 11 |
+
dist_info = setuptools.command.dist_info:dist_info
|
| 12 |
+
easy_install = setuptools.command.easy_install:easy_install
|
| 13 |
+
editable_wheel = setuptools.command.editable_wheel:editable_wheel
|
| 14 |
+
egg_info = setuptools.command.egg_info:egg_info
|
| 15 |
+
install = setuptools.command.install:install
|
| 16 |
+
install_egg_info = setuptools.command.install_egg_info:install_egg_info
|
| 17 |
+
install_lib = setuptools.command.install_lib:install_lib
|
| 18 |
+
install_scripts = setuptools.command.install_scripts:install_scripts
|
| 19 |
+
rotate = setuptools.command.rotate:rotate
|
| 20 |
+
saveopts = setuptools.command.saveopts:saveopts
|
| 21 |
+
sdist = setuptools.command.sdist:sdist
|
| 22 |
+
setopt = setuptools.command.setopt:setopt
|
| 23 |
+
|
| 24 |
+
[distutils.setup_keywords]
|
| 25 |
+
dependency_links = setuptools.dist:assert_string_list
|
| 26 |
+
eager_resources = setuptools.dist:assert_string_list
|
| 27 |
+
entry_points = setuptools.dist:check_entry_points
|
| 28 |
+
exclude_package_data = setuptools.dist:check_package_data
|
| 29 |
+
extras_require = setuptools.dist:check_extras
|
| 30 |
+
include_package_data = setuptools.dist:assert_bool
|
| 31 |
+
install_requires = setuptools.dist:check_requirements
|
| 32 |
+
namespace_packages = setuptools.dist:check_nsp
|
| 33 |
+
package_data = setuptools.dist:check_package_data
|
| 34 |
+
packages = setuptools.dist:check_packages
|
| 35 |
+
python_requires = setuptools.dist:check_specifier
|
| 36 |
+
setup_requires = setuptools.dist:check_requirements
|
| 37 |
+
use_2to3 = setuptools.dist:invalid_unless_false
|
| 38 |
+
zip_safe = setuptools.dist:assert_bool
|
| 39 |
+
|
| 40 |
+
[egg_info.writers]
|
| 41 |
+
PKG-INFO = setuptools.command.egg_info:write_pkg_info
|
| 42 |
+
dependency_links.txt = setuptools.command.egg_info:overwrite_arg
|
| 43 |
+
eager_resources.txt = setuptools.command.egg_info:overwrite_arg
|
| 44 |
+
entry_points.txt = setuptools.command.egg_info:write_entries
|
| 45 |
+
namespace_packages.txt = setuptools.command.egg_info:overwrite_arg
|
| 46 |
+
requires.txt = setuptools.command.egg_info:write_requirements
|
| 47 |
+
top_level.txt = setuptools.command.egg_info:write_toplevel_names
|
| 48 |
+
|
| 49 |
+
[setuptools.finalize_distribution_options]
|
| 50 |
+
keywords = setuptools.dist:Distribution._finalize_setup_keywords
|
| 51 |
+
parent_finalize = setuptools.dist:_Distribution.finalize_options
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/licenses/LICENSE
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 2 |
+
of this software and associated documentation files (the "Software"), to
|
| 3 |
+
deal in the Software without restriction, including without limitation the
|
| 4 |
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
| 5 |
+
sell copies of the Software, and to permit persons to whom the Software is
|
| 6 |
+
furnished to do so, subject to the following conditions:
|
| 7 |
+
|
| 8 |
+
The above copyright notice and this permission notice shall be included in
|
| 9 |
+
all copies or substantial portions of the Software.
|
| 10 |
+
|
| 11 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 12 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 13 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 14 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 15 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
| 16 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
| 17 |
+
IN THE SOFTWARE.
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools-80.9.0.dist-info/top_level.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
_distutils_hack
|
| 2 |
+
pkg_resources
|
| 3 |
+
setuptools
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/platformdirs-4.2.2.dist-info/INSTALLER
ADDED
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.3
|
| 2 |
+
Name: platformdirs
|
| 3 |
+
Version: 4.2.2
|
| 4 |
+
Summary: A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`.
|
| 5 |
+
Project-URL: Documentation, https://platformdirs.readthedocs.io
|
| 6 |
+
Project-URL: Homepage, https://github.com/platformdirs/platformdirs
|
| 7 |
+
Project-URL: Source, https://github.com/platformdirs/platformdirs
|
| 8 |
+
Project-URL: Tracker, https://github.com/platformdirs/platformdirs/issues
|
| 9 |
+
Maintainer-email: Bernát Gábor <gaborjbernat@gmail.com>, Julian Berman <Julian@GrayVines.com>, Ofek Lev <oss@ofek.dev>, Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
|
| 10 |
+
License-Expression: MIT
|
| 11 |
+
License-File: LICENSE
|
| 12 |
+
Keywords: appdirs,application,cache,directory,log,user
|
| 13 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 14 |
+
Classifier: Intended Audience :: Developers
|
| 15 |
+
Classifier: License :: OSI Approved :: MIT License
|
| 16 |
+
Classifier: Operating System :: OS Independent
|
| 17 |
+
Classifier: Programming Language :: Python
|
| 18 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
| 19 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 20 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 21 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 22 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 23 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 24 |
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
| 25 |
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
| 26 |
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
| 27 |
+
Requires-Python: >=3.8
|
| 28 |
+
Provides-Extra: docs
|
| 29 |
+
Requires-Dist: furo>=2023.9.10; extra == 'docs'
|
| 30 |
+
Requires-Dist: proselint>=0.13; extra == 'docs'
|
| 31 |
+
Requires-Dist: sphinx-autodoc-typehints>=1.25.2; extra == 'docs'
|
| 32 |
+
Requires-Dist: sphinx>=7.2.6; extra == 'docs'
|
| 33 |
+
Provides-Extra: test
|
| 34 |
+
Requires-Dist: appdirs==1.4.4; extra == 'test'
|
| 35 |
+
Requires-Dist: covdefaults>=2.3; extra == 'test'
|
| 36 |
+
Requires-Dist: pytest-cov>=4.1; extra == 'test'
|
| 37 |
+
Requires-Dist: pytest-mock>=3.12; extra == 'test'
|
| 38 |
+
Requires-Dist: pytest>=7.4.3; extra == 'test'
|
| 39 |
+
Provides-Extra: type
|
| 40 |
+
Requires-Dist: mypy>=1.8; extra == 'type'
|
| 41 |
+
Description-Content-Type: text/x-rst
|
| 42 |
+
|
| 43 |
+
The problem
|
| 44 |
+
===========
|
| 45 |
+
|
| 46 |
+
.. image:: https://github.com/platformdirs/platformdirs/actions/workflows/check.yml/badge.svg
|
| 47 |
+
:target: https://github.com/platformdirs/platformdirs/actions
|
| 48 |
+
|
| 49 |
+
When writing desktop application, finding the right location to store user data
|
| 50 |
+
and configuration varies per platform. Even for single-platform apps, there
|
| 51 |
+
may by plenty of nuances in figuring out the right location.
|
| 52 |
+
|
| 53 |
+
For example, if running on macOS, you should use::
|
| 54 |
+
|
| 55 |
+
~/Library/Application Support/<AppName>
|
| 56 |
+
|
| 57 |
+
If on Windows (at least English Win) that should be::
|
| 58 |
+
|
| 59 |
+
C:\Documents and Settings\<User>\Application Data\Local Settings\<AppAuthor>\<AppName>
|
| 60 |
+
|
| 61 |
+
or possibly::
|
| 62 |
+
|
| 63 |
+
C:\Documents and Settings\<User>\Application Data\<AppAuthor>\<AppName>
|
| 64 |
+
|
| 65 |
+
for `roaming profiles <https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-vista/cc766489(v=ws.10)>`_ but that is another story.
|
| 66 |
+
|
| 67 |
+
On Linux (and other Unices), according to the `XDG Basedir Spec`_, it should be::
|
| 68 |
+
|
| 69 |
+
~/.local/share/<AppName>
|
| 70 |
+
|
| 71 |
+
.. _XDG Basedir Spec: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
| 72 |
+
|
| 73 |
+
``platformdirs`` to the rescue
|
| 74 |
+
==============================
|
| 75 |
+
|
| 76 |
+
This kind of thing is what the ``platformdirs`` package is for.
|
| 77 |
+
``platformdirs`` will help you choose an appropriate:
|
| 78 |
+
|
| 79 |
+
- user data dir (``user_data_dir``)
|
| 80 |
+
- user config dir (``user_config_dir``)
|
| 81 |
+
- user cache dir (``user_cache_dir``)
|
| 82 |
+
- site data dir (``site_data_dir``)
|
| 83 |
+
- site config dir (``site_config_dir``)
|
| 84 |
+
- user log dir (``user_log_dir``)
|
| 85 |
+
- user documents dir (``user_documents_dir``)
|
| 86 |
+
- user downloads dir (``user_downloads_dir``)
|
| 87 |
+
- user pictures dir (``user_pictures_dir``)
|
| 88 |
+
- user videos dir (``user_videos_dir``)
|
| 89 |
+
- user music dir (``user_music_dir``)
|
| 90 |
+
- user desktop dir (``user_desktop_dir``)
|
| 91 |
+
- user runtime dir (``user_runtime_dir``)
|
| 92 |
+
|
| 93 |
+
And also:
|
| 94 |
+
|
| 95 |
+
- Is slightly opinionated on the directory names used. Look for "OPINION" in
|
| 96 |
+
documentation and code for when an opinion is being applied.
|
| 97 |
+
|
| 98 |
+
Example output
|
| 99 |
+
==============
|
| 100 |
+
|
| 101 |
+
On macOS:
|
| 102 |
+
|
| 103 |
+
.. code-block:: pycon
|
| 104 |
+
|
| 105 |
+
>>> from platformdirs import *
|
| 106 |
+
>>> appname = "SuperApp"
|
| 107 |
+
>>> appauthor = "Acme"
|
| 108 |
+
>>> user_data_dir(appname, appauthor)
|
| 109 |
+
'/Users/trentm/Library/Application Support/SuperApp'
|
| 110 |
+
>>> site_data_dir(appname, appauthor)
|
| 111 |
+
'/Library/Application Support/SuperApp'
|
| 112 |
+
>>> user_cache_dir(appname, appauthor)
|
| 113 |
+
'/Users/trentm/Library/Caches/SuperApp'
|
| 114 |
+
>>> user_log_dir(appname, appauthor)
|
| 115 |
+
'/Users/trentm/Library/Logs/SuperApp'
|
| 116 |
+
>>> user_documents_dir()
|
| 117 |
+
'/Users/trentm/Documents'
|
| 118 |
+
>>> user_downloads_dir()
|
| 119 |
+
'/Users/trentm/Downloads'
|
| 120 |
+
>>> user_pictures_dir()
|
| 121 |
+
'/Users/trentm/Pictures'
|
| 122 |
+
>>> user_videos_dir()
|
| 123 |
+
'/Users/trentm/Movies'
|
| 124 |
+
>>> user_music_dir()
|
| 125 |
+
'/Users/trentm/Music'
|
| 126 |
+
>>> user_desktop_dir()
|
| 127 |
+
'/Users/trentm/Desktop'
|
| 128 |
+
>>> user_runtime_dir(appname, appauthor)
|
| 129 |
+
'/Users/trentm/Library/Caches/TemporaryItems/SuperApp'
|
| 130 |
+
|
| 131 |
+
On Windows:
|
| 132 |
+
|
| 133 |
+
.. code-block:: pycon
|
| 134 |
+
|
| 135 |
+
>>> from platformdirs import *
|
| 136 |
+
>>> appname = "SuperApp"
|
| 137 |
+
>>> appauthor = "Acme"
|
| 138 |
+
>>> user_data_dir(appname, appauthor)
|
| 139 |
+
'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp'
|
| 140 |
+
>>> user_data_dir(appname, appauthor, roaming=True)
|
| 141 |
+
'C:\\Users\\trentm\\AppData\\Roaming\\Acme\\SuperApp'
|
| 142 |
+
>>> user_cache_dir(appname, appauthor)
|
| 143 |
+
'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp\\Cache'
|
| 144 |
+
>>> user_log_dir(appname, appauthor)
|
| 145 |
+
'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp\\Logs'
|
| 146 |
+
>>> user_documents_dir()
|
| 147 |
+
'C:\\Users\\trentm\\Documents'
|
| 148 |
+
>>> user_downloads_dir()
|
| 149 |
+
'C:\\Users\\trentm\\Downloads'
|
| 150 |
+
>>> user_pictures_dir()
|
| 151 |
+
'C:\\Users\\trentm\\Pictures'
|
| 152 |
+
>>> user_videos_dir()
|
| 153 |
+
'C:\\Users\\trentm\\Videos'
|
| 154 |
+
>>> user_music_dir()
|
| 155 |
+
'C:\\Users\\trentm\\Music'
|
| 156 |
+
>>> user_desktop_dir()
|
| 157 |
+
'C:\\Users\\trentm\\Desktop'
|
| 158 |
+
>>> user_runtime_dir(appname, appauthor)
|
| 159 |
+
'C:\\Users\\trentm\\AppData\\Local\\Temp\\Acme\\SuperApp'
|
| 160 |
+
|
| 161 |
+
On Linux:
|
| 162 |
+
|
| 163 |
+
.. code-block:: pycon
|
| 164 |
+
|
| 165 |
+
>>> from platformdirs import *
|
| 166 |
+
>>> appname = "SuperApp"
|
| 167 |
+
>>> appauthor = "Acme"
|
| 168 |
+
>>> user_data_dir(appname, appauthor)
|
| 169 |
+
'/home/trentm/.local/share/SuperApp'
|
| 170 |
+
>>> site_data_dir(appname, appauthor)
|
| 171 |
+
'/usr/local/share/SuperApp'
|
| 172 |
+
>>> site_data_dir(appname, appauthor, multipath=True)
|
| 173 |
+
'/usr/local/share/SuperApp:/usr/share/SuperApp'
|
| 174 |
+
>>> user_cache_dir(appname, appauthor)
|
| 175 |
+
'/home/trentm/.cache/SuperApp'
|
| 176 |
+
>>> user_log_dir(appname, appauthor)
|
| 177 |
+
'/home/trentm/.local/state/SuperApp/log'
|
| 178 |
+
>>> user_config_dir(appname)
|
| 179 |
+
'/home/trentm/.config/SuperApp'
|
| 180 |
+
>>> user_documents_dir()
|
| 181 |
+
'/home/trentm/Documents'
|
| 182 |
+
>>> user_downloads_dir()
|
| 183 |
+
'/home/trentm/Downloads'
|
| 184 |
+
>>> user_pictures_dir()
|
| 185 |
+
'/home/trentm/Pictures'
|
| 186 |
+
>>> user_videos_dir()
|
| 187 |
+
'/home/trentm/Videos'
|
| 188 |
+
>>> user_music_dir()
|
| 189 |
+
'/home/trentm/Music'
|
| 190 |
+
>>> user_desktop_dir()
|
| 191 |
+
'/home/trentm/Desktop'
|
| 192 |
+
>>> user_runtime_dir(appname, appauthor)
|
| 193 |
+
'/run/user/{os.getuid()}/SuperApp'
|
| 194 |
+
>>> site_config_dir(appname)
|
| 195 |
+
'/etc/xdg/SuperApp'
|
| 196 |
+
>>> os.environ["XDG_CONFIG_DIRS"] = "/etc:/usr/local/etc"
|
| 197 |
+
>>> site_config_dir(appname, multipath=True)
|
| 198 |
+
'/etc/SuperApp:/usr/local/etc/SuperApp'
|
| 199 |
+
|
| 200 |
+
On Android::
|
| 201 |
+
|
| 202 |
+
>>> from platformdirs import *
|
| 203 |
+
>>> appname = "SuperApp"
|
| 204 |
+
>>> appauthor = "Acme"
|
| 205 |
+
>>> user_data_dir(appname, appauthor)
|
| 206 |
+
'/data/data/com.myApp/files/SuperApp'
|
| 207 |
+
>>> user_cache_dir(appname, appauthor)
|
| 208 |
+
'/data/data/com.myApp/cache/SuperApp'
|
| 209 |
+
>>> user_log_dir(appname, appauthor)
|
| 210 |
+
'/data/data/com.myApp/cache/SuperApp/log'
|
| 211 |
+
>>> user_config_dir(appname)
|
| 212 |
+
'/data/data/com.myApp/shared_prefs/SuperApp'
|
| 213 |
+
>>> user_documents_dir()
|
| 214 |
+
'/storage/emulated/0/Documents'
|
| 215 |
+
>>> user_downloads_dir()
|
| 216 |
+
'/storage/emulated/0/Downloads'
|
| 217 |
+
>>> user_pictures_dir()
|
| 218 |
+
'/storage/emulated/0/Pictures'
|
| 219 |
+
>>> user_videos_dir()
|
| 220 |
+
'/storage/emulated/0/DCIM/Camera'
|
| 221 |
+
>>> user_music_dir()
|
| 222 |
+
'/storage/emulated/0/Music'
|
| 223 |
+
>>> user_desktop_dir()
|
| 224 |
+
'/storage/emulated/0/Desktop'
|
| 225 |
+
>>> user_runtime_dir(appname, appauthor)
|
| 226 |
+
'/data/data/com.myApp/cache/SuperApp/tmp'
|
| 227 |
+
|
| 228 |
+
Note: Some android apps like Termux and Pydroid are used as shells. These
|
| 229 |
+
apps are used by the end user to emulate Linux environment. Presence of
|
| 230 |
+
``SHELL`` environment variable is used by Platformdirs to differentiate
|
| 231 |
+
between general android apps and android apps used as shells. Shell android
|
| 232 |
+
apps also support ``XDG_*`` environment variables.
|
| 233 |
+
|
| 234 |
+
|
| 235 |
+
``PlatformDirs`` for convenience
|
| 236 |
+
================================
|
| 237 |
+
|
| 238 |
+
.. code-block:: pycon
|
| 239 |
+
|
| 240 |
+
>>> from platformdirs import PlatformDirs
|
| 241 |
+
>>> dirs = PlatformDirs("SuperApp", "Acme")
|
| 242 |
+
>>> dirs.user_data_dir
|
| 243 |
+
'/Users/trentm/Library/Application Support/SuperApp'
|
| 244 |
+
>>> dirs.site_data_dir
|
| 245 |
+
'/Library/Application Support/SuperApp'
|
| 246 |
+
>>> dirs.user_cache_dir
|
| 247 |
+
'/Users/trentm/Library/Caches/SuperApp'
|
| 248 |
+
>>> dirs.user_log_dir
|
| 249 |
+
'/Users/trentm/Library/Logs/SuperApp'
|
| 250 |
+
>>> dirs.user_documents_dir
|
| 251 |
+
'/Users/trentm/Documents'
|
| 252 |
+
>>> dirs.user_downloads_dir
|
| 253 |
+
'/Users/trentm/Downloads'
|
| 254 |
+
>>> dirs.user_pictures_dir
|
| 255 |
+
'/Users/trentm/Pictures'
|
| 256 |
+
>>> dirs.user_videos_dir
|
| 257 |
+
'/Users/trentm/Movies'
|
| 258 |
+
>>> dirs.user_music_dir
|
| 259 |
+
'/Users/trentm/Music'
|
| 260 |
+
>>> dirs.user_desktop_dir
|
| 261 |
+
'/Users/trentm/Desktop'
|
| 262 |
+
>>> dirs.user_runtime_dir
|
| 263 |
+
'/Users/trentm/Library/Caches/TemporaryItems/SuperApp'
|
| 264 |
+
|
| 265 |
+
Per-version isolation
|
| 266 |
+
=====================
|
| 267 |
+
|
| 268 |
+
If you have multiple versions of your app in use that you want to be
|
| 269 |
+
able to run side-by-side, then you may want version-isolation for these
|
| 270 |
+
dirs::
|
| 271 |
+
|
| 272 |
+
>>> from platformdirs import PlatformDirs
|
| 273 |
+
>>> dirs = PlatformDirs("SuperApp", "Acme", version="1.0")
|
| 274 |
+
>>> dirs.user_data_dir
|
| 275 |
+
'/Users/trentm/Library/Application Support/SuperApp/1.0'
|
| 276 |
+
>>> dirs.site_data_dir
|
| 277 |
+
'/Library/Application Support/SuperApp/1.0'
|
| 278 |
+
>>> dirs.user_cache_dir
|
| 279 |
+
'/Users/trentm/Library/Caches/SuperApp/1.0'
|
| 280 |
+
>>> dirs.user_log_dir
|
| 281 |
+
'/Users/trentm/Library/Logs/SuperApp/1.0'
|
| 282 |
+
>>> dirs.user_documents_dir
|
| 283 |
+
'/Users/trentm/Documents'
|
| 284 |
+
>>> dirs.user_downloads_dir
|
| 285 |
+
'/Users/trentm/Downloads'
|
| 286 |
+
>>> dirs.user_pictures_dir
|
| 287 |
+
'/Users/trentm/Pictures'
|
| 288 |
+
>>> dirs.user_videos_dir
|
| 289 |
+
'/Users/trentm/Movies'
|
| 290 |
+
>>> dirs.user_music_dir
|
| 291 |
+
'/Users/trentm/Music'
|
| 292 |
+
>>> dirs.user_desktop_dir
|
| 293 |
+
'/Users/trentm/Desktop'
|
| 294 |
+
>>> dirs.user_runtime_dir
|
| 295 |
+
'/Users/trentm/Library/Caches/TemporaryItems/SuperApp/1.0'
|
| 296 |
+
|
| 297 |
+
Be wary of using this for configuration files though; you'll need to handle
|
| 298 |
+
migrating configuration files manually.
|
| 299 |
+
|
| 300 |
+
Why this Fork?
|
| 301 |
+
==============
|
| 302 |
+
|
| 303 |
+
This repository is a friendly fork of the wonderful work started by
|
| 304 |
+
`ActiveState <https://github.com/ActiveState/appdirs>`_ who created
|
| 305 |
+
``appdirs``, this package's ancestor.
|
| 306 |
+
|
| 307 |
+
Maintaining an open source project is no easy task, particularly
|
| 308 |
+
from within an organization, and the Python community is indebted
|
| 309 |
+
to ``appdirs`` (and to Trent Mick and Jeff Rouse in particular) for
|
| 310 |
+
creating an incredibly useful simple module, as evidenced by the wide
|
| 311 |
+
number of users it has attracted over the years.
|
| 312 |
+
|
| 313 |
+
Nonetheless, given the number of long-standing open issues
|
| 314 |
+
and pull requests, and no clear path towards `ensuring
|
| 315 |
+
that maintenance of the package would continue or grow
|
| 316 |
+
<https://github.com/ActiveState/appdirs/issues/79>`_, this fork was
|
| 317 |
+
created.
|
| 318 |
+
|
| 319 |
+
Contributions are most welcome.
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/platformdirs-4.2.2.dist-info/RECORD
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
platformdirs-4.2.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 2 |
+
platformdirs-4.2.2.dist-info/METADATA,sha256=zmsie01G1MtXR0wgIv5XpVeTO7idr0WWvfmxKsKWuGk,11429
|
| 3 |
+
platformdirs-4.2.2.dist-info/RECORD,,
|
| 4 |
+
platformdirs-4.2.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 5 |
+
platformdirs-4.2.2.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
| 6 |
+
platformdirs-4.2.2.dist-info/licenses/LICENSE,sha256=KeD9YukphQ6G6yjD_czwzv30-pSHkBHP-z0NS-1tTbY,1089
|
| 7 |
+
platformdirs/__init__.py,sha256=EMGE8qeHRR9CzDFr8kL3tA8hdZZniYjXBVZd0UGTWK0,22225
|
| 8 |
+
platformdirs/__main__.py,sha256=HnsUQHpiBaiTxwcmwVw-nFaPdVNZtQIdi1eWDtI-MzI,1493
|
| 9 |
+
platformdirs/__pycache__/__init__.cpython-312.pyc,,
|
| 10 |
+
platformdirs/__pycache__/__main__.cpython-312.pyc,,
|
| 11 |
+
platformdirs/__pycache__/android.cpython-312.pyc,,
|
| 12 |
+
platformdirs/__pycache__/api.cpython-312.pyc,,
|
| 13 |
+
platformdirs/__pycache__/macos.cpython-312.pyc,,
|
| 14 |
+
platformdirs/__pycache__/unix.cpython-312.pyc,,
|
| 15 |
+
platformdirs/__pycache__/version.cpython-312.pyc,,
|
| 16 |
+
platformdirs/__pycache__/windows.cpython-312.pyc,,
|
| 17 |
+
platformdirs/android.py,sha256=xZXY9Jd46WOsxT2U6-5HsNtDZ-IQqxcEUrBLl3hYk4o,9016
|
| 18 |
+
platformdirs/api.py,sha256=QBYdUac2eC521ek_y53uD1Dcq-lJX8IgSRVd4InC6uc,8996
|
| 19 |
+
platformdirs/macos.py,sha256=wftsbsvq6nZ0WORXSiCrZNkRHz_WKuktl0a6mC7MFkI,5580
|
| 20 |
+
platformdirs/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 21 |
+
platformdirs/unix.py,sha256=Cci9Wqt35dAMsg6HT9nRGHSBW5obb0pR3AE1JJnsCXg,10643
|
| 22 |
+
platformdirs/version.py,sha256=r7F76tZRjgQKzrpx_I0_ZMQOMU-PS7eGnHD7zEK3KB0,411
|
| 23 |
+
platformdirs/windows.py,sha256=IFpiohUBwxPtCzlyKwNtxyW4Jk8haa6W8o59mfrDXVo,10125
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/platformdirs-4.2.2.dist-info/REQUESTED
ADDED
|
File without changes
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/platformdirs-4.2.2.dist-info/WHEEL
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Wheel-Version: 1.0
|
| 2 |
+
Generator: hatchling 1.24.2
|
| 3 |
+
Root-Is-Purelib: true
|
| 4 |
+
Tag: py3-none-any
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/platformdirs-4.2.2.dist-info/licenses/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2010-202x The platformdirs developers
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/platformdirs/version.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# file generated by setuptools_scm
|
| 2 |
+
# don't change, don't track in version control
|
| 3 |
+
TYPE_CHECKING = False
|
| 4 |
+
if TYPE_CHECKING:
|
| 5 |
+
from typing import Tuple, Union
|
| 6 |
+
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
| 7 |
+
else:
|
| 8 |
+
VERSION_TUPLE = object
|
| 9 |
+
|
| 10 |
+
version: str
|
| 11 |
+
__version__: str
|
| 12 |
+
__version_tuple__: VERSION_TUPLE
|
| 13 |
+
version_tuple: VERSION_TUPLE
|
| 14 |
+
|
| 15 |
+
__version__ = version = '4.2.2'
|
| 16 |
+
__version_tuple__ = version_tuple = (4, 2, 2)
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/platformdirs/windows.py
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Windows."""
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
import os
|
| 6 |
+
import sys
|
| 7 |
+
from functools import lru_cache
|
| 8 |
+
from typing import TYPE_CHECKING
|
| 9 |
+
|
| 10 |
+
from .api import PlatformDirsABC
|
| 11 |
+
|
| 12 |
+
if TYPE_CHECKING:
|
| 13 |
+
from collections.abc import Callable
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
class Windows(PlatformDirsABC):
|
| 17 |
+
"""
|
| 18 |
+
`MSDN on where to store app data files <https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid>`_.
|
| 19 |
+
|
| 20 |
+
Makes use of the `appname <platformdirs.api.PlatformDirsABC.appname>`, `appauthor
|
| 21 |
+
<platformdirs.api.PlatformDirsABC.appauthor>`, `version <platformdirs.api.PlatformDirsABC.version>`, `roaming
|
| 22 |
+
<platformdirs.api.PlatformDirsABC.roaming>`, `opinion <platformdirs.api.PlatformDirsABC.opinion>`, `ensure_exists
|
| 23 |
+
<platformdirs.api.PlatformDirsABC.ensure_exists>`.
|
| 24 |
+
|
| 25 |
+
"""
|
| 26 |
+
|
| 27 |
+
@property
|
| 28 |
+
def user_data_dir(self) -> str:
|
| 29 |
+
"""
|
| 30 |
+
:return: data directory tied to the user, e.g.
|
| 31 |
+
``%USERPROFILE%\\AppData\\Local\\$appauthor\\$appname`` (not roaming) or
|
| 32 |
+
``%USERPROFILE%\\AppData\\Roaming\\$appauthor\\$appname`` (roaming)
|
| 33 |
+
"""
|
| 34 |
+
const = "CSIDL_APPDATA" if self.roaming else "CSIDL_LOCAL_APPDATA"
|
| 35 |
+
path = os.path.normpath(get_win_folder(const))
|
| 36 |
+
return self._append_parts(path)
|
| 37 |
+
|
| 38 |
+
def _append_parts(self, path: str, *, opinion_value: str | None = None) -> str:
|
| 39 |
+
params = []
|
| 40 |
+
if self.appname:
|
| 41 |
+
if self.appauthor is not False:
|
| 42 |
+
author = self.appauthor or self.appname
|
| 43 |
+
params.append(author)
|
| 44 |
+
params.append(self.appname)
|
| 45 |
+
if opinion_value is not None and self.opinion:
|
| 46 |
+
params.append(opinion_value)
|
| 47 |
+
if self.version:
|
| 48 |
+
params.append(self.version)
|
| 49 |
+
path = os.path.join(path, *params) # noqa: PTH118
|
| 50 |
+
self._optionally_create_directory(path)
|
| 51 |
+
return path
|
| 52 |
+
|
| 53 |
+
@property
|
| 54 |
+
def site_data_dir(self) -> str:
|
| 55 |
+
""":return: data directory shared by users, e.g. ``C:\\ProgramData\\$appauthor\\$appname``"""
|
| 56 |
+
path = os.path.normpath(get_win_folder("CSIDL_COMMON_APPDATA"))
|
| 57 |
+
return self._append_parts(path)
|
| 58 |
+
|
| 59 |
+
@property
|
| 60 |
+
def user_config_dir(self) -> str:
|
| 61 |
+
""":return: config directory tied to the user, same as `user_data_dir`"""
|
| 62 |
+
return self.user_data_dir
|
| 63 |
+
|
| 64 |
+
@property
|
| 65 |
+
def site_config_dir(self) -> str:
|
| 66 |
+
""":return: config directory shared by the users, same as `site_data_dir`"""
|
| 67 |
+
return self.site_data_dir
|
| 68 |
+
|
| 69 |
+
@property
|
| 70 |
+
def user_cache_dir(self) -> str:
|
| 71 |
+
"""
|
| 72 |
+
:return: cache directory tied to the user (if opinionated with ``Cache`` folder within ``$appname``) e.g.
|
| 73 |
+
``%USERPROFILE%\\AppData\\Local\\$appauthor\\$appname\\Cache\\$version``
|
| 74 |
+
"""
|
| 75 |
+
path = os.path.normpath(get_win_folder("CSIDL_LOCAL_APPDATA"))
|
| 76 |
+
return self._append_parts(path, opinion_value="Cache")
|
| 77 |
+
|
| 78 |
+
@property
|
| 79 |
+
def site_cache_dir(self) -> str:
|
| 80 |
+
""":return: cache directory shared by users, e.g. ``C:\\ProgramData\\$appauthor\\$appname\\Cache\\$version``"""
|
| 81 |
+
path = os.path.normpath(get_win_folder("CSIDL_COMMON_APPDATA"))
|
| 82 |
+
return self._append_parts(path, opinion_value="Cache")
|
| 83 |
+
|
| 84 |
+
@property
|
| 85 |
+
def user_state_dir(self) -> str:
|
| 86 |
+
""":return: state directory tied to the user, same as `user_data_dir`"""
|
| 87 |
+
return self.user_data_dir
|
| 88 |
+
|
| 89 |
+
@property
|
| 90 |
+
def user_log_dir(self) -> str:
|
| 91 |
+
""":return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it"""
|
| 92 |
+
path = self.user_data_dir
|
| 93 |
+
if self.opinion:
|
| 94 |
+
path = os.path.join(path, "Logs") # noqa: PTH118
|
| 95 |
+
self._optionally_create_directory(path)
|
| 96 |
+
return path
|
| 97 |
+
|
| 98 |
+
@property
|
| 99 |
+
def user_documents_dir(self) -> str:
|
| 100 |
+
""":return: documents directory tied to the user e.g. ``%USERPROFILE%\\Documents``"""
|
| 101 |
+
return os.path.normpath(get_win_folder("CSIDL_PERSONAL"))
|
| 102 |
+
|
| 103 |
+
@property
|
| 104 |
+
def user_downloads_dir(self) -> str:
|
| 105 |
+
""":return: downloads directory tied to the user e.g. ``%USERPROFILE%\\Downloads``"""
|
| 106 |
+
return os.path.normpath(get_win_folder("CSIDL_DOWNLOADS"))
|
| 107 |
+
|
| 108 |
+
@property
|
| 109 |
+
def user_pictures_dir(self) -> str:
|
| 110 |
+
""":return: pictures directory tied to the user e.g. ``%USERPROFILE%\\Pictures``"""
|
| 111 |
+
return os.path.normpath(get_win_folder("CSIDL_MYPICTURES"))
|
| 112 |
+
|
| 113 |
+
@property
|
| 114 |
+
def user_videos_dir(self) -> str:
|
| 115 |
+
""":return: videos directory tied to the user e.g. ``%USERPROFILE%\\Videos``"""
|
| 116 |
+
return os.path.normpath(get_win_folder("CSIDL_MYVIDEO"))
|
| 117 |
+
|
| 118 |
+
@property
|
| 119 |
+
def user_music_dir(self) -> str:
|
| 120 |
+
""":return: music directory tied to the user e.g. ``%USERPROFILE%\\Music``"""
|
| 121 |
+
return os.path.normpath(get_win_folder("CSIDL_MYMUSIC"))
|
| 122 |
+
|
| 123 |
+
@property
|
| 124 |
+
def user_desktop_dir(self) -> str:
|
| 125 |
+
""":return: desktop directory tied to the user, e.g. ``%USERPROFILE%\\Desktop``"""
|
| 126 |
+
return os.path.normpath(get_win_folder("CSIDL_DESKTOPDIRECTORY"))
|
| 127 |
+
|
| 128 |
+
@property
|
| 129 |
+
def user_runtime_dir(self) -> str:
|
| 130 |
+
"""
|
| 131 |
+
:return: runtime directory tied to the user, e.g.
|
| 132 |
+
``%USERPROFILE%\\AppData\\Local\\Temp\\$appauthor\\$appname``
|
| 133 |
+
"""
|
| 134 |
+
path = os.path.normpath(os.path.join(get_win_folder("CSIDL_LOCAL_APPDATA"), "Temp")) # noqa: PTH118
|
| 135 |
+
return self._append_parts(path)
|
| 136 |
+
|
| 137 |
+
@property
|
| 138 |
+
def site_runtime_dir(self) -> str:
|
| 139 |
+
""":return: runtime directory shared by users, same as `user_runtime_dir`"""
|
| 140 |
+
return self.user_runtime_dir
|
| 141 |
+
|
| 142 |
+
|
| 143 |
+
def get_win_folder_from_env_vars(csidl_name: str) -> str:
|
| 144 |
+
"""Get folder from environment variables."""
|
| 145 |
+
result = get_win_folder_if_csidl_name_not_env_var(csidl_name)
|
| 146 |
+
if result is not None:
|
| 147 |
+
return result
|
| 148 |
+
|
| 149 |
+
env_var_name = {
|
| 150 |
+
"CSIDL_APPDATA": "APPDATA",
|
| 151 |
+
"CSIDL_COMMON_APPDATA": "ALLUSERSPROFILE",
|
| 152 |
+
"CSIDL_LOCAL_APPDATA": "LOCALAPPDATA",
|
| 153 |
+
}.get(csidl_name)
|
| 154 |
+
if env_var_name is None:
|
| 155 |
+
msg = f"Unknown CSIDL name: {csidl_name}"
|
| 156 |
+
raise ValueError(msg)
|
| 157 |
+
result = os.environ.get(env_var_name)
|
| 158 |
+
if result is None:
|
| 159 |
+
msg = f"Unset environment variable: {env_var_name}"
|
| 160 |
+
raise ValueError(msg)
|
| 161 |
+
return result
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
def get_win_folder_if_csidl_name_not_env_var(csidl_name: str) -> str | None:
|
| 165 |
+
"""Get a folder for a CSIDL name that does not exist as an environment variable."""
|
| 166 |
+
if csidl_name == "CSIDL_PERSONAL":
|
| 167 |
+
return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Documents") # noqa: PTH118
|
| 168 |
+
|
| 169 |
+
if csidl_name == "CSIDL_DOWNLOADS":
|
| 170 |
+
return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Downloads") # noqa: PTH118
|
| 171 |
+
|
| 172 |
+
if csidl_name == "CSIDL_MYPICTURES":
|
| 173 |
+
return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Pictures") # noqa: PTH118
|
| 174 |
+
|
| 175 |
+
if csidl_name == "CSIDL_MYVIDEO":
|
| 176 |
+
return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Videos") # noqa: PTH118
|
| 177 |
+
|
| 178 |
+
if csidl_name == "CSIDL_MYMUSIC":
|
| 179 |
+
return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Music") # noqa: PTH118
|
| 180 |
+
return None
|
| 181 |
+
|
| 182 |
+
|
| 183 |
+
def get_win_folder_from_registry(csidl_name: str) -> str:
|
| 184 |
+
"""
|
| 185 |
+
Get folder from the registry.
|
| 186 |
+
|
| 187 |
+
This is a fallback technique at best. I'm not sure if using the registry for these guarantees us the correct answer
|
| 188 |
+
for all CSIDL_* names.
|
| 189 |
+
|
| 190 |
+
"""
|
| 191 |
+
shell_folder_name = {
|
| 192 |
+
"CSIDL_APPDATA": "AppData",
|
| 193 |
+
"CSIDL_COMMON_APPDATA": "Common AppData",
|
| 194 |
+
"CSIDL_LOCAL_APPDATA": "Local AppData",
|
| 195 |
+
"CSIDL_PERSONAL": "Personal",
|
| 196 |
+
"CSIDL_DOWNLOADS": "{374DE290-123F-4565-9164-39C4925E467B}",
|
| 197 |
+
"CSIDL_MYPICTURES": "My Pictures",
|
| 198 |
+
"CSIDL_MYVIDEO": "My Video",
|
| 199 |
+
"CSIDL_MYMUSIC": "My Music",
|
| 200 |
+
}.get(csidl_name)
|
| 201 |
+
if shell_folder_name is None:
|
| 202 |
+
msg = f"Unknown CSIDL name: {csidl_name}"
|
| 203 |
+
raise ValueError(msg)
|
| 204 |
+
if sys.platform != "win32": # only needed for mypy type checker to know that this code runs only on Windows
|
| 205 |
+
raise NotImplementedError
|
| 206 |
+
import winreg # noqa: PLC0415
|
| 207 |
+
|
| 208 |
+
key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders")
|
| 209 |
+
directory, _ = winreg.QueryValueEx(key, shell_folder_name)
|
| 210 |
+
return str(directory)
|
| 211 |
+
|
| 212 |
+
|
| 213 |
+
def get_win_folder_via_ctypes(csidl_name: str) -> str:
|
| 214 |
+
"""Get folder with ctypes."""
|
| 215 |
+
# There is no 'CSIDL_DOWNLOADS'.
|
| 216 |
+
# Use 'CSIDL_PROFILE' (40) and append the default folder 'Downloads' instead.
|
| 217 |
+
# https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid
|
| 218 |
+
|
| 219 |
+
import ctypes # noqa: PLC0415
|
| 220 |
+
|
| 221 |
+
csidl_const = {
|
| 222 |
+
"CSIDL_APPDATA": 26,
|
| 223 |
+
"CSIDL_COMMON_APPDATA": 35,
|
| 224 |
+
"CSIDL_LOCAL_APPDATA": 28,
|
| 225 |
+
"CSIDL_PERSONAL": 5,
|
| 226 |
+
"CSIDL_MYPICTURES": 39,
|
| 227 |
+
"CSIDL_MYVIDEO": 14,
|
| 228 |
+
"CSIDL_MYMUSIC": 13,
|
| 229 |
+
"CSIDL_DOWNLOADS": 40,
|
| 230 |
+
"CSIDL_DESKTOPDIRECTORY": 16,
|
| 231 |
+
}.get(csidl_name)
|
| 232 |
+
if csidl_const is None:
|
| 233 |
+
msg = f"Unknown CSIDL name: {csidl_name}"
|
| 234 |
+
raise ValueError(msg)
|
| 235 |
+
|
| 236 |
+
buf = ctypes.create_unicode_buffer(1024)
|
| 237 |
+
windll = getattr(ctypes, "windll") # noqa: B009 # using getattr to avoid false positive with mypy type checker
|
| 238 |
+
windll.shell32.SHGetFolderPathW(None, csidl_const, None, 0, buf)
|
| 239 |
+
|
| 240 |
+
# Downgrade to short path name if it has high-bit chars.
|
| 241 |
+
if any(ord(c) > 255 for c in buf): # noqa: PLR2004
|
| 242 |
+
buf2 = ctypes.create_unicode_buffer(1024)
|
| 243 |
+
if windll.kernel32.GetShortPathNameW(buf.value, buf2, 1024):
|
| 244 |
+
buf = buf2
|
| 245 |
+
|
| 246 |
+
if csidl_name == "CSIDL_DOWNLOADS":
|
| 247 |
+
return os.path.join(buf.value, "Downloads") # noqa: PTH118
|
| 248 |
+
|
| 249 |
+
return buf.value
|
| 250 |
+
|
| 251 |
+
|
| 252 |
+
def _pick_get_win_folder() -> Callable[[str], str]:
|
| 253 |
+
try:
|
| 254 |
+
import ctypes # noqa: PLC0415
|
| 255 |
+
except ImportError:
|
| 256 |
+
pass
|
| 257 |
+
else:
|
| 258 |
+
if hasattr(ctypes, "windll"):
|
| 259 |
+
return get_win_folder_via_ctypes
|
| 260 |
+
try:
|
| 261 |
+
import winreg # noqa: PLC0415, F401
|
| 262 |
+
except ImportError:
|
| 263 |
+
return get_win_folder_from_env_vars
|
| 264 |
+
else:
|
| 265 |
+
return get_win_folder_from_registry
|
| 266 |
+
|
| 267 |
+
|
| 268 |
+
get_win_folder = lru_cache(maxsize=None)(_pick_get_win_folder())
|
| 269 |
+
|
| 270 |
+
__all__ = [
|
| 271 |
+
"Windows",
|
| 272 |
+
]
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli-2.0.1.dist-info/INSTALLER
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
pip
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli-2.0.1.dist-info/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2021 Taneli Hukkinen
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli-2.0.1.dist-info/METADATA
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.1
|
| 2 |
+
Name: tomli
|
| 3 |
+
Version: 2.0.1
|
| 4 |
+
Summary: A lil' TOML parser
|
| 5 |
+
Keywords: toml
|
| 6 |
+
Author-email: Taneli Hukkinen <hukkin@users.noreply.github.com>
|
| 7 |
+
Requires-Python: >=3.7
|
| 8 |
+
Description-Content-Type: text/markdown
|
| 9 |
+
Classifier: License :: OSI Approved :: MIT License
|
| 10 |
+
Classifier: Operating System :: MacOS
|
| 11 |
+
Classifier: Operating System :: Microsoft :: Windows
|
| 12 |
+
Classifier: Operating System :: POSIX :: Linux
|
| 13 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
| 14 |
+
Classifier: Programming Language :: Python :: 3.7
|
| 15 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 16 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 17 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 18 |
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
| 19 |
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
| 20 |
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
| 21 |
+
Classifier: Typing :: Typed
|
| 22 |
+
Project-URL: Changelog, https://github.com/hukkin/tomli/blob/master/CHANGELOG.md
|
| 23 |
+
Project-URL: Homepage, https://github.com/hukkin/tomli
|
| 24 |
+
|
| 25 |
+
[](https://github.com/hukkin/tomli/actions?query=workflow%3ATests+branch%3Amaster+event%3Apush)
|
| 26 |
+
[](https://codecov.io/gh/hukkin/tomli)
|
| 27 |
+
[](https://pypi.org/project/tomli)
|
| 28 |
+
|
| 29 |
+
# Tomli
|
| 30 |
+
|
| 31 |
+
> A lil' TOML parser
|
| 32 |
+
|
| 33 |
+
**Table of Contents** *generated with [mdformat-toc](https://github.com/hukkin/mdformat-toc)*
|
| 34 |
+
|
| 35 |
+
<!-- mdformat-toc start --slug=github --maxlevel=6 --minlevel=2 -->
|
| 36 |
+
|
| 37 |
+
- [Intro](#intro)
|
| 38 |
+
- [Installation](#installation)
|
| 39 |
+
- [Usage](#usage)
|
| 40 |
+
- [Parse a TOML string](#parse-a-toml-string)
|
| 41 |
+
- [Parse a TOML file](#parse-a-toml-file)
|
| 42 |
+
- [Handle invalid TOML](#handle-invalid-toml)
|
| 43 |
+
- [Construct `decimal.Decimal`s from TOML floats](#construct-decimaldecimals-from-toml-floats)
|
| 44 |
+
- [FAQ](#faq)
|
| 45 |
+
- [Why this parser?](#why-this-parser)
|
| 46 |
+
- [Is comment preserving round-trip parsing supported?](#is-comment-preserving-round-trip-parsing-supported)
|
| 47 |
+
- [Is there a `dumps`, `write` or `encode` function?](#is-there-a-dumps-write-or-encode-function)
|
| 48 |
+
- [How do TOML types map into Python types?](#how-do-toml-types-map-into-python-types)
|
| 49 |
+
- [Performance](#performance)
|
| 50 |
+
|
| 51 |
+
<!-- mdformat-toc end -->
|
| 52 |
+
|
| 53 |
+
## Intro<a name="intro"></a>
|
| 54 |
+
|
| 55 |
+
Tomli is a Python library for parsing [TOML](https://toml.io).
|
| 56 |
+
Tomli is fully compatible with [TOML v1.0.0](https://toml.io/en/v1.0.0).
|
| 57 |
+
|
| 58 |
+
## Installation<a name="installation"></a>
|
| 59 |
+
|
| 60 |
+
```bash
|
| 61 |
+
pip install tomli
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
## Usage<a name="usage"></a>
|
| 65 |
+
|
| 66 |
+
### Parse a TOML string<a name="parse-a-toml-string"></a>
|
| 67 |
+
|
| 68 |
+
```python
|
| 69 |
+
import tomli
|
| 70 |
+
|
| 71 |
+
toml_str = """
|
| 72 |
+
gretzky = 99
|
| 73 |
+
|
| 74 |
+
[kurri]
|
| 75 |
+
jari = 17
|
| 76 |
+
"""
|
| 77 |
+
|
| 78 |
+
toml_dict = tomli.loads(toml_str)
|
| 79 |
+
assert toml_dict == {"gretzky": 99, "kurri": {"jari": 17}}
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
### Parse a TOML file<a name="parse-a-toml-file"></a>
|
| 83 |
+
|
| 84 |
+
```python
|
| 85 |
+
import tomli
|
| 86 |
+
|
| 87 |
+
with open("path_to_file/conf.toml", "rb") as f:
|
| 88 |
+
toml_dict = tomli.load(f)
|
| 89 |
+
```
|
| 90 |
+
|
| 91 |
+
The file must be opened in binary mode (with the `"rb"` flag).
|
| 92 |
+
Binary mode will enforce decoding the file as UTF-8 with universal newlines disabled,
|
| 93 |
+
both of which are required to correctly parse TOML.
|
| 94 |
+
|
| 95 |
+
### Handle invalid TOML<a name="handle-invalid-toml"></a>
|
| 96 |
+
|
| 97 |
+
```python
|
| 98 |
+
import tomli
|
| 99 |
+
|
| 100 |
+
try:
|
| 101 |
+
toml_dict = tomli.loads("]] this is invalid TOML [[")
|
| 102 |
+
except tomli.TOMLDecodeError:
|
| 103 |
+
print("Yep, definitely not valid.")
|
| 104 |
+
```
|
| 105 |
+
|
| 106 |
+
Note that error messages are considered informational only.
|
| 107 |
+
They should not be assumed to stay constant across Tomli versions.
|
| 108 |
+
|
| 109 |
+
### Construct `decimal.Decimal`s from TOML floats<a name="construct-decimaldecimals-from-toml-floats"></a>
|
| 110 |
+
|
| 111 |
+
```python
|
| 112 |
+
from decimal import Decimal
|
| 113 |
+
import tomli
|
| 114 |
+
|
| 115 |
+
toml_dict = tomli.loads("precision-matters = 0.982492", parse_float=Decimal)
|
| 116 |
+
assert toml_dict["precision-matters"] == Decimal("0.982492")
|
| 117 |
+
```
|
| 118 |
+
|
| 119 |
+
Note that `decimal.Decimal` can be replaced with another callable that converts a TOML float from string to a Python type.
|
| 120 |
+
The `decimal.Decimal` is, however, a practical choice for use cases where float inaccuracies can not be tolerated.
|
| 121 |
+
|
| 122 |
+
Illegal types are `dict` and `list`, and their subtypes.
|
| 123 |
+
A `ValueError` will be raised if `parse_float` produces illegal types.
|
| 124 |
+
|
| 125 |
+
## FAQ<a name="faq"></a>
|
| 126 |
+
|
| 127 |
+
### Why this parser?<a name="why-this-parser"></a>
|
| 128 |
+
|
| 129 |
+
- it's lil'
|
| 130 |
+
- pure Python with zero dependencies
|
| 131 |
+
- the fastest pure Python parser [\*](#performance):
|
| 132 |
+
15x as fast as [tomlkit](https://pypi.org/project/tomlkit/),
|
| 133 |
+
2.4x as fast as [toml](https://pypi.org/project/toml/)
|
| 134 |
+
- outputs [basic data types](#how-do-toml-types-map-into-python-types) only
|
| 135 |
+
- 100% spec compliant: passes all tests in
|
| 136 |
+
[a test set](https://github.com/toml-lang/compliance/pull/8)
|
| 137 |
+
soon to be merged to the official
|
| 138 |
+
[compliance tests for TOML](https://github.com/toml-lang/compliance)
|
| 139 |
+
repository
|
| 140 |
+
- thoroughly tested: 100% branch coverage
|
| 141 |
+
|
| 142 |
+
### Is comment preserving round-trip parsing supported?<a name="is-comment-preserving-round-trip-parsing-supported"></a>
|
| 143 |
+
|
| 144 |
+
No.
|
| 145 |
+
|
| 146 |
+
The `tomli.loads` function returns a plain `dict` that is populated with builtin types and types from the standard library only.
|
| 147 |
+
Preserving comments requires a custom type to be returned so will not be supported,
|
| 148 |
+
at least not by the `tomli.loads` and `tomli.load` functions.
|
| 149 |
+
|
| 150 |
+
Look into [TOML Kit](https://github.com/sdispater/tomlkit) if preservation of style is what you need.
|
| 151 |
+
|
| 152 |
+
### Is there a `dumps`, `write` or `encode` function?<a name="is-there-a-dumps-write-or-encode-function"></a>
|
| 153 |
+
|
| 154 |
+
[Tomli-W](https://github.com/hukkin/tomli-w) is the write-only counterpart of Tomli, providing `dump` and `dumps` functions.
|
| 155 |
+
|
| 156 |
+
The core library does not include write capability, as most TOML use cases are read-only, and Tomli intends to be minimal.
|
| 157 |
+
|
| 158 |
+
### How do TOML types map into Python types?<a name="how-do-toml-types-map-into-python-types"></a>
|
| 159 |
+
|
| 160 |
+
| TOML type | Python type | Details |
|
| 161 |
+
| ---------------- | ------------------- | ------------------------------------------------------------ |
|
| 162 |
+
| Document Root | `dict` | |
|
| 163 |
+
| Key | `str` | |
|
| 164 |
+
| String | `str` | |
|
| 165 |
+
| Integer | `int` | |
|
| 166 |
+
| Float | `float` | |
|
| 167 |
+
| Boolean | `bool` | |
|
| 168 |
+
| Offset Date-Time | `datetime.datetime` | `tzinfo` attribute set to an instance of `datetime.timezone` |
|
| 169 |
+
| Local Date-Time | `datetime.datetime` | `tzinfo` attribute set to `None` |
|
| 170 |
+
| Local Date | `datetime.date` | |
|
| 171 |
+
| Local Time | `datetime.time` | |
|
| 172 |
+
| Array | `list` | |
|
| 173 |
+
| Table | `dict` | |
|
| 174 |
+
| Inline Table | `dict` | |
|
| 175 |
+
|
| 176 |
+
## Performance<a name="performance"></a>
|
| 177 |
+
|
| 178 |
+
The `benchmark/` folder in this repository contains a performance benchmark for comparing the various Python TOML parsers.
|
| 179 |
+
The benchmark can be run with `tox -e benchmark-pypi`.
|
| 180 |
+
Running the benchmark on my personal computer output the following:
|
| 181 |
+
|
| 182 |
+
```console
|
| 183 |
+
foo@bar:~/dev/tomli$ tox -e benchmark-pypi
|
| 184 |
+
benchmark-pypi installed: attrs==19.3.0,click==7.1.2,pytomlpp==1.0.2,qtoml==0.3.0,rtoml==0.7.0,toml==0.10.2,tomli==1.1.0,tomlkit==0.7.2
|
| 185 |
+
benchmark-pypi run-test-pre: PYTHONHASHSEED='2658546909'
|
| 186 |
+
benchmark-pypi run-test: commands[0] | python -c 'import datetime; print(datetime.date.today())'
|
| 187 |
+
2021-07-23
|
| 188 |
+
benchmark-pypi run-test: commands[1] | python --version
|
| 189 |
+
Python 3.8.10
|
| 190 |
+
benchmark-pypi run-test: commands[2] | python benchmark/run.py
|
| 191 |
+
Parsing data.toml 5000 times:
|
| 192 |
+
------------------------------------------------------
|
| 193 |
+
parser | exec time | performance (more is better)
|
| 194 |
+
-----------+------------+-----------------------------
|
| 195 |
+
rtoml | 0.901 s | baseline (100%)
|
| 196 |
+
pytomlpp | 1.08 s | 83.15%
|
| 197 |
+
tomli | 3.89 s | 23.15%
|
| 198 |
+
toml | 9.36 s | 9.63%
|
| 199 |
+
qtoml | 11.5 s | 7.82%
|
| 200 |
+
tomlkit | 56.8 s | 1.59%
|
| 201 |
+
```
|
| 202 |
+
|
| 203 |
+
The parsers are ordered from fastest to slowest, using the fastest parser as baseline.
|
| 204 |
+
Tomli performed the best out of all pure Python TOML parsers,
|
| 205 |
+
losing only to pytomlpp (wraps C++) and rtoml (wraps Rust).
|
| 206 |
+
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli-2.0.1.dist-info/RECORD
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
tomli-2.0.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 2 |
+
tomli-2.0.1.dist-info/LICENSE,sha256=uAgWsNUwuKzLTCIReDeQmEpuO2GSLCte6S8zcqsnQv4,1072
|
| 3 |
+
tomli-2.0.1.dist-info/METADATA,sha256=zPDceKmPwJGLWtZykrHixL7WVXWmJGzZ1jyRT5lCoPI,8875
|
| 4 |
+
tomli-2.0.1.dist-info/RECORD,,
|
| 5 |
+
tomli-2.0.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 6 |
+
tomli-2.0.1.dist-info/WHEEL,sha256=jPMR_Dzkc4X4icQtmz81lnNY_kAsfog7ry7qoRvYLXw,81
|
| 7 |
+
tomli/__init__.py,sha256=JhUwV66DB1g4Hvt1UQCVMdfCu-IgAV8FXmvDU9onxd4,396
|
| 8 |
+
tomli/__pycache__/__init__.cpython-312.pyc,,
|
| 9 |
+
tomli/__pycache__/_parser.cpython-312.pyc,,
|
| 10 |
+
tomli/__pycache__/_re.cpython-312.pyc,,
|
| 11 |
+
tomli/__pycache__/_types.cpython-312.pyc,,
|
| 12 |
+
tomli/_parser.py,sha256=g9-ENaALS-B8dokYpCuzUFalWlog7T-SIYMjLZSWrtM,22633
|
| 13 |
+
tomli/_re.py,sha256=dbjg5ChZT23Ka9z9DHOXfdtSpPwUfdgMXnj8NOoly-w,2943
|
| 14 |
+
tomli/_types.py,sha256=-GTG2VUqkpxwMqzmVO4F7ybKddIbAnuAHXfmWQcTi3Q,254
|
| 15 |
+
tomli/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli-2.0.1.dist-info/REQUESTED
ADDED
|
File without changes
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli-2.0.1.dist-info/WHEEL
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Wheel-Version: 1.0
|
| 2 |
+
Generator: flit 3.6.0
|
| 3 |
+
Root-Is-Purelib: true
|
| 4 |
+
Tag: py3-none-any
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli/__init__.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-License-Identifier: MIT
|
| 2 |
+
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
|
| 3 |
+
# Licensed to PSF under a Contributor Agreement.
|
| 4 |
+
|
| 5 |
+
__all__ = ("loads", "load", "TOMLDecodeError")
|
| 6 |
+
__version__ = "2.0.1" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
|
| 7 |
+
|
| 8 |
+
from ._parser import TOMLDecodeError, load, loads
|
| 9 |
+
|
| 10 |
+
# Pretend this exception was created here.
|
| 11 |
+
TOMLDecodeError.__module__ = __name__
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli/_parser.py
ADDED
|
@@ -0,0 +1,691 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-License-Identifier: MIT
|
| 2 |
+
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
|
| 3 |
+
# Licensed to PSF under a Contributor Agreement.
|
| 4 |
+
|
| 5 |
+
from __future__ import annotations
|
| 6 |
+
|
| 7 |
+
from collections.abc import Iterable
|
| 8 |
+
import string
|
| 9 |
+
from types import MappingProxyType
|
| 10 |
+
from typing import Any, BinaryIO, NamedTuple
|
| 11 |
+
|
| 12 |
+
from ._re import (
|
| 13 |
+
RE_DATETIME,
|
| 14 |
+
RE_LOCALTIME,
|
| 15 |
+
RE_NUMBER,
|
| 16 |
+
match_to_datetime,
|
| 17 |
+
match_to_localtime,
|
| 18 |
+
match_to_number,
|
| 19 |
+
)
|
| 20 |
+
from ._types import Key, ParseFloat, Pos
|
| 21 |
+
|
| 22 |
+
ASCII_CTRL = frozenset(chr(i) for i in range(32)) | frozenset(chr(127))
|
| 23 |
+
|
| 24 |
+
# Neither of these sets include quotation mark or backslash. They are
|
| 25 |
+
# currently handled as separate cases in the parser functions.
|
| 26 |
+
ILLEGAL_BASIC_STR_CHARS = ASCII_CTRL - frozenset("\t")
|
| 27 |
+
ILLEGAL_MULTILINE_BASIC_STR_CHARS = ASCII_CTRL - frozenset("\t\n")
|
| 28 |
+
|
| 29 |
+
ILLEGAL_LITERAL_STR_CHARS = ILLEGAL_BASIC_STR_CHARS
|
| 30 |
+
ILLEGAL_MULTILINE_LITERAL_STR_CHARS = ILLEGAL_MULTILINE_BASIC_STR_CHARS
|
| 31 |
+
|
| 32 |
+
ILLEGAL_COMMENT_CHARS = ILLEGAL_BASIC_STR_CHARS
|
| 33 |
+
|
| 34 |
+
TOML_WS = frozenset(" \t")
|
| 35 |
+
TOML_WS_AND_NEWLINE = TOML_WS | frozenset("\n")
|
| 36 |
+
BARE_KEY_CHARS = frozenset(string.ascii_letters + string.digits + "-_")
|
| 37 |
+
KEY_INITIAL_CHARS = BARE_KEY_CHARS | frozenset("\"'")
|
| 38 |
+
HEXDIGIT_CHARS = frozenset(string.hexdigits)
|
| 39 |
+
|
| 40 |
+
BASIC_STR_ESCAPE_REPLACEMENTS = MappingProxyType(
|
| 41 |
+
{
|
| 42 |
+
"\\b": "\u0008", # backspace
|
| 43 |
+
"\\t": "\u0009", # tab
|
| 44 |
+
"\\n": "\u000A", # linefeed
|
| 45 |
+
"\\f": "\u000C", # form feed
|
| 46 |
+
"\\r": "\u000D", # carriage return
|
| 47 |
+
'\\"': "\u0022", # quote
|
| 48 |
+
"\\\\": "\u005C", # backslash
|
| 49 |
+
}
|
| 50 |
+
)
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
class TOMLDecodeError(ValueError):
|
| 54 |
+
"""An error raised if a document is not valid TOML."""
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
def load(__fp: BinaryIO, *, parse_float: ParseFloat = float) -> dict[str, Any]:
|
| 58 |
+
"""Parse TOML from a binary file object."""
|
| 59 |
+
b = __fp.read()
|
| 60 |
+
try:
|
| 61 |
+
s = b.decode()
|
| 62 |
+
except AttributeError:
|
| 63 |
+
raise TypeError(
|
| 64 |
+
"File must be opened in binary mode, e.g. use `open('foo.toml', 'rb')`"
|
| 65 |
+
) from None
|
| 66 |
+
return loads(s, parse_float=parse_float)
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
def loads(__s: str, *, parse_float: ParseFloat = float) -> dict[str, Any]: # noqa: C901
|
| 70 |
+
"""Parse TOML from a string."""
|
| 71 |
+
|
| 72 |
+
# The spec allows converting "\r\n" to "\n", even in string
|
| 73 |
+
# literals. Let's do so to simplify parsing.
|
| 74 |
+
src = __s.replace("\r\n", "\n")
|
| 75 |
+
pos = 0
|
| 76 |
+
out = Output(NestedDict(), Flags())
|
| 77 |
+
header: Key = ()
|
| 78 |
+
parse_float = make_safe_parse_float(parse_float)
|
| 79 |
+
|
| 80 |
+
# Parse one statement at a time
|
| 81 |
+
# (typically means one line in TOML source)
|
| 82 |
+
while True:
|
| 83 |
+
# 1. Skip line leading whitespace
|
| 84 |
+
pos = skip_chars(src, pos, TOML_WS)
|
| 85 |
+
|
| 86 |
+
# 2. Parse rules. Expect one of the following:
|
| 87 |
+
# - end of file
|
| 88 |
+
# - end of line
|
| 89 |
+
# - comment
|
| 90 |
+
# - key/value pair
|
| 91 |
+
# - append dict to list (and move to its namespace)
|
| 92 |
+
# - create dict (and move to its namespace)
|
| 93 |
+
# Skip trailing whitespace when applicable.
|
| 94 |
+
try:
|
| 95 |
+
char = src[pos]
|
| 96 |
+
except IndexError:
|
| 97 |
+
break
|
| 98 |
+
if char == "\n":
|
| 99 |
+
pos += 1
|
| 100 |
+
continue
|
| 101 |
+
if char in KEY_INITIAL_CHARS:
|
| 102 |
+
pos = key_value_rule(src, pos, out, header, parse_float)
|
| 103 |
+
pos = skip_chars(src, pos, TOML_WS)
|
| 104 |
+
elif char == "[":
|
| 105 |
+
try:
|
| 106 |
+
second_char: str | None = src[pos + 1]
|
| 107 |
+
except IndexError:
|
| 108 |
+
second_char = None
|
| 109 |
+
out.flags.finalize_pending()
|
| 110 |
+
if second_char == "[":
|
| 111 |
+
pos, header = create_list_rule(src, pos, out)
|
| 112 |
+
else:
|
| 113 |
+
pos, header = create_dict_rule(src, pos, out)
|
| 114 |
+
pos = skip_chars(src, pos, TOML_WS)
|
| 115 |
+
elif char != "#":
|
| 116 |
+
raise suffixed_err(src, pos, "Invalid statement")
|
| 117 |
+
|
| 118 |
+
# 3. Skip comment
|
| 119 |
+
pos = skip_comment(src, pos)
|
| 120 |
+
|
| 121 |
+
# 4. Expect end of line or end of file
|
| 122 |
+
try:
|
| 123 |
+
char = src[pos]
|
| 124 |
+
except IndexError:
|
| 125 |
+
break
|
| 126 |
+
if char != "\n":
|
| 127 |
+
raise suffixed_err(
|
| 128 |
+
src, pos, "Expected newline or end of document after a statement"
|
| 129 |
+
)
|
| 130 |
+
pos += 1
|
| 131 |
+
|
| 132 |
+
return out.data.dict
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
class Flags:
|
| 136 |
+
"""Flags that map to parsed keys/namespaces."""
|
| 137 |
+
|
| 138 |
+
# Marks an immutable namespace (inline array or inline table).
|
| 139 |
+
FROZEN = 0
|
| 140 |
+
# Marks a nest that has been explicitly created and can no longer
|
| 141 |
+
# be opened using the "[table]" syntax.
|
| 142 |
+
EXPLICIT_NEST = 1
|
| 143 |
+
|
| 144 |
+
def __init__(self) -> None:
|
| 145 |
+
self._flags: dict[str, dict] = {}
|
| 146 |
+
self._pending_flags: set[tuple[Key, int]] = set()
|
| 147 |
+
|
| 148 |
+
def add_pending(self, key: Key, flag: int) -> None:
|
| 149 |
+
self._pending_flags.add((key, flag))
|
| 150 |
+
|
| 151 |
+
def finalize_pending(self) -> None:
|
| 152 |
+
for key, flag in self._pending_flags:
|
| 153 |
+
self.set(key, flag, recursive=False)
|
| 154 |
+
self._pending_flags.clear()
|
| 155 |
+
|
| 156 |
+
def unset_all(self, key: Key) -> None:
|
| 157 |
+
cont = self._flags
|
| 158 |
+
for k in key[:-1]:
|
| 159 |
+
if k not in cont:
|
| 160 |
+
return
|
| 161 |
+
cont = cont[k]["nested"]
|
| 162 |
+
cont.pop(key[-1], None)
|
| 163 |
+
|
| 164 |
+
def set(self, key: Key, flag: int, *, recursive: bool) -> None: # noqa: A003
|
| 165 |
+
cont = self._flags
|
| 166 |
+
key_parent, key_stem = key[:-1], key[-1]
|
| 167 |
+
for k in key_parent:
|
| 168 |
+
if k not in cont:
|
| 169 |
+
cont[k] = {"flags": set(), "recursive_flags": set(), "nested": {}}
|
| 170 |
+
cont = cont[k]["nested"]
|
| 171 |
+
if key_stem not in cont:
|
| 172 |
+
cont[key_stem] = {"flags": set(), "recursive_flags": set(), "nested": {}}
|
| 173 |
+
cont[key_stem]["recursive_flags" if recursive else "flags"].add(flag)
|
| 174 |
+
|
| 175 |
+
def is_(self, key: Key, flag: int) -> bool:
|
| 176 |
+
if not key:
|
| 177 |
+
return False # document root has no flags
|
| 178 |
+
cont = self._flags
|
| 179 |
+
for k in key[:-1]:
|
| 180 |
+
if k not in cont:
|
| 181 |
+
return False
|
| 182 |
+
inner_cont = cont[k]
|
| 183 |
+
if flag in inner_cont["recursive_flags"]:
|
| 184 |
+
return True
|
| 185 |
+
cont = inner_cont["nested"]
|
| 186 |
+
key_stem = key[-1]
|
| 187 |
+
if key_stem in cont:
|
| 188 |
+
cont = cont[key_stem]
|
| 189 |
+
return flag in cont["flags"] or flag in cont["recursive_flags"]
|
| 190 |
+
return False
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
class NestedDict:
|
| 194 |
+
def __init__(self) -> None:
|
| 195 |
+
# The parsed content of the TOML document
|
| 196 |
+
self.dict: dict[str, Any] = {}
|
| 197 |
+
|
| 198 |
+
def get_or_create_nest(
|
| 199 |
+
self,
|
| 200 |
+
key: Key,
|
| 201 |
+
*,
|
| 202 |
+
access_lists: bool = True,
|
| 203 |
+
) -> dict:
|
| 204 |
+
cont: Any = self.dict
|
| 205 |
+
for k in key:
|
| 206 |
+
if k not in cont:
|
| 207 |
+
cont[k] = {}
|
| 208 |
+
cont = cont[k]
|
| 209 |
+
if access_lists and isinstance(cont, list):
|
| 210 |
+
cont = cont[-1]
|
| 211 |
+
if not isinstance(cont, dict):
|
| 212 |
+
raise KeyError("There is no nest behind this key")
|
| 213 |
+
return cont
|
| 214 |
+
|
| 215 |
+
def append_nest_to_list(self, key: Key) -> None:
|
| 216 |
+
cont = self.get_or_create_nest(key[:-1])
|
| 217 |
+
last_key = key[-1]
|
| 218 |
+
if last_key in cont:
|
| 219 |
+
list_ = cont[last_key]
|
| 220 |
+
if not isinstance(list_, list):
|
| 221 |
+
raise KeyError("An object other than list found behind this key")
|
| 222 |
+
list_.append({})
|
| 223 |
+
else:
|
| 224 |
+
cont[last_key] = [{}]
|
| 225 |
+
|
| 226 |
+
|
| 227 |
+
class Output(NamedTuple):
|
| 228 |
+
data: NestedDict
|
| 229 |
+
flags: Flags
|
| 230 |
+
|
| 231 |
+
|
| 232 |
+
def skip_chars(src: str, pos: Pos, chars: Iterable[str]) -> Pos:
|
| 233 |
+
try:
|
| 234 |
+
while src[pos] in chars:
|
| 235 |
+
pos += 1
|
| 236 |
+
except IndexError:
|
| 237 |
+
pass
|
| 238 |
+
return pos
|
| 239 |
+
|
| 240 |
+
|
| 241 |
+
def skip_until(
|
| 242 |
+
src: str,
|
| 243 |
+
pos: Pos,
|
| 244 |
+
expect: str,
|
| 245 |
+
*,
|
| 246 |
+
error_on: frozenset[str],
|
| 247 |
+
error_on_eof: bool,
|
| 248 |
+
) -> Pos:
|
| 249 |
+
try:
|
| 250 |
+
new_pos = src.index(expect, pos)
|
| 251 |
+
except ValueError:
|
| 252 |
+
new_pos = len(src)
|
| 253 |
+
if error_on_eof:
|
| 254 |
+
raise suffixed_err(src, new_pos, f"Expected {expect!r}") from None
|
| 255 |
+
|
| 256 |
+
if not error_on.isdisjoint(src[pos:new_pos]):
|
| 257 |
+
while src[pos] not in error_on:
|
| 258 |
+
pos += 1
|
| 259 |
+
raise suffixed_err(src, pos, f"Found invalid character {src[pos]!r}")
|
| 260 |
+
return new_pos
|
| 261 |
+
|
| 262 |
+
|
| 263 |
+
def skip_comment(src: str, pos: Pos) -> Pos:
|
| 264 |
+
try:
|
| 265 |
+
char: str | None = src[pos]
|
| 266 |
+
except IndexError:
|
| 267 |
+
char = None
|
| 268 |
+
if char == "#":
|
| 269 |
+
return skip_until(
|
| 270 |
+
src, pos + 1, "\n", error_on=ILLEGAL_COMMENT_CHARS, error_on_eof=False
|
| 271 |
+
)
|
| 272 |
+
return pos
|
| 273 |
+
|
| 274 |
+
|
| 275 |
+
def skip_comments_and_array_ws(src: str, pos: Pos) -> Pos:
|
| 276 |
+
while True:
|
| 277 |
+
pos_before_skip = pos
|
| 278 |
+
pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
|
| 279 |
+
pos = skip_comment(src, pos)
|
| 280 |
+
if pos == pos_before_skip:
|
| 281 |
+
return pos
|
| 282 |
+
|
| 283 |
+
|
| 284 |
+
def create_dict_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
|
| 285 |
+
pos += 1 # Skip "["
|
| 286 |
+
pos = skip_chars(src, pos, TOML_WS)
|
| 287 |
+
pos, key = parse_key(src, pos)
|
| 288 |
+
|
| 289 |
+
if out.flags.is_(key, Flags.EXPLICIT_NEST) or out.flags.is_(key, Flags.FROZEN):
|
| 290 |
+
raise suffixed_err(src, pos, f"Cannot declare {key} twice")
|
| 291 |
+
out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
|
| 292 |
+
try:
|
| 293 |
+
out.data.get_or_create_nest(key)
|
| 294 |
+
except KeyError:
|
| 295 |
+
raise suffixed_err(src, pos, "Cannot overwrite a value") from None
|
| 296 |
+
|
| 297 |
+
if not src.startswith("]", pos):
|
| 298 |
+
raise suffixed_err(src, pos, "Expected ']' at the end of a table declaration")
|
| 299 |
+
return pos + 1, key
|
| 300 |
+
|
| 301 |
+
|
| 302 |
+
def create_list_rule(src: str, pos: Pos, out: Output) -> tuple[Pos, Key]:
|
| 303 |
+
pos += 2 # Skip "[["
|
| 304 |
+
pos = skip_chars(src, pos, TOML_WS)
|
| 305 |
+
pos, key = parse_key(src, pos)
|
| 306 |
+
|
| 307 |
+
if out.flags.is_(key, Flags.FROZEN):
|
| 308 |
+
raise suffixed_err(src, pos, f"Cannot mutate immutable namespace {key}")
|
| 309 |
+
# Free the namespace now that it points to another empty list item...
|
| 310 |
+
out.flags.unset_all(key)
|
| 311 |
+
# ...but this key precisely is still prohibited from table declaration
|
| 312 |
+
out.flags.set(key, Flags.EXPLICIT_NEST, recursive=False)
|
| 313 |
+
try:
|
| 314 |
+
out.data.append_nest_to_list(key)
|
| 315 |
+
except KeyError:
|
| 316 |
+
raise suffixed_err(src, pos, "Cannot overwrite a value") from None
|
| 317 |
+
|
| 318 |
+
if not src.startswith("]]", pos):
|
| 319 |
+
raise suffixed_err(src, pos, "Expected ']]' at the end of an array declaration")
|
| 320 |
+
return pos + 2, key
|
| 321 |
+
|
| 322 |
+
|
| 323 |
+
def key_value_rule(
|
| 324 |
+
src: str, pos: Pos, out: Output, header: Key, parse_float: ParseFloat
|
| 325 |
+
) -> Pos:
|
| 326 |
+
pos, key, value = parse_key_value_pair(src, pos, parse_float)
|
| 327 |
+
key_parent, key_stem = key[:-1], key[-1]
|
| 328 |
+
abs_key_parent = header + key_parent
|
| 329 |
+
|
| 330 |
+
relative_path_cont_keys = (header + key[:i] for i in range(1, len(key)))
|
| 331 |
+
for cont_key in relative_path_cont_keys:
|
| 332 |
+
# Check that dotted key syntax does not redefine an existing table
|
| 333 |
+
if out.flags.is_(cont_key, Flags.EXPLICIT_NEST):
|
| 334 |
+
raise suffixed_err(src, pos, f"Cannot redefine namespace {cont_key}")
|
| 335 |
+
# Containers in the relative path can't be opened with the table syntax or
|
| 336 |
+
# dotted key/value syntax in following table sections.
|
| 337 |
+
out.flags.add_pending(cont_key, Flags.EXPLICIT_NEST)
|
| 338 |
+
|
| 339 |
+
if out.flags.is_(abs_key_parent, Flags.FROZEN):
|
| 340 |
+
raise suffixed_err(
|
| 341 |
+
src, pos, f"Cannot mutate immutable namespace {abs_key_parent}"
|
| 342 |
+
)
|
| 343 |
+
|
| 344 |
+
try:
|
| 345 |
+
nest = out.data.get_or_create_nest(abs_key_parent)
|
| 346 |
+
except KeyError:
|
| 347 |
+
raise suffixed_err(src, pos, "Cannot overwrite a value") from None
|
| 348 |
+
if key_stem in nest:
|
| 349 |
+
raise suffixed_err(src, pos, "Cannot overwrite a value")
|
| 350 |
+
# Mark inline table and array namespaces recursively immutable
|
| 351 |
+
if isinstance(value, (dict, list)):
|
| 352 |
+
out.flags.set(header + key, Flags.FROZEN, recursive=True)
|
| 353 |
+
nest[key_stem] = value
|
| 354 |
+
return pos
|
| 355 |
+
|
| 356 |
+
|
| 357 |
+
def parse_key_value_pair(
|
| 358 |
+
src: str, pos: Pos, parse_float: ParseFloat
|
| 359 |
+
) -> tuple[Pos, Key, Any]:
|
| 360 |
+
pos, key = parse_key(src, pos)
|
| 361 |
+
try:
|
| 362 |
+
char: str | None = src[pos]
|
| 363 |
+
except IndexError:
|
| 364 |
+
char = None
|
| 365 |
+
if char != "=":
|
| 366 |
+
raise suffixed_err(src, pos, "Expected '=' after a key in a key/value pair")
|
| 367 |
+
pos += 1
|
| 368 |
+
pos = skip_chars(src, pos, TOML_WS)
|
| 369 |
+
pos, value = parse_value(src, pos, parse_float)
|
| 370 |
+
return pos, key, value
|
| 371 |
+
|
| 372 |
+
|
| 373 |
+
def parse_key(src: str, pos: Pos) -> tuple[Pos, Key]:
|
| 374 |
+
pos, key_part = parse_key_part(src, pos)
|
| 375 |
+
key: Key = (key_part,)
|
| 376 |
+
pos = skip_chars(src, pos, TOML_WS)
|
| 377 |
+
while True:
|
| 378 |
+
try:
|
| 379 |
+
char: str | None = src[pos]
|
| 380 |
+
except IndexError:
|
| 381 |
+
char = None
|
| 382 |
+
if char != ".":
|
| 383 |
+
return pos, key
|
| 384 |
+
pos += 1
|
| 385 |
+
pos = skip_chars(src, pos, TOML_WS)
|
| 386 |
+
pos, key_part = parse_key_part(src, pos)
|
| 387 |
+
key += (key_part,)
|
| 388 |
+
pos = skip_chars(src, pos, TOML_WS)
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
def parse_key_part(src: str, pos: Pos) -> tuple[Pos, str]:
|
| 392 |
+
try:
|
| 393 |
+
char: str | None = src[pos]
|
| 394 |
+
except IndexError:
|
| 395 |
+
char = None
|
| 396 |
+
if char in BARE_KEY_CHARS:
|
| 397 |
+
start_pos = pos
|
| 398 |
+
pos = skip_chars(src, pos, BARE_KEY_CHARS)
|
| 399 |
+
return pos, src[start_pos:pos]
|
| 400 |
+
if char == "'":
|
| 401 |
+
return parse_literal_str(src, pos)
|
| 402 |
+
if char == '"':
|
| 403 |
+
return parse_one_line_basic_str(src, pos)
|
| 404 |
+
raise suffixed_err(src, pos, "Invalid initial character for a key part")
|
| 405 |
+
|
| 406 |
+
|
| 407 |
+
def parse_one_line_basic_str(src: str, pos: Pos) -> tuple[Pos, str]:
|
| 408 |
+
pos += 1
|
| 409 |
+
return parse_basic_str(src, pos, multiline=False)
|
| 410 |
+
|
| 411 |
+
|
| 412 |
+
def parse_array(src: str, pos: Pos, parse_float: ParseFloat) -> tuple[Pos, list]:
|
| 413 |
+
pos += 1
|
| 414 |
+
array: list = []
|
| 415 |
+
|
| 416 |
+
pos = skip_comments_and_array_ws(src, pos)
|
| 417 |
+
if src.startswith("]", pos):
|
| 418 |
+
return pos + 1, array
|
| 419 |
+
while True:
|
| 420 |
+
pos, val = parse_value(src, pos, parse_float)
|
| 421 |
+
array.append(val)
|
| 422 |
+
pos = skip_comments_and_array_ws(src, pos)
|
| 423 |
+
|
| 424 |
+
c = src[pos : pos + 1]
|
| 425 |
+
if c == "]":
|
| 426 |
+
return pos + 1, array
|
| 427 |
+
if c != ",":
|
| 428 |
+
raise suffixed_err(src, pos, "Unclosed array")
|
| 429 |
+
pos += 1
|
| 430 |
+
|
| 431 |
+
pos = skip_comments_and_array_ws(src, pos)
|
| 432 |
+
if src.startswith("]", pos):
|
| 433 |
+
return pos + 1, array
|
| 434 |
+
|
| 435 |
+
|
| 436 |
+
def parse_inline_table(src: str, pos: Pos, parse_float: ParseFloat) -> tuple[Pos, dict]:
|
| 437 |
+
pos += 1
|
| 438 |
+
nested_dict = NestedDict()
|
| 439 |
+
flags = Flags()
|
| 440 |
+
|
| 441 |
+
pos = skip_chars(src, pos, TOML_WS)
|
| 442 |
+
if src.startswith("}", pos):
|
| 443 |
+
return pos + 1, nested_dict.dict
|
| 444 |
+
while True:
|
| 445 |
+
pos, key, value = parse_key_value_pair(src, pos, parse_float)
|
| 446 |
+
key_parent, key_stem = key[:-1], key[-1]
|
| 447 |
+
if flags.is_(key, Flags.FROZEN):
|
| 448 |
+
raise suffixed_err(src, pos, f"Cannot mutate immutable namespace {key}")
|
| 449 |
+
try:
|
| 450 |
+
nest = nested_dict.get_or_create_nest(key_parent, access_lists=False)
|
| 451 |
+
except KeyError:
|
| 452 |
+
raise suffixed_err(src, pos, "Cannot overwrite a value") from None
|
| 453 |
+
if key_stem in nest:
|
| 454 |
+
raise suffixed_err(src, pos, f"Duplicate inline table key {key_stem!r}")
|
| 455 |
+
nest[key_stem] = value
|
| 456 |
+
pos = skip_chars(src, pos, TOML_WS)
|
| 457 |
+
c = src[pos : pos + 1]
|
| 458 |
+
if c == "}":
|
| 459 |
+
return pos + 1, nested_dict.dict
|
| 460 |
+
if c != ",":
|
| 461 |
+
raise suffixed_err(src, pos, "Unclosed inline table")
|
| 462 |
+
if isinstance(value, (dict, list)):
|
| 463 |
+
flags.set(key, Flags.FROZEN, recursive=True)
|
| 464 |
+
pos += 1
|
| 465 |
+
pos = skip_chars(src, pos, TOML_WS)
|
| 466 |
+
|
| 467 |
+
|
| 468 |
+
def parse_basic_str_escape(
|
| 469 |
+
src: str, pos: Pos, *, multiline: bool = False
|
| 470 |
+
) -> tuple[Pos, str]:
|
| 471 |
+
escape_id = src[pos : pos + 2]
|
| 472 |
+
pos += 2
|
| 473 |
+
if multiline and escape_id in {"\\ ", "\\\t", "\\\n"}:
|
| 474 |
+
# Skip whitespace until next non-whitespace character or end of
|
| 475 |
+
# the doc. Error if non-whitespace is found before newline.
|
| 476 |
+
if escape_id != "\\\n":
|
| 477 |
+
pos = skip_chars(src, pos, TOML_WS)
|
| 478 |
+
try:
|
| 479 |
+
char = src[pos]
|
| 480 |
+
except IndexError:
|
| 481 |
+
return pos, ""
|
| 482 |
+
if char != "\n":
|
| 483 |
+
raise suffixed_err(src, pos, "Unescaped '\\' in a string")
|
| 484 |
+
pos += 1
|
| 485 |
+
pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
|
| 486 |
+
return pos, ""
|
| 487 |
+
if escape_id == "\\u":
|
| 488 |
+
return parse_hex_char(src, pos, 4)
|
| 489 |
+
if escape_id == "\\U":
|
| 490 |
+
return parse_hex_char(src, pos, 8)
|
| 491 |
+
try:
|
| 492 |
+
return pos, BASIC_STR_ESCAPE_REPLACEMENTS[escape_id]
|
| 493 |
+
except KeyError:
|
| 494 |
+
raise suffixed_err(src, pos, "Unescaped '\\' in a string") from None
|
| 495 |
+
|
| 496 |
+
|
| 497 |
+
def parse_basic_str_escape_multiline(src: str, pos: Pos) -> tuple[Pos, str]:
|
| 498 |
+
return parse_basic_str_escape(src, pos, multiline=True)
|
| 499 |
+
|
| 500 |
+
|
| 501 |
+
def parse_hex_char(src: str, pos: Pos, hex_len: int) -> tuple[Pos, str]:
|
| 502 |
+
hex_str = src[pos : pos + hex_len]
|
| 503 |
+
if len(hex_str) != hex_len or not HEXDIGIT_CHARS.issuperset(hex_str):
|
| 504 |
+
raise suffixed_err(src, pos, "Invalid hex value")
|
| 505 |
+
pos += hex_len
|
| 506 |
+
hex_int = int(hex_str, 16)
|
| 507 |
+
if not is_unicode_scalar_value(hex_int):
|
| 508 |
+
raise suffixed_err(src, pos, "Escaped character is not a Unicode scalar value")
|
| 509 |
+
return pos, chr(hex_int)
|
| 510 |
+
|
| 511 |
+
|
| 512 |
+
def parse_literal_str(src: str, pos: Pos) -> tuple[Pos, str]:
|
| 513 |
+
pos += 1 # Skip starting apostrophe
|
| 514 |
+
start_pos = pos
|
| 515 |
+
pos = skip_until(
|
| 516 |
+
src, pos, "'", error_on=ILLEGAL_LITERAL_STR_CHARS, error_on_eof=True
|
| 517 |
+
)
|
| 518 |
+
return pos + 1, src[start_pos:pos] # Skip ending apostrophe
|
| 519 |
+
|
| 520 |
+
|
| 521 |
+
def parse_multiline_str(src: str, pos: Pos, *, literal: bool) -> tuple[Pos, str]:
|
| 522 |
+
pos += 3
|
| 523 |
+
if src.startswith("\n", pos):
|
| 524 |
+
pos += 1
|
| 525 |
+
|
| 526 |
+
if literal:
|
| 527 |
+
delim = "'"
|
| 528 |
+
end_pos = skip_until(
|
| 529 |
+
src,
|
| 530 |
+
pos,
|
| 531 |
+
"'''",
|
| 532 |
+
error_on=ILLEGAL_MULTILINE_LITERAL_STR_CHARS,
|
| 533 |
+
error_on_eof=True,
|
| 534 |
+
)
|
| 535 |
+
result = src[pos:end_pos]
|
| 536 |
+
pos = end_pos + 3
|
| 537 |
+
else:
|
| 538 |
+
delim = '"'
|
| 539 |
+
pos, result = parse_basic_str(src, pos, multiline=True)
|
| 540 |
+
|
| 541 |
+
# Add at maximum two extra apostrophes/quotes if the end sequence
|
| 542 |
+
# is 4 or 5 chars long instead of just 3.
|
| 543 |
+
if not src.startswith(delim, pos):
|
| 544 |
+
return pos, result
|
| 545 |
+
pos += 1
|
| 546 |
+
if not src.startswith(delim, pos):
|
| 547 |
+
return pos, result + delim
|
| 548 |
+
pos += 1
|
| 549 |
+
return pos, result + (delim * 2)
|
| 550 |
+
|
| 551 |
+
|
| 552 |
+
def parse_basic_str(src: str, pos: Pos, *, multiline: bool) -> tuple[Pos, str]:
|
| 553 |
+
if multiline:
|
| 554 |
+
error_on = ILLEGAL_MULTILINE_BASIC_STR_CHARS
|
| 555 |
+
parse_escapes = parse_basic_str_escape_multiline
|
| 556 |
+
else:
|
| 557 |
+
error_on = ILLEGAL_BASIC_STR_CHARS
|
| 558 |
+
parse_escapes = parse_basic_str_escape
|
| 559 |
+
result = ""
|
| 560 |
+
start_pos = pos
|
| 561 |
+
while True:
|
| 562 |
+
try:
|
| 563 |
+
char = src[pos]
|
| 564 |
+
except IndexError:
|
| 565 |
+
raise suffixed_err(src, pos, "Unterminated string") from None
|
| 566 |
+
if char == '"':
|
| 567 |
+
if not multiline:
|
| 568 |
+
return pos + 1, result + src[start_pos:pos]
|
| 569 |
+
if src.startswith('"""', pos):
|
| 570 |
+
return pos + 3, result + src[start_pos:pos]
|
| 571 |
+
pos += 1
|
| 572 |
+
continue
|
| 573 |
+
if char == "\\":
|
| 574 |
+
result += src[start_pos:pos]
|
| 575 |
+
pos, parsed_escape = parse_escapes(src, pos)
|
| 576 |
+
result += parsed_escape
|
| 577 |
+
start_pos = pos
|
| 578 |
+
continue
|
| 579 |
+
if char in error_on:
|
| 580 |
+
raise suffixed_err(src, pos, f"Illegal character {char!r}")
|
| 581 |
+
pos += 1
|
| 582 |
+
|
| 583 |
+
|
| 584 |
+
def parse_value( # noqa: C901
|
| 585 |
+
src: str, pos: Pos, parse_float: ParseFloat
|
| 586 |
+
) -> tuple[Pos, Any]:
|
| 587 |
+
try:
|
| 588 |
+
char: str | None = src[pos]
|
| 589 |
+
except IndexError:
|
| 590 |
+
char = None
|
| 591 |
+
|
| 592 |
+
# IMPORTANT: order conditions based on speed of checking and likelihood
|
| 593 |
+
|
| 594 |
+
# Basic strings
|
| 595 |
+
if char == '"':
|
| 596 |
+
if src.startswith('"""', pos):
|
| 597 |
+
return parse_multiline_str(src, pos, literal=False)
|
| 598 |
+
return parse_one_line_basic_str(src, pos)
|
| 599 |
+
|
| 600 |
+
# Literal strings
|
| 601 |
+
if char == "'":
|
| 602 |
+
if src.startswith("'''", pos):
|
| 603 |
+
return parse_multiline_str(src, pos, literal=True)
|
| 604 |
+
return parse_literal_str(src, pos)
|
| 605 |
+
|
| 606 |
+
# Booleans
|
| 607 |
+
if char == "t":
|
| 608 |
+
if src.startswith("true", pos):
|
| 609 |
+
return pos + 4, True
|
| 610 |
+
if char == "f":
|
| 611 |
+
if src.startswith("false", pos):
|
| 612 |
+
return pos + 5, False
|
| 613 |
+
|
| 614 |
+
# Arrays
|
| 615 |
+
if char == "[":
|
| 616 |
+
return parse_array(src, pos, parse_float)
|
| 617 |
+
|
| 618 |
+
# Inline tables
|
| 619 |
+
if char == "{":
|
| 620 |
+
return parse_inline_table(src, pos, parse_float)
|
| 621 |
+
|
| 622 |
+
# Dates and times
|
| 623 |
+
datetime_match = RE_DATETIME.match(src, pos)
|
| 624 |
+
if datetime_match:
|
| 625 |
+
try:
|
| 626 |
+
datetime_obj = match_to_datetime(datetime_match)
|
| 627 |
+
except ValueError as e:
|
| 628 |
+
raise suffixed_err(src, pos, "Invalid date or datetime") from e
|
| 629 |
+
return datetime_match.end(), datetime_obj
|
| 630 |
+
localtime_match = RE_LOCALTIME.match(src, pos)
|
| 631 |
+
if localtime_match:
|
| 632 |
+
return localtime_match.end(), match_to_localtime(localtime_match)
|
| 633 |
+
|
| 634 |
+
# Integers and "normal" floats.
|
| 635 |
+
# The regex will greedily match any type starting with a decimal
|
| 636 |
+
# char, so needs to be located after handling of dates and times.
|
| 637 |
+
number_match = RE_NUMBER.match(src, pos)
|
| 638 |
+
if number_match:
|
| 639 |
+
return number_match.end(), match_to_number(number_match, parse_float)
|
| 640 |
+
|
| 641 |
+
# Special floats
|
| 642 |
+
first_three = src[pos : pos + 3]
|
| 643 |
+
if first_three in {"inf", "nan"}:
|
| 644 |
+
return pos + 3, parse_float(first_three)
|
| 645 |
+
first_four = src[pos : pos + 4]
|
| 646 |
+
if first_four in {"-inf", "+inf", "-nan", "+nan"}:
|
| 647 |
+
return pos + 4, parse_float(first_four)
|
| 648 |
+
|
| 649 |
+
raise suffixed_err(src, pos, "Invalid value")
|
| 650 |
+
|
| 651 |
+
|
| 652 |
+
def suffixed_err(src: str, pos: Pos, msg: str) -> TOMLDecodeError:
|
| 653 |
+
"""Return a `TOMLDecodeError` where error message is suffixed with
|
| 654 |
+
coordinates in source."""
|
| 655 |
+
|
| 656 |
+
def coord_repr(src: str, pos: Pos) -> str:
|
| 657 |
+
if pos >= len(src):
|
| 658 |
+
return "end of document"
|
| 659 |
+
line = src.count("\n", 0, pos) + 1
|
| 660 |
+
if line == 1:
|
| 661 |
+
column = pos + 1
|
| 662 |
+
else:
|
| 663 |
+
column = pos - src.rindex("\n", 0, pos)
|
| 664 |
+
return f"line {line}, column {column}"
|
| 665 |
+
|
| 666 |
+
return TOMLDecodeError(f"{msg} (at {coord_repr(src, pos)})")
|
| 667 |
+
|
| 668 |
+
|
| 669 |
+
def is_unicode_scalar_value(codepoint: int) -> bool:
|
| 670 |
+
return (0 <= codepoint <= 55295) or (57344 <= codepoint <= 1114111)
|
| 671 |
+
|
| 672 |
+
|
| 673 |
+
def make_safe_parse_float(parse_float: ParseFloat) -> ParseFloat:
|
| 674 |
+
"""A decorator to make `parse_float` safe.
|
| 675 |
+
|
| 676 |
+
`parse_float` must not return dicts or lists, because these types
|
| 677 |
+
would be mixed with parsed TOML tables and arrays, thus confusing
|
| 678 |
+
the parser. The returned decorated callable raises `ValueError`
|
| 679 |
+
instead of returning illegal types.
|
| 680 |
+
"""
|
| 681 |
+
# The default `float` callable never returns illegal types. Optimize it.
|
| 682 |
+
if parse_float is float: # type: ignore[comparison-overlap]
|
| 683 |
+
return float
|
| 684 |
+
|
| 685 |
+
def safe_parse_float(float_str: str) -> Any:
|
| 686 |
+
float_value = parse_float(float_str)
|
| 687 |
+
if isinstance(float_value, (dict, list)):
|
| 688 |
+
raise ValueError("parse_float must not return dicts or lists")
|
| 689 |
+
return float_value
|
| 690 |
+
|
| 691 |
+
return safe_parse_float
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli/_re.py
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-License-Identifier: MIT
|
| 2 |
+
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
|
| 3 |
+
# Licensed to PSF under a Contributor Agreement.
|
| 4 |
+
|
| 5 |
+
from __future__ import annotations
|
| 6 |
+
|
| 7 |
+
from datetime import date, datetime, time, timedelta, timezone, tzinfo
|
| 8 |
+
from functools import lru_cache
|
| 9 |
+
import re
|
| 10 |
+
from typing import Any
|
| 11 |
+
|
| 12 |
+
from ._types import ParseFloat
|
| 13 |
+
|
| 14 |
+
# E.g.
|
| 15 |
+
# - 00:32:00.999999
|
| 16 |
+
# - 00:32:00
|
| 17 |
+
_TIME_RE_STR = r"([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])(?:\.([0-9]{1,6})[0-9]*)?"
|
| 18 |
+
|
| 19 |
+
RE_NUMBER = re.compile(
|
| 20 |
+
r"""
|
| 21 |
+
0
|
| 22 |
+
(?:
|
| 23 |
+
x[0-9A-Fa-f](?:_?[0-9A-Fa-f])* # hex
|
| 24 |
+
|
|
| 25 |
+
b[01](?:_?[01])* # bin
|
| 26 |
+
|
|
| 27 |
+
o[0-7](?:_?[0-7])* # oct
|
| 28 |
+
)
|
| 29 |
+
|
|
| 30 |
+
[+-]?(?:0|[1-9](?:_?[0-9])*) # dec, integer part
|
| 31 |
+
(?P<floatpart>
|
| 32 |
+
(?:\.[0-9](?:_?[0-9])*)? # optional fractional part
|
| 33 |
+
(?:[eE][+-]?[0-9](?:_?[0-9])*)? # optional exponent part
|
| 34 |
+
)
|
| 35 |
+
""",
|
| 36 |
+
flags=re.VERBOSE,
|
| 37 |
+
)
|
| 38 |
+
RE_LOCALTIME = re.compile(_TIME_RE_STR)
|
| 39 |
+
RE_DATETIME = re.compile(
|
| 40 |
+
rf"""
|
| 41 |
+
([0-9]{{4}})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]) # date, e.g. 1988-10-27
|
| 42 |
+
(?:
|
| 43 |
+
[Tt ]
|
| 44 |
+
{_TIME_RE_STR}
|
| 45 |
+
(?:([Zz])|([+-])([01][0-9]|2[0-3]):([0-5][0-9]))? # optional time offset
|
| 46 |
+
)?
|
| 47 |
+
""",
|
| 48 |
+
flags=re.VERBOSE,
|
| 49 |
+
)
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
def match_to_datetime(match: re.Match) -> datetime | date:
|
| 53 |
+
"""Convert a `RE_DATETIME` match to `datetime.datetime` or `datetime.date`.
|
| 54 |
+
|
| 55 |
+
Raises ValueError if the match does not correspond to a valid date
|
| 56 |
+
or datetime.
|
| 57 |
+
"""
|
| 58 |
+
(
|
| 59 |
+
year_str,
|
| 60 |
+
month_str,
|
| 61 |
+
day_str,
|
| 62 |
+
hour_str,
|
| 63 |
+
minute_str,
|
| 64 |
+
sec_str,
|
| 65 |
+
micros_str,
|
| 66 |
+
zulu_time,
|
| 67 |
+
offset_sign_str,
|
| 68 |
+
offset_hour_str,
|
| 69 |
+
offset_minute_str,
|
| 70 |
+
) = match.groups()
|
| 71 |
+
year, month, day = int(year_str), int(month_str), int(day_str)
|
| 72 |
+
if hour_str is None:
|
| 73 |
+
return date(year, month, day)
|
| 74 |
+
hour, minute, sec = int(hour_str), int(minute_str), int(sec_str)
|
| 75 |
+
micros = int(micros_str.ljust(6, "0")) if micros_str else 0
|
| 76 |
+
if offset_sign_str:
|
| 77 |
+
tz: tzinfo | None = cached_tz(
|
| 78 |
+
offset_hour_str, offset_minute_str, offset_sign_str
|
| 79 |
+
)
|
| 80 |
+
elif zulu_time:
|
| 81 |
+
tz = timezone.utc
|
| 82 |
+
else: # local date-time
|
| 83 |
+
tz = None
|
| 84 |
+
return datetime(year, month, day, hour, minute, sec, micros, tzinfo=tz)
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
@lru_cache(maxsize=None)
|
| 88 |
+
def cached_tz(hour_str: str, minute_str: str, sign_str: str) -> timezone:
|
| 89 |
+
sign = 1 if sign_str == "+" else -1
|
| 90 |
+
return timezone(
|
| 91 |
+
timedelta(
|
| 92 |
+
hours=sign * int(hour_str),
|
| 93 |
+
minutes=sign * int(minute_str),
|
| 94 |
+
)
|
| 95 |
+
)
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
def match_to_localtime(match: re.Match) -> time:
|
| 99 |
+
hour_str, minute_str, sec_str, micros_str = match.groups()
|
| 100 |
+
micros = int(micros_str.ljust(6, "0")) if micros_str else 0
|
| 101 |
+
return time(int(hour_str), int(minute_str), int(sec_str), micros)
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
def match_to_number(match: re.Match, parse_float: ParseFloat) -> Any:
|
| 105 |
+
if match.group("floatpart"):
|
| 106 |
+
return parse_float(match.group())
|
| 107 |
+
return int(match.group(), 0)
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli/_types.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-License-Identifier: MIT
|
| 2 |
+
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
|
| 3 |
+
# Licensed to PSF under a Contributor Agreement.
|
| 4 |
+
|
| 5 |
+
from typing import Any, Callable, Tuple
|
| 6 |
+
|
| 7 |
+
# Type annotations
|
| 8 |
+
ParseFloat = Callable[[str], Any]
|
| 9 |
+
Key = Tuple[str, ...]
|
| 10 |
+
Pos = int
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/tomli/py.typed
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
# Marker file for PEP 561
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard-4.3.0.dist-info/INSTALLER
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
pip
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard-4.3.0.dist-info/LICENSE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
This is the MIT license: http://www.opensource.org/licenses/mit-license.php
|
| 2 |
+
|
| 3 |
+
Copyright (c) Alex Grönholm
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
| 6 |
+
software and associated documentation files (the "Software"), to deal in the Software
|
| 7 |
+
without restriction, including without limitation the rights to use, copy, modify, merge,
|
| 8 |
+
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
| 9 |
+
to whom the Software is furnished to do so, subject to the following conditions:
|
| 10 |
+
|
| 11 |
+
The above copyright notice and this permission notice shall be included in all copies or
|
| 12 |
+
substantial portions of the Software.
|
| 13 |
+
|
| 14 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
| 15 |
+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
| 16 |
+
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
| 17 |
+
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
| 18 |
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
| 19 |
+
DEALINGS IN THE SOFTWARE.
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard-4.3.0.dist-info/METADATA
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.1
|
| 2 |
+
Name: typeguard
|
| 3 |
+
Version: 4.3.0
|
| 4 |
+
Summary: Run-time type checker for Python
|
| 5 |
+
Author-email: Alex Grönholm <alex.gronholm@nextday.fi>
|
| 6 |
+
License: MIT
|
| 7 |
+
Project-URL: Documentation, https://typeguard.readthedocs.io/en/latest/
|
| 8 |
+
Project-URL: Change log, https://typeguard.readthedocs.io/en/latest/versionhistory.html
|
| 9 |
+
Project-URL: Source code, https://github.com/agronholm/typeguard
|
| 10 |
+
Project-URL: Issue tracker, https://github.com/agronholm/typeguard/issues
|
| 11 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 12 |
+
Classifier: Intended Audience :: Developers
|
| 13 |
+
Classifier: License :: OSI Approved :: MIT License
|
| 14 |
+
Classifier: Programming Language :: Python
|
| 15 |
+
Classifier: Programming Language :: Python :: 3
|
| 16 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 17 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 18 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 19 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 20 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 21 |
+
Requires-Python: >=3.8
|
| 22 |
+
Description-Content-Type: text/x-rst
|
| 23 |
+
License-File: LICENSE
|
| 24 |
+
Requires-Dist: typing-extensions >=4.10.0
|
| 25 |
+
Requires-Dist: importlib-metadata >=3.6 ; python_version < "3.10"
|
| 26 |
+
Provides-Extra: doc
|
| 27 |
+
Requires-Dist: packaging ; extra == 'doc'
|
| 28 |
+
Requires-Dist: Sphinx >=7 ; extra == 'doc'
|
| 29 |
+
Requires-Dist: sphinx-autodoc-typehints >=1.2.0 ; extra == 'doc'
|
| 30 |
+
Requires-Dist: sphinx-rtd-theme >=1.3.0 ; extra == 'doc'
|
| 31 |
+
Provides-Extra: test
|
| 32 |
+
Requires-Dist: coverage[toml] >=7 ; extra == 'test'
|
| 33 |
+
Requires-Dist: pytest >=7 ; extra == 'test'
|
| 34 |
+
Requires-Dist: mypy >=1.2.0 ; (platform_python_implementation != "PyPy") and extra == 'test'
|
| 35 |
+
|
| 36 |
+
.. image:: https://github.com/agronholm/typeguard/actions/workflows/test.yml/badge.svg
|
| 37 |
+
:target: https://github.com/agronholm/typeguard/actions/workflows/test.yml
|
| 38 |
+
:alt: Build Status
|
| 39 |
+
.. image:: https://coveralls.io/repos/agronholm/typeguard/badge.svg?branch=master&service=github
|
| 40 |
+
:target: https://coveralls.io/github/agronholm/typeguard?branch=master
|
| 41 |
+
:alt: Code Coverage
|
| 42 |
+
.. image:: https://readthedocs.org/projects/typeguard/badge/?version=latest
|
| 43 |
+
:target: https://typeguard.readthedocs.io/en/latest/?badge=latest
|
| 44 |
+
:alt: Documentation
|
| 45 |
+
|
| 46 |
+
This library provides run-time type checking for functions defined with
|
| 47 |
+
`PEP 484 <https://www.python.org/dev/peps/pep-0484/>`_ argument (and return) type
|
| 48 |
+
annotations, and any arbitrary objects. It can be used together with static type
|
| 49 |
+
checkers as an additional layer of type safety, to catch type violations that could only
|
| 50 |
+
be detected at run time.
|
| 51 |
+
|
| 52 |
+
Two principal ways to do type checking are provided:
|
| 53 |
+
|
| 54 |
+
#. The ``check_type`` function:
|
| 55 |
+
|
| 56 |
+
* like ``isinstance()``, but supports arbitrary type annotations (within limits)
|
| 57 |
+
* can be used as a ``cast()`` replacement, but with actual checking of the value
|
| 58 |
+
#. Code instrumentation:
|
| 59 |
+
|
| 60 |
+
* entire modules, or individual functions (via ``@typechecked``) are recompiled, with
|
| 61 |
+
type checking code injected into them
|
| 62 |
+
* automatically checks function arguments, return values and assignments to annotated
|
| 63 |
+
local variables
|
| 64 |
+
* for generator functions (regular and async), checks yield and send values
|
| 65 |
+
* requires the original source code of the instrumented module(s) to be accessible
|
| 66 |
+
|
| 67 |
+
Two options are provided for code instrumentation:
|
| 68 |
+
|
| 69 |
+
#. the ``@typechecked`` function:
|
| 70 |
+
|
| 71 |
+
* can be applied to functions individually
|
| 72 |
+
#. the import hook (``typeguard.install_import_hook()``):
|
| 73 |
+
|
| 74 |
+
* automatically instruments targeted modules on import
|
| 75 |
+
* no manual code changes required in the target modules
|
| 76 |
+
* requires the import hook to be installed before the targeted modules are imported
|
| 77 |
+
* may clash with other import hooks
|
| 78 |
+
|
| 79 |
+
See the documentation_ for further information.
|
| 80 |
+
|
| 81 |
+
.. _documentation: https://typeguard.readthedocs.io/en/latest/
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard-4.3.0.dist-info/RECORD
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
typeguard-4.3.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 2 |
+
typeguard-4.3.0.dist-info/LICENSE,sha256=YWP3mH37ONa8MgzitwsvArhivEESZRbVUu8c1DJH51g,1130
|
| 3 |
+
typeguard-4.3.0.dist-info/METADATA,sha256=z2dcHAp0TwhYCFU5Deh8x31nazElgujUz9tbuP0pjSE,3717
|
| 4 |
+
typeguard-4.3.0.dist-info/RECORD,,
|
| 5 |
+
typeguard-4.3.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
| 6 |
+
typeguard-4.3.0.dist-info/entry_points.txt,sha256=qp7NQ1aLtiSgMQqo6gWlfGpy0IIXzoMJmeQTLpzqFZQ,48
|
| 7 |
+
typeguard-4.3.0.dist-info/top_level.txt,sha256=4z28AhuDodwRS_c1J_l8H51t5QuwfTseskYzlxp6grs,10
|
| 8 |
+
typeguard/__init__.py,sha256=Onh4w38elPCjtlcU3JY9k3h70NjsxXIkAflmQn-Z0FY,2071
|
| 9 |
+
typeguard/__pycache__/__init__.cpython-312.pyc,,
|
| 10 |
+
typeguard/__pycache__/_checkers.cpython-312.pyc,,
|
| 11 |
+
typeguard/__pycache__/_config.cpython-312.pyc,,
|
| 12 |
+
typeguard/__pycache__/_decorators.cpython-312.pyc,,
|
| 13 |
+
typeguard/__pycache__/_exceptions.cpython-312.pyc,,
|
| 14 |
+
typeguard/__pycache__/_functions.cpython-312.pyc,,
|
| 15 |
+
typeguard/__pycache__/_importhook.cpython-312.pyc,,
|
| 16 |
+
typeguard/__pycache__/_memo.cpython-312.pyc,,
|
| 17 |
+
typeguard/__pycache__/_pytest_plugin.cpython-312.pyc,,
|
| 18 |
+
typeguard/__pycache__/_suppression.cpython-312.pyc,,
|
| 19 |
+
typeguard/__pycache__/_transformer.cpython-312.pyc,,
|
| 20 |
+
typeguard/__pycache__/_union_transformer.cpython-312.pyc,,
|
| 21 |
+
typeguard/__pycache__/_utils.cpython-312.pyc,,
|
| 22 |
+
typeguard/_checkers.py,sha256=JRrgKicdOEfIBoNEtegYCEIlhpad-a1u1Em7GCj0WCI,31360
|
| 23 |
+
typeguard/_config.py,sha256=nIz8QwDa-oFO3L9O8_6srzlmd99pSby2wOM4Wb7F_B0,2846
|
| 24 |
+
typeguard/_decorators.py,sha256=v6dsIeWvPhExGLP_wXF-RmDUyjZf_Ak28g7gBJ_v0-0,9033
|
| 25 |
+
typeguard/_exceptions.py,sha256=ZIPeiV-FBd5Emw2EaWd2Fvlsrwi4ocwT2fVGBIAtHcQ,1121
|
| 26 |
+
typeguard/_functions.py,sha256=ibgSAKa5ptIm1eR9ARG0BSozAFJPFNASZqhPVyQeqig,10393
|
| 27 |
+
typeguard/_importhook.py,sha256=ugjCDvFcdWMU7UugqlJG91IpVNpEIxtRr-99s0h1k7M,6389
|
| 28 |
+
typeguard/_memo.py,sha256=1juQV_vxnD2JYKbSrebiQuj4oKHz6n67v9pYA-CCISg,1303
|
| 29 |
+
typeguard/_pytest_plugin.py,sha256=-fcSqkv54rIfIF8pDavY5YQPkj4OX8GMt_lL7CQSD4I,4416
|
| 30 |
+
typeguard/_suppression.py,sha256=VQfzxcwIbu3if0f7VBkKM7hkYOA7tNFw9a7jMBsmMg4,2266
|
| 31 |
+
typeguard/_transformer.py,sha256=9Ha7_QhdwoUni_6hvdY-hZbuEergowHrNL2vzHIakFY,44937
|
| 32 |
+
typeguard/_union_transformer.py,sha256=v_42r7-6HuRX2SoFwnyJ-E5PlxXpVeUJPJR1-HU9qSo,1354
|
| 33 |
+
typeguard/_utils.py,sha256=5HhO1rPn5f1M6ymkVAEv7Xmlz1cX-j0OnTMlyHqqrR8,5270
|
| 34 |
+
typeguard/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard-4.3.0.dist-info/WHEEL
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Wheel-Version: 1.0
|
| 2 |
+
Generator: bdist_wheel (0.43.0)
|
| 3 |
+
Root-Is-Purelib: true
|
| 4 |
+
Tag: py3-none-any
|
| 5 |
+
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard-4.3.0.dist-info/entry_points.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[pytest11]
|
| 2 |
+
typeguard = typeguard._pytest_plugin
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard-4.3.0.dist-info/top_level.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
typeguard
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/__init__.py
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from typing import Any
|
| 3 |
+
|
| 4 |
+
from ._checkers import TypeCheckerCallable as TypeCheckerCallable
|
| 5 |
+
from ._checkers import TypeCheckLookupCallback as TypeCheckLookupCallback
|
| 6 |
+
from ._checkers import check_type_internal as check_type_internal
|
| 7 |
+
from ._checkers import checker_lookup_functions as checker_lookup_functions
|
| 8 |
+
from ._checkers import load_plugins as load_plugins
|
| 9 |
+
from ._config import CollectionCheckStrategy as CollectionCheckStrategy
|
| 10 |
+
from ._config import ForwardRefPolicy as ForwardRefPolicy
|
| 11 |
+
from ._config import TypeCheckConfiguration as TypeCheckConfiguration
|
| 12 |
+
from ._decorators import typechecked as typechecked
|
| 13 |
+
from ._decorators import typeguard_ignore as typeguard_ignore
|
| 14 |
+
from ._exceptions import InstrumentationWarning as InstrumentationWarning
|
| 15 |
+
from ._exceptions import TypeCheckError as TypeCheckError
|
| 16 |
+
from ._exceptions import TypeCheckWarning as TypeCheckWarning
|
| 17 |
+
from ._exceptions import TypeHintWarning as TypeHintWarning
|
| 18 |
+
from ._functions import TypeCheckFailCallback as TypeCheckFailCallback
|
| 19 |
+
from ._functions import check_type as check_type
|
| 20 |
+
from ._functions import warn_on_error as warn_on_error
|
| 21 |
+
from ._importhook import ImportHookManager as ImportHookManager
|
| 22 |
+
from ._importhook import TypeguardFinder as TypeguardFinder
|
| 23 |
+
from ._importhook import install_import_hook as install_import_hook
|
| 24 |
+
from ._memo import TypeCheckMemo as TypeCheckMemo
|
| 25 |
+
from ._suppression import suppress_type_checks as suppress_type_checks
|
| 26 |
+
from ._utils import Unset as Unset
|
| 27 |
+
|
| 28 |
+
# Re-export imports so they look like they live directly in this package
|
| 29 |
+
for value in list(locals().values()):
|
| 30 |
+
if getattr(value, "__module__", "").startswith(f"{__name__}."):
|
| 31 |
+
value.__module__ = __name__
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
config: TypeCheckConfiguration
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
def __getattr__(name: str) -> Any:
|
| 38 |
+
if name == "config":
|
| 39 |
+
from ._config import global_config
|
| 40 |
+
|
| 41 |
+
return global_config
|
| 42 |
+
|
| 43 |
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
# Automatically load checker lookup functions unless explicitly disabled
|
| 47 |
+
if "TYPEGUARD_DISABLE_PLUGIN_AUTOLOAD" not in os.environ:
|
| 48 |
+
load_plugins()
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_checkers.py
ADDED
|
@@ -0,0 +1,993 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import collections.abc
|
| 4 |
+
import inspect
|
| 5 |
+
import sys
|
| 6 |
+
import types
|
| 7 |
+
import typing
|
| 8 |
+
import warnings
|
| 9 |
+
from enum import Enum
|
| 10 |
+
from inspect import Parameter, isclass, isfunction
|
| 11 |
+
from io import BufferedIOBase, IOBase, RawIOBase, TextIOBase
|
| 12 |
+
from textwrap import indent
|
| 13 |
+
from typing import (
|
| 14 |
+
IO,
|
| 15 |
+
AbstractSet,
|
| 16 |
+
Any,
|
| 17 |
+
BinaryIO,
|
| 18 |
+
Callable,
|
| 19 |
+
Dict,
|
| 20 |
+
ForwardRef,
|
| 21 |
+
List,
|
| 22 |
+
Mapping,
|
| 23 |
+
MutableMapping,
|
| 24 |
+
NewType,
|
| 25 |
+
Optional,
|
| 26 |
+
Sequence,
|
| 27 |
+
Set,
|
| 28 |
+
TextIO,
|
| 29 |
+
Tuple,
|
| 30 |
+
Type,
|
| 31 |
+
TypeVar,
|
| 32 |
+
Union,
|
| 33 |
+
)
|
| 34 |
+
from unittest.mock import Mock
|
| 35 |
+
from weakref import WeakKeyDictionary
|
| 36 |
+
|
| 37 |
+
try:
|
| 38 |
+
import typing_extensions
|
| 39 |
+
except ImportError:
|
| 40 |
+
typing_extensions = None # type: ignore[assignment]
|
| 41 |
+
|
| 42 |
+
# Must use this because typing.is_typeddict does not recognize
|
| 43 |
+
# TypedDict from typing_extensions, and as of version 4.12.0
|
| 44 |
+
# typing_extensions.TypedDict is different from typing.TypedDict
|
| 45 |
+
# on all versions.
|
| 46 |
+
from typing_extensions import is_typeddict
|
| 47 |
+
|
| 48 |
+
from ._config import ForwardRefPolicy
|
| 49 |
+
from ._exceptions import TypeCheckError, TypeHintWarning
|
| 50 |
+
from ._memo import TypeCheckMemo
|
| 51 |
+
from ._utils import evaluate_forwardref, get_stacklevel, get_type_name, qualified_name
|
| 52 |
+
|
| 53 |
+
if sys.version_info >= (3, 11):
|
| 54 |
+
from typing import (
|
| 55 |
+
Annotated,
|
| 56 |
+
NotRequired,
|
| 57 |
+
TypeAlias,
|
| 58 |
+
get_args,
|
| 59 |
+
get_origin,
|
| 60 |
+
)
|
| 61 |
+
|
| 62 |
+
SubclassableAny = Any
|
| 63 |
+
else:
|
| 64 |
+
from typing_extensions import (
|
| 65 |
+
Annotated,
|
| 66 |
+
NotRequired,
|
| 67 |
+
TypeAlias,
|
| 68 |
+
get_args,
|
| 69 |
+
get_origin,
|
| 70 |
+
)
|
| 71 |
+
from typing_extensions import Any as SubclassableAny
|
| 72 |
+
|
| 73 |
+
if sys.version_info >= (3, 10):
|
| 74 |
+
from importlib.metadata import entry_points
|
| 75 |
+
from typing import ParamSpec
|
| 76 |
+
else:
|
| 77 |
+
from importlib_metadata import entry_points
|
| 78 |
+
from typing_extensions import ParamSpec
|
| 79 |
+
|
| 80 |
+
TypeCheckerCallable: TypeAlias = Callable[
|
| 81 |
+
[Any, Any, Tuple[Any, ...], TypeCheckMemo], Any
|
| 82 |
+
]
|
| 83 |
+
TypeCheckLookupCallback: TypeAlias = Callable[
|
| 84 |
+
[Any, Tuple[Any, ...], Tuple[Any, ...]], Optional[TypeCheckerCallable]
|
| 85 |
+
]
|
| 86 |
+
|
| 87 |
+
checker_lookup_functions: list[TypeCheckLookupCallback] = []
|
| 88 |
+
generic_alias_types: tuple[type, ...] = (type(List), type(List[Any]))
|
| 89 |
+
if sys.version_info >= (3, 9):
|
| 90 |
+
generic_alias_types += (types.GenericAlias,)
|
| 91 |
+
|
| 92 |
+
protocol_check_cache: WeakKeyDictionary[
|
| 93 |
+
type[Any], dict[type[Any], TypeCheckError | None]
|
| 94 |
+
] = WeakKeyDictionary()
|
| 95 |
+
|
| 96 |
+
# Sentinel
|
| 97 |
+
_missing = object()
|
| 98 |
+
|
| 99 |
+
# Lifted from mypy.sharedparse
|
| 100 |
+
BINARY_MAGIC_METHODS = {
|
| 101 |
+
"__add__",
|
| 102 |
+
"__and__",
|
| 103 |
+
"__cmp__",
|
| 104 |
+
"__divmod__",
|
| 105 |
+
"__div__",
|
| 106 |
+
"__eq__",
|
| 107 |
+
"__floordiv__",
|
| 108 |
+
"__ge__",
|
| 109 |
+
"__gt__",
|
| 110 |
+
"__iadd__",
|
| 111 |
+
"__iand__",
|
| 112 |
+
"__idiv__",
|
| 113 |
+
"__ifloordiv__",
|
| 114 |
+
"__ilshift__",
|
| 115 |
+
"__imatmul__",
|
| 116 |
+
"__imod__",
|
| 117 |
+
"__imul__",
|
| 118 |
+
"__ior__",
|
| 119 |
+
"__ipow__",
|
| 120 |
+
"__irshift__",
|
| 121 |
+
"__isub__",
|
| 122 |
+
"__itruediv__",
|
| 123 |
+
"__ixor__",
|
| 124 |
+
"__le__",
|
| 125 |
+
"__lshift__",
|
| 126 |
+
"__lt__",
|
| 127 |
+
"__matmul__",
|
| 128 |
+
"__mod__",
|
| 129 |
+
"__mul__",
|
| 130 |
+
"__ne__",
|
| 131 |
+
"__or__",
|
| 132 |
+
"__pow__",
|
| 133 |
+
"__radd__",
|
| 134 |
+
"__rand__",
|
| 135 |
+
"__rdiv__",
|
| 136 |
+
"__rfloordiv__",
|
| 137 |
+
"__rlshift__",
|
| 138 |
+
"__rmatmul__",
|
| 139 |
+
"__rmod__",
|
| 140 |
+
"__rmul__",
|
| 141 |
+
"__ror__",
|
| 142 |
+
"__rpow__",
|
| 143 |
+
"__rrshift__",
|
| 144 |
+
"__rshift__",
|
| 145 |
+
"__rsub__",
|
| 146 |
+
"__rtruediv__",
|
| 147 |
+
"__rxor__",
|
| 148 |
+
"__sub__",
|
| 149 |
+
"__truediv__",
|
| 150 |
+
"__xor__",
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
def check_callable(
|
| 155 |
+
value: Any,
|
| 156 |
+
origin_type: Any,
|
| 157 |
+
args: tuple[Any, ...],
|
| 158 |
+
memo: TypeCheckMemo,
|
| 159 |
+
) -> None:
|
| 160 |
+
if not callable(value):
|
| 161 |
+
raise TypeCheckError("is not callable")
|
| 162 |
+
|
| 163 |
+
if args:
|
| 164 |
+
try:
|
| 165 |
+
signature = inspect.signature(value)
|
| 166 |
+
except (TypeError, ValueError):
|
| 167 |
+
return
|
| 168 |
+
|
| 169 |
+
argument_types = args[0]
|
| 170 |
+
if isinstance(argument_types, list) and not any(
|
| 171 |
+
type(item) is ParamSpec for item in argument_types
|
| 172 |
+
):
|
| 173 |
+
# The callable must not have keyword-only arguments without defaults
|
| 174 |
+
unfulfilled_kwonlyargs = [
|
| 175 |
+
param.name
|
| 176 |
+
for param in signature.parameters.values()
|
| 177 |
+
if param.kind == Parameter.KEYWORD_ONLY
|
| 178 |
+
and param.default == Parameter.empty
|
| 179 |
+
]
|
| 180 |
+
if unfulfilled_kwonlyargs:
|
| 181 |
+
raise TypeCheckError(
|
| 182 |
+
f"has mandatory keyword-only arguments in its declaration: "
|
| 183 |
+
f'{", ".join(unfulfilled_kwonlyargs)}'
|
| 184 |
+
)
|
| 185 |
+
|
| 186 |
+
num_positional_args = num_mandatory_pos_args = 0
|
| 187 |
+
has_varargs = False
|
| 188 |
+
for param in signature.parameters.values():
|
| 189 |
+
if param.kind in (
|
| 190 |
+
Parameter.POSITIONAL_ONLY,
|
| 191 |
+
Parameter.POSITIONAL_OR_KEYWORD,
|
| 192 |
+
):
|
| 193 |
+
num_positional_args += 1
|
| 194 |
+
if param.default is Parameter.empty:
|
| 195 |
+
num_mandatory_pos_args += 1
|
| 196 |
+
elif param.kind == Parameter.VAR_POSITIONAL:
|
| 197 |
+
has_varargs = True
|
| 198 |
+
|
| 199 |
+
if num_mandatory_pos_args > len(argument_types):
|
| 200 |
+
raise TypeCheckError(
|
| 201 |
+
f"has too many mandatory positional arguments in its declaration; "
|
| 202 |
+
f"expected {len(argument_types)} but {num_mandatory_pos_args} "
|
| 203 |
+
f"mandatory positional argument(s) declared"
|
| 204 |
+
)
|
| 205 |
+
elif not has_varargs and num_positional_args < len(argument_types):
|
| 206 |
+
raise TypeCheckError(
|
| 207 |
+
f"has too few arguments in its declaration; expected "
|
| 208 |
+
f"{len(argument_types)} but {num_positional_args} argument(s) "
|
| 209 |
+
f"declared"
|
| 210 |
+
)
|
| 211 |
+
|
| 212 |
+
|
| 213 |
+
def check_mapping(
|
| 214 |
+
value: Any,
|
| 215 |
+
origin_type: Any,
|
| 216 |
+
args: tuple[Any, ...],
|
| 217 |
+
memo: TypeCheckMemo,
|
| 218 |
+
) -> None:
|
| 219 |
+
if origin_type is Dict or origin_type is dict:
|
| 220 |
+
if not isinstance(value, dict):
|
| 221 |
+
raise TypeCheckError("is not a dict")
|
| 222 |
+
if origin_type is MutableMapping or origin_type is collections.abc.MutableMapping:
|
| 223 |
+
if not isinstance(value, collections.abc.MutableMapping):
|
| 224 |
+
raise TypeCheckError("is not a mutable mapping")
|
| 225 |
+
elif not isinstance(value, collections.abc.Mapping):
|
| 226 |
+
raise TypeCheckError("is not a mapping")
|
| 227 |
+
|
| 228 |
+
if args:
|
| 229 |
+
key_type, value_type = args
|
| 230 |
+
if key_type is not Any or value_type is not Any:
|
| 231 |
+
samples = memo.config.collection_check_strategy.iterate_samples(
|
| 232 |
+
value.items()
|
| 233 |
+
)
|
| 234 |
+
for k, v in samples:
|
| 235 |
+
try:
|
| 236 |
+
check_type_internal(k, key_type, memo)
|
| 237 |
+
except TypeCheckError as exc:
|
| 238 |
+
exc.append_path_element(f"key {k!r}")
|
| 239 |
+
raise
|
| 240 |
+
|
| 241 |
+
try:
|
| 242 |
+
check_type_internal(v, value_type, memo)
|
| 243 |
+
except TypeCheckError as exc:
|
| 244 |
+
exc.append_path_element(f"value of key {k!r}")
|
| 245 |
+
raise
|
| 246 |
+
|
| 247 |
+
|
| 248 |
+
def check_typed_dict(
|
| 249 |
+
value: Any,
|
| 250 |
+
origin_type: Any,
|
| 251 |
+
args: tuple[Any, ...],
|
| 252 |
+
memo: TypeCheckMemo,
|
| 253 |
+
) -> None:
|
| 254 |
+
if not isinstance(value, dict):
|
| 255 |
+
raise TypeCheckError("is not a dict")
|
| 256 |
+
|
| 257 |
+
declared_keys = frozenset(origin_type.__annotations__)
|
| 258 |
+
if hasattr(origin_type, "__required_keys__"):
|
| 259 |
+
required_keys = set(origin_type.__required_keys__)
|
| 260 |
+
else: # py3.8 and lower
|
| 261 |
+
required_keys = set(declared_keys) if origin_type.__total__ else set()
|
| 262 |
+
|
| 263 |
+
existing_keys = set(value)
|
| 264 |
+
extra_keys = existing_keys - declared_keys
|
| 265 |
+
if extra_keys:
|
| 266 |
+
keys_formatted = ", ".join(f'"{key}"' for key in sorted(extra_keys, key=repr))
|
| 267 |
+
raise TypeCheckError(f"has unexpected extra key(s): {keys_formatted}")
|
| 268 |
+
|
| 269 |
+
# Detect NotRequired fields which are hidden by get_type_hints()
|
| 270 |
+
type_hints: dict[str, type] = {}
|
| 271 |
+
for key, annotation in origin_type.__annotations__.items():
|
| 272 |
+
if isinstance(annotation, ForwardRef):
|
| 273 |
+
annotation = evaluate_forwardref(annotation, memo)
|
| 274 |
+
if get_origin(annotation) is NotRequired:
|
| 275 |
+
required_keys.discard(key)
|
| 276 |
+
annotation = get_args(annotation)[0]
|
| 277 |
+
|
| 278 |
+
type_hints[key] = annotation
|
| 279 |
+
|
| 280 |
+
missing_keys = required_keys - existing_keys
|
| 281 |
+
if missing_keys:
|
| 282 |
+
keys_formatted = ", ".join(f'"{key}"' for key in sorted(missing_keys, key=repr))
|
| 283 |
+
raise TypeCheckError(f"is missing required key(s): {keys_formatted}")
|
| 284 |
+
|
| 285 |
+
for key, argtype in type_hints.items():
|
| 286 |
+
argvalue = value.get(key, _missing)
|
| 287 |
+
if argvalue is not _missing:
|
| 288 |
+
try:
|
| 289 |
+
check_type_internal(argvalue, argtype, memo)
|
| 290 |
+
except TypeCheckError as exc:
|
| 291 |
+
exc.append_path_element(f"value of key {key!r}")
|
| 292 |
+
raise
|
| 293 |
+
|
| 294 |
+
|
| 295 |
+
def check_list(
|
| 296 |
+
value: Any,
|
| 297 |
+
origin_type: Any,
|
| 298 |
+
args: tuple[Any, ...],
|
| 299 |
+
memo: TypeCheckMemo,
|
| 300 |
+
) -> None:
|
| 301 |
+
if not isinstance(value, list):
|
| 302 |
+
raise TypeCheckError("is not a list")
|
| 303 |
+
|
| 304 |
+
if args and args != (Any,):
|
| 305 |
+
samples = memo.config.collection_check_strategy.iterate_samples(value)
|
| 306 |
+
for i, v in enumerate(samples):
|
| 307 |
+
try:
|
| 308 |
+
check_type_internal(v, args[0], memo)
|
| 309 |
+
except TypeCheckError as exc:
|
| 310 |
+
exc.append_path_element(f"item {i}")
|
| 311 |
+
raise
|
| 312 |
+
|
| 313 |
+
|
| 314 |
+
def check_sequence(
|
| 315 |
+
value: Any,
|
| 316 |
+
origin_type: Any,
|
| 317 |
+
args: tuple[Any, ...],
|
| 318 |
+
memo: TypeCheckMemo,
|
| 319 |
+
) -> None:
|
| 320 |
+
if not isinstance(value, collections.abc.Sequence):
|
| 321 |
+
raise TypeCheckError("is not a sequence")
|
| 322 |
+
|
| 323 |
+
if args and args != (Any,):
|
| 324 |
+
samples = memo.config.collection_check_strategy.iterate_samples(value)
|
| 325 |
+
for i, v in enumerate(samples):
|
| 326 |
+
try:
|
| 327 |
+
check_type_internal(v, args[0], memo)
|
| 328 |
+
except TypeCheckError as exc:
|
| 329 |
+
exc.append_path_element(f"item {i}")
|
| 330 |
+
raise
|
| 331 |
+
|
| 332 |
+
|
| 333 |
+
def check_set(
|
| 334 |
+
value: Any,
|
| 335 |
+
origin_type: Any,
|
| 336 |
+
args: tuple[Any, ...],
|
| 337 |
+
memo: TypeCheckMemo,
|
| 338 |
+
) -> None:
|
| 339 |
+
if origin_type is frozenset:
|
| 340 |
+
if not isinstance(value, frozenset):
|
| 341 |
+
raise TypeCheckError("is not a frozenset")
|
| 342 |
+
elif not isinstance(value, AbstractSet):
|
| 343 |
+
raise TypeCheckError("is not a set")
|
| 344 |
+
|
| 345 |
+
if args and args != (Any,):
|
| 346 |
+
samples = memo.config.collection_check_strategy.iterate_samples(value)
|
| 347 |
+
for v in samples:
|
| 348 |
+
try:
|
| 349 |
+
check_type_internal(v, args[0], memo)
|
| 350 |
+
except TypeCheckError as exc:
|
| 351 |
+
exc.append_path_element(f"[{v}]")
|
| 352 |
+
raise
|
| 353 |
+
|
| 354 |
+
|
| 355 |
+
def check_tuple(
|
| 356 |
+
value: Any,
|
| 357 |
+
origin_type: Any,
|
| 358 |
+
args: tuple[Any, ...],
|
| 359 |
+
memo: TypeCheckMemo,
|
| 360 |
+
) -> None:
|
| 361 |
+
# Specialized check for NamedTuples
|
| 362 |
+
if field_types := getattr(origin_type, "__annotations__", None):
|
| 363 |
+
if not isinstance(value, origin_type):
|
| 364 |
+
raise TypeCheckError(
|
| 365 |
+
f"is not a named tuple of type {qualified_name(origin_type)}"
|
| 366 |
+
)
|
| 367 |
+
|
| 368 |
+
for name, field_type in field_types.items():
|
| 369 |
+
try:
|
| 370 |
+
check_type_internal(getattr(value, name), field_type, memo)
|
| 371 |
+
except TypeCheckError as exc:
|
| 372 |
+
exc.append_path_element(f"attribute {name!r}")
|
| 373 |
+
raise
|
| 374 |
+
|
| 375 |
+
return
|
| 376 |
+
elif not isinstance(value, tuple):
|
| 377 |
+
raise TypeCheckError("is not a tuple")
|
| 378 |
+
|
| 379 |
+
if args:
|
| 380 |
+
use_ellipsis = args[-1] is Ellipsis
|
| 381 |
+
tuple_params = args[: -1 if use_ellipsis else None]
|
| 382 |
+
else:
|
| 383 |
+
# Unparametrized Tuple or plain tuple
|
| 384 |
+
return
|
| 385 |
+
|
| 386 |
+
if use_ellipsis:
|
| 387 |
+
element_type = tuple_params[0]
|
| 388 |
+
samples = memo.config.collection_check_strategy.iterate_samples(value)
|
| 389 |
+
for i, element in enumerate(samples):
|
| 390 |
+
try:
|
| 391 |
+
check_type_internal(element, element_type, memo)
|
| 392 |
+
except TypeCheckError as exc:
|
| 393 |
+
exc.append_path_element(f"item {i}")
|
| 394 |
+
raise
|
| 395 |
+
elif tuple_params == ((),):
|
| 396 |
+
if value != ():
|
| 397 |
+
raise TypeCheckError("is not an empty tuple")
|
| 398 |
+
else:
|
| 399 |
+
if len(value) != len(tuple_params):
|
| 400 |
+
raise TypeCheckError(
|
| 401 |
+
f"has wrong number of elements (expected {len(tuple_params)}, got "
|
| 402 |
+
f"{len(value)} instead)"
|
| 403 |
+
)
|
| 404 |
+
|
| 405 |
+
for i, (element, element_type) in enumerate(zip(value, tuple_params)):
|
| 406 |
+
try:
|
| 407 |
+
check_type_internal(element, element_type, memo)
|
| 408 |
+
except TypeCheckError as exc:
|
| 409 |
+
exc.append_path_element(f"item {i}")
|
| 410 |
+
raise
|
| 411 |
+
|
| 412 |
+
|
| 413 |
+
def check_union(
|
| 414 |
+
value: Any,
|
| 415 |
+
origin_type: Any,
|
| 416 |
+
args: tuple[Any, ...],
|
| 417 |
+
memo: TypeCheckMemo,
|
| 418 |
+
) -> None:
|
| 419 |
+
errors: dict[str, TypeCheckError] = {}
|
| 420 |
+
try:
|
| 421 |
+
for type_ in args:
|
| 422 |
+
try:
|
| 423 |
+
check_type_internal(value, type_, memo)
|
| 424 |
+
return
|
| 425 |
+
except TypeCheckError as exc:
|
| 426 |
+
errors[get_type_name(type_)] = exc
|
| 427 |
+
|
| 428 |
+
formatted_errors = indent(
|
| 429 |
+
"\n".join(f"{key}: {error}" for key, error in errors.items()), " "
|
| 430 |
+
)
|
| 431 |
+
finally:
|
| 432 |
+
del errors # avoid creating ref cycle
|
| 433 |
+
raise TypeCheckError(f"did not match any element in the union:\n{formatted_errors}")
|
| 434 |
+
|
| 435 |
+
|
| 436 |
+
def check_uniontype(
|
| 437 |
+
value: Any,
|
| 438 |
+
origin_type: Any,
|
| 439 |
+
args: tuple[Any, ...],
|
| 440 |
+
memo: TypeCheckMemo,
|
| 441 |
+
) -> None:
|
| 442 |
+
errors: dict[str, TypeCheckError] = {}
|
| 443 |
+
for type_ in args:
|
| 444 |
+
try:
|
| 445 |
+
check_type_internal(value, type_, memo)
|
| 446 |
+
return
|
| 447 |
+
except TypeCheckError as exc:
|
| 448 |
+
errors[get_type_name(type_)] = exc
|
| 449 |
+
|
| 450 |
+
formatted_errors = indent(
|
| 451 |
+
"\n".join(f"{key}: {error}" for key, error in errors.items()), " "
|
| 452 |
+
)
|
| 453 |
+
raise TypeCheckError(f"did not match any element in the union:\n{formatted_errors}")
|
| 454 |
+
|
| 455 |
+
|
| 456 |
+
def check_class(
|
| 457 |
+
value: Any,
|
| 458 |
+
origin_type: Any,
|
| 459 |
+
args: tuple[Any, ...],
|
| 460 |
+
memo: TypeCheckMemo,
|
| 461 |
+
) -> None:
|
| 462 |
+
if not isclass(value) and not isinstance(value, generic_alias_types):
|
| 463 |
+
raise TypeCheckError("is not a class")
|
| 464 |
+
|
| 465 |
+
if not args:
|
| 466 |
+
return
|
| 467 |
+
|
| 468 |
+
if isinstance(args[0], ForwardRef):
|
| 469 |
+
expected_class = evaluate_forwardref(args[0], memo)
|
| 470 |
+
else:
|
| 471 |
+
expected_class = args[0]
|
| 472 |
+
|
| 473 |
+
if expected_class is Any:
|
| 474 |
+
return
|
| 475 |
+
elif getattr(expected_class, "_is_protocol", False):
|
| 476 |
+
check_protocol(value, expected_class, (), memo)
|
| 477 |
+
elif isinstance(expected_class, TypeVar):
|
| 478 |
+
check_typevar(value, expected_class, (), memo, subclass_check=True)
|
| 479 |
+
elif get_origin(expected_class) is Union:
|
| 480 |
+
errors: dict[str, TypeCheckError] = {}
|
| 481 |
+
for arg in get_args(expected_class):
|
| 482 |
+
if arg is Any:
|
| 483 |
+
return
|
| 484 |
+
|
| 485 |
+
try:
|
| 486 |
+
check_class(value, type, (arg,), memo)
|
| 487 |
+
return
|
| 488 |
+
except TypeCheckError as exc:
|
| 489 |
+
errors[get_type_name(arg)] = exc
|
| 490 |
+
else:
|
| 491 |
+
formatted_errors = indent(
|
| 492 |
+
"\n".join(f"{key}: {error}" for key, error in errors.items()), " "
|
| 493 |
+
)
|
| 494 |
+
raise TypeCheckError(
|
| 495 |
+
f"did not match any element in the union:\n{formatted_errors}"
|
| 496 |
+
)
|
| 497 |
+
elif not issubclass(value, expected_class): # type: ignore[arg-type]
|
| 498 |
+
raise TypeCheckError(f"is not a subclass of {qualified_name(expected_class)}")
|
| 499 |
+
|
| 500 |
+
|
| 501 |
+
def check_newtype(
|
| 502 |
+
value: Any,
|
| 503 |
+
origin_type: Any,
|
| 504 |
+
args: tuple[Any, ...],
|
| 505 |
+
memo: TypeCheckMemo,
|
| 506 |
+
) -> None:
|
| 507 |
+
check_type_internal(value, origin_type.__supertype__, memo)
|
| 508 |
+
|
| 509 |
+
|
| 510 |
+
def check_instance(
|
| 511 |
+
value: Any,
|
| 512 |
+
origin_type: Any,
|
| 513 |
+
args: tuple[Any, ...],
|
| 514 |
+
memo: TypeCheckMemo,
|
| 515 |
+
) -> None:
|
| 516 |
+
if not isinstance(value, origin_type):
|
| 517 |
+
raise TypeCheckError(f"is not an instance of {qualified_name(origin_type)}")
|
| 518 |
+
|
| 519 |
+
|
| 520 |
+
def check_typevar(
|
| 521 |
+
value: Any,
|
| 522 |
+
origin_type: TypeVar,
|
| 523 |
+
args: tuple[Any, ...],
|
| 524 |
+
memo: TypeCheckMemo,
|
| 525 |
+
*,
|
| 526 |
+
subclass_check: bool = False,
|
| 527 |
+
) -> None:
|
| 528 |
+
if origin_type.__bound__ is not None:
|
| 529 |
+
annotation = (
|
| 530 |
+
Type[origin_type.__bound__] if subclass_check else origin_type.__bound__
|
| 531 |
+
)
|
| 532 |
+
check_type_internal(value, annotation, memo)
|
| 533 |
+
elif origin_type.__constraints__:
|
| 534 |
+
for constraint in origin_type.__constraints__:
|
| 535 |
+
annotation = Type[constraint] if subclass_check else constraint
|
| 536 |
+
try:
|
| 537 |
+
check_type_internal(value, annotation, memo)
|
| 538 |
+
except TypeCheckError:
|
| 539 |
+
pass
|
| 540 |
+
else:
|
| 541 |
+
break
|
| 542 |
+
else:
|
| 543 |
+
formatted_constraints = ", ".join(
|
| 544 |
+
get_type_name(constraint) for constraint in origin_type.__constraints__
|
| 545 |
+
)
|
| 546 |
+
raise TypeCheckError(
|
| 547 |
+
f"does not match any of the constraints " f"({formatted_constraints})"
|
| 548 |
+
)
|
| 549 |
+
|
| 550 |
+
|
| 551 |
+
if typing_extensions is None:
|
| 552 |
+
|
| 553 |
+
def _is_literal_type(typ: object) -> bool:
|
| 554 |
+
return typ is typing.Literal
|
| 555 |
+
|
| 556 |
+
else:
|
| 557 |
+
|
| 558 |
+
def _is_literal_type(typ: object) -> bool:
|
| 559 |
+
return typ is typing.Literal or typ is typing_extensions.Literal
|
| 560 |
+
|
| 561 |
+
|
| 562 |
+
def check_literal(
|
| 563 |
+
value: Any,
|
| 564 |
+
origin_type: Any,
|
| 565 |
+
args: tuple[Any, ...],
|
| 566 |
+
memo: TypeCheckMemo,
|
| 567 |
+
) -> None:
|
| 568 |
+
def get_literal_args(literal_args: tuple[Any, ...]) -> tuple[Any, ...]:
|
| 569 |
+
retval: list[Any] = []
|
| 570 |
+
for arg in literal_args:
|
| 571 |
+
if _is_literal_type(get_origin(arg)):
|
| 572 |
+
retval.extend(get_literal_args(arg.__args__))
|
| 573 |
+
elif arg is None or isinstance(arg, (int, str, bytes, bool, Enum)):
|
| 574 |
+
retval.append(arg)
|
| 575 |
+
else:
|
| 576 |
+
raise TypeError(
|
| 577 |
+
f"Illegal literal value: {arg}"
|
| 578 |
+
) # TypeError here is deliberate
|
| 579 |
+
|
| 580 |
+
return tuple(retval)
|
| 581 |
+
|
| 582 |
+
final_args = tuple(get_literal_args(args))
|
| 583 |
+
try:
|
| 584 |
+
index = final_args.index(value)
|
| 585 |
+
except ValueError:
|
| 586 |
+
pass
|
| 587 |
+
else:
|
| 588 |
+
if type(final_args[index]) is type(value):
|
| 589 |
+
return
|
| 590 |
+
|
| 591 |
+
formatted_args = ", ".join(repr(arg) for arg in final_args)
|
| 592 |
+
raise TypeCheckError(f"is not any of ({formatted_args})") from None
|
| 593 |
+
|
| 594 |
+
|
| 595 |
+
def check_literal_string(
|
| 596 |
+
value: Any,
|
| 597 |
+
origin_type: Any,
|
| 598 |
+
args: tuple[Any, ...],
|
| 599 |
+
memo: TypeCheckMemo,
|
| 600 |
+
) -> None:
|
| 601 |
+
check_type_internal(value, str, memo)
|
| 602 |
+
|
| 603 |
+
|
| 604 |
+
def check_typeguard(
|
| 605 |
+
value: Any,
|
| 606 |
+
origin_type: Any,
|
| 607 |
+
args: tuple[Any, ...],
|
| 608 |
+
memo: TypeCheckMemo,
|
| 609 |
+
) -> None:
|
| 610 |
+
check_type_internal(value, bool, memo)
|
| 611 |
+
|
| 612 |
+
|
| 613 |
+
def check_none(
|
| 614 |
+
value: Any,
|
| 615 |
+
origin_type: Any,
|
| 616 |
+
args: tuple[Any, ...],
|
| 617 |
+
memo: TypeCheckMemo,
|
| 618 |
+
) -> None:
|
| 619 |
+
if value is not None:
|
| 620 |
+
raise TypeCheckError("is not None")
|
| 621 |
+
|
| 622 |
+
|
| 623 |
+
def check_number(
|
| 624 |
+
value: Any,
|
| 625 |
+
origin_type: Any,
|
| 626 |
+
args: tuple[Any, ...],
|
| 627 |
+
memo: TypeCheckMemo,
|
| 628 |
+
) -> None:
|
| 629 |
+
if origin_type is complex and not isinstance(value, (complex, float, int)):
|
| 630 |
+
raise TypeCheckError("is neither complex, float or int")
|
| 631 |
+
elif origin_type is float and not isinstance(value, (float, int)):
|
| 632 |
+
raise TypeCheckError("is neither float or int")
|
| 633 |
+
|
| 634 |
+
|
| 635 |
+
def check_io(
|
| 636 |
+
value: Any,
|
| 637 |
+
origin_type: Any,
|
| 638 |
+
args: tuple[Any, ...],
|
| 639 |
+
memo: TypeCheckMemo,
|
| 640 |
+
) -> None:
|
| 641 |
+
if origin_type is TextIO or (origin_type is IO and args == (str,)):
|
| 642 |
+
if not isinstance(value, TextIOBase):
|
| 643 |
+
raise TypeCheckError("is not a text based I/O object")
|
| 644 |
+
elif origin_type is BinaryIO or (origin_type is IO and args == (bytes,)):
|
| 645 |
+
if not isinstance(value, (RawIOBase, BufferedIOBase)):
|
| 646 |
+
raise TypeCheckError("is not a binary I/O object")
|
| 647 |
+
elif not isinstance(value, IOBase):
|
| 648 |
+
raise TypeCheckError("is not an I/O object")
|
| 649 |
+
|
| 650 |
+
|
| 651 |
+
def check_protocol(
|
| 652 |
+
value: Any,
|
| 653 |
+
origin_type: Any,
|
| 654 |
+
args: tuple[Any, ...],
|
| 655 |
+
memo: TypeCheckMemo,
|
| 656 |
+
) -> None:
|
| 657 |
+
subject: type[Any] = value if isclass(value) else type(value)
|
| 658 |
+
|
| 659 |
+
if subject in protocol_check_cache:
|
| 660 |
+
result_map = protocol_check_cache[subject]
|
| 661 |
+
if origin_type in result_map:
|
| 662 |
+
if exc := result_map[origin_type]:
|
| 663 |
+
raise exc
|
| 664 |
+
else:
|
| 665 |
+
return
|
| 666 |
+
|
| 667 |
+
# Collect a set of methods and non-method attributes present in the protocol
|
| 668 |
+
ignored_attrs = set(dir(typing.Protocol)) | {
|
| 669 |
+
"__annotations__",
|
| 670 |
+
"__non_callable_proto_members__",
|
| 671 |
+
}
|
| 672 |
+
expected_methods: dict[str, tuple[Any, Any]] = {}
|
| 673 |
+
expected_noncallable_members: dict[str, Any] = {}
|
| 674 |
+
for attrname in dir(origin_type):
|
| 675 |
+
# Skip attributes present in typing.Protocol
|
| 676 |
+
if attrname in ignored_attrs:
|
| 677 |
+
continue
|
| 678 |
+
|
| 679 |
+
member = getattr(origin_type, attrname)
|
| 680 |
+
if callable(member):
|
| 681 |
+
signature = inspect.signature(member)
|
| 682 |
+
argtypes = [
|
| 683 |
+
(p.annotation if p.annotation is not Parameter.empty else Any)
|
| 684 |
+
for p in signature.parameters.values()
|
| 685 |
+
if p.kind is not Parameter.KEYWORD_ONLY
|
| 686 |
+
] or Ellipsis
|
| 687 |
+
return_annotation = (
|
| 688 |
+
signature.return_annotation
|
| 689 |
+
if signature.return_annotation is not Parameter.empty
|
| 690 |
+
else Any
|
| 691 |
+
)
|
| 692 |
+
expected_methods[attrname] = argtypes, return_annotation
|
| 693 |
+
else:
|
| 694 |
+
expected_noncallable_members[attrname] = member
|
| 695 |
+
|
| 696 |
+
for attrname, annotation in typing.get_type_hints(origin_type).items():
|
| 697 |
+
expected_noncallable_members[attrname] = annotation
|
| 698 |
+
|
| 699 |
+
subject_annotations = typing.get_type_hints(subject)
|
| 700 |
+
|
| 701 |
+
# Check that all required methods are present and their signatures are compatible
|
| 702 |
+
result_map = protocol_check_cache.setdefault(subject, {})
|
| 703 |
+
try:
|
| 704 |
+
for attrname, callable_args in expected_methods.items():
|
| 705 |
+
try:
|
| 706 |
+
method = getattr(subject, attrname)
|
| 707 |
+
except AttributeError:
|
| 708 |
+
if attrname in subject_annotations:
|
| 709 |
+
raise TypeCheckError(
|
| 710 |
+
f"is not compatible with the {origin_type.__qualname__} protocol "
|
| 711 |
+
f"because its {attrname!r} attribute is not a method"
|
| 712 |
+
) from None
|
| 713 |
+
else:
|
| 714 |
+
raise TypeCheckError(
|
| 715 |
+
f"is not compatible with the {origin_type.__qualname__} protocol "
|
| 716 |
+
f"because it has no method named {attrname!r}"
|
| 717 |
+
) from None
|
| 718 |
+
|
| 719 |
+
if not callable(method):
|
| 720 |
+
raise TypeCheckError(
|
| 721 |
+
f"is not compatible with the {origin_type.__qualname__} protocol "
|
| 722 |
+
f"because its {attrname!r} attribute is not a callable"
|
| 723 |
+
)
|
| 724 |
+
|
| 725 |
+
# TODO: raise exception on added keyword-only arguments without defaults
|
| 726 |
+
try:
|
| 727 |
+
check_callable(method, Callable, callable_args, memo)
|
| 728 |
+
except TypeCheckError as exc:
|
| 729 |
+
raise TypeCheckError(
|
| 730 |
+
f"is not compatible with the {origin_type.__qualname__} protocol "
|
| 731 |
+
f"because its {attrname!r} method {exc}"
|
| 732 |
+
) from None
|
| 733 |
+
|
| 734 |
+
# Check that all required non-callable members are present
|
| 735 |
+
for attrname in expected_noncallable_members:
|
| 736 |
+
# TODO: implement assignability checks for non-callable members
|
| 737 |
+
if attrname not in subject_annotations and not hasattr(subject, attrname):
|
| 738 |
+
raise TypeCheckError(
|
| 739 |
+
f"is not compatible with the {origin_type.__qualname__} protocol "
|
| 740 |
+
f"because it has no attribute named {attrname!r}"
|
| 741 |
+
)
|
| 742 |
+
except TypeCheckError as exc:
|
| 743 |
+
result_map[origin_type] = exc
|
| 744 |
+
raise
|
| 745 |
+
else:
|
| 746 |
+
result_map[origin_type] = None
|
| 747 |
+
|
| 748 |
+
|
| 749 |
+
def check_byteslike(
|
| 750 |
+
value: Any,
|
| 751 |
+
origin_type: Any,
|
| 752 |
+
args: tuple[Any, ...],
|
| 753 |
+
memo: TypeCheckMemo,
|
| 754 |
+
) -> None:
|
| 755 |
+
if not isinstance(value, (bytearray, bytes, memoryview)):
|
| 756 |
+
raise TypeCheckError("is not bytes-like")
|
| 757 |
+
|
| 758 |
+
|
| 759 |
+
def check_self(
|
| 760 |
+
value: Any,
|
| 761 |
+
origin_type: Any,
|
| 762 |
+
args: tuple[Any, ...],
|
| 763 |
+
memo: TypeCheckMemo,
|
| 764 |
+
) -> None:
|
| 765 |
+
if memo.self_type is None:
|
| 766 |
+
raise TypeCheckError("cannot be checked against Self outside of a method call")
|
| 767 |
+
|
| 768 |
+
if isclass(value):
|
| 769 |
+
if not issubclass(value, memo.self_type):
|
| 770 |
+
raise TypeCheckError(
|
| 771 |
+
f"is not an instance of the self type "
|
| 772 |
+
f"({qualified_name(memo.self_type)})"
|
| 773 |
+
)
|
| 774 |
+
elif not isinstance(value, memo.self_type):
|
| 775 |
+
raise TypeCheckError(
|
| 776 |
+
f"is not an instance of the self type ({qualified_name(memo.self_type)})"
|
| 777 |
+
)
|
| 778 |
+
|
| 779 |
+
|
| 780 |
+
def check_paramspec(
|
| 781 |
+
value: Any,
|
| 782 |
+
origin_type: Any,
|
| 783 |
+
args: tuple[Any, ...],
|
| 784 |
+
memo: TypeCheckMemo,
|
| 785 |
+
) -> None:
|
| 786 |
+
pass # No-op for now
|
| 787 |
+
|
| 788 |
+
|
| 789 |
+
def check_instanceof(
|
| 790 |
+
value: Any,
|
| 791 |
+
origin_type: Any,
|
| 792 |
+
args: tuple[Any, ...],
|
| 793 |
+
memo: TypeCheckMemo,
|
| 794 |
+
) -> None:
|
| 795 |
+
if not isinstance(value, origin_type):
|
| 796 |
+
raise TypeCheckError(f"is not an instance of {qualified_name(origin_type)}")
|
| 797 |
+
|
| 798 |
+
|
| 799 |
+
def check_type_internal(
|
| 800 |
+
value: Any,
|
| 801 |
+
annotation: Any,
|
| 802 |
+
memo: TypeCheckMemo,
|
| 803 |
+
) -> None:
|
| 804 |
+
"""
|
| 805 |
+
Check that the given object is compatible with the given type annotation.
|
| 806 |
+
|
| 807 |
+
This function should only be used by type checker callables. Applications should use
|
| 808 |
+
:func:`~.check_type` instead.
|
| 809 |
+
|
| 810 |
+
:param value: the value to check
|
| 811 |
+
:param annotation: the type annotation to check against
|
| 812 |
+
:param memo: a memo object containing configuration and information necessary for
|
| 813 |
+
looking up forward references
|
| 814 |
+
"""
|
| 815 |
+
|
| 816 |
+
if isinstance(annotation, ForwardRef):
|
| 817 |
+
try:
|
| 818 |
+
annotation = evaluate_forwardref(annotation, memo)
|
| 819 |
+
except NameError:
|
| 820 |
+
if memo.config.forward_ref_policy is ForwardRefPolicy.ERROR:
|
| 821 |
+
raise
|
| 822 |
+
elif memo.config.forward_ref_policy is ForwardRefPolicy.WARN:
|
| 823 |
+
warnings.warn(
|
| 824 |
+
f"Cannot resolve forward reference {annotation.__forward_arg__!r}",
|
| 825 |
+
TypeHintWarning,
|
| 826 |
+
stacklevel=get_stacklevel(),
|
| 827 |
+
)
|
| 828 |
+
|
| 829 |
+
return
|
| 830 |
+
|
| 831 |
+
if annotation is Any or annotation is SubclassableAny or isinstance(value, Mock):
|
| 832 |
+
return
|
| 833 |
+
|
| 834 |
+
# Skip type checks if value is an instance of a class that inherits from Any
|
| 835 |
+
if not isclass(value) and SubclassableAny in type(value).__bases__:
|
| 836 |
+
return
|
| 837 |
+
|
| 838 |
+
extras: tuple[Any, ...]
|
| 839 |
+
origin_type = get_origin(annotation)
|
| 840 |
+
if origin_type is Annotated:
|
| 841 |
+
annotation, *extras_ = get_args(annotation)
|
| 842 |
+
extras = tuple(extras_)
|
| 843 |
+
origin_type = get_origin(annotation)
|
| 844 |
+
else:
|
| 845 |
+
extras = ()
|
| 846 |
+
|
| 847 |
+
if origin_type is not None:
|
| 848 |
+
args = get_args(annotation)
|
| 849 |
+
|
| 850 |
+
# Compatibility hack to distinguish between unparametrized and empty tuple
|
| 851 |
+
# (tuple[()]), necessary due to https://github.com/python/cpython/issues/91137
|
| 852 |
+
if origin_type in (tuple, Tuple) and annotation is not Tuple and not args:
|
| 853 |
+
args = ((),)
|
| 854 |
+
else:
|
| 855 |
+
origin_type = annotation
|
| 856 |
+
args = ()
|
| 857 |
+
|
| 858 |
+
for lookup_func in checker_lookup_functions:
|
| 859 |
+
checker = lookup_func(origin_type, args, extras)
|
| 860 |
+
if checker:
|
| 861 |
+
checker(value, origin_type, args, memo)
|
| 862 |
+
return
|
| 863 |
+
|
| 864 |
+
if isclass(origin_type):
|
| 865 |
+
if not isinstance(value, origin_type):
|
| 866 |
+
raise TypeCheckError(f"is not an instance of {qualified_name(origin_type)}")
|
| 867 |
+
elif type(origin_type) is str: # noqa: E721
|
| 868 |
+
warnings.warn(
|
| 869 |
+
f"Skipping type check against {origin_type!r}; this looks like a "
|
| 870 |
+
f"string-form forward reference imported from another module",
|
| 871 |
+
TypeHintWarning,
|
| 872 |
+
stacklevel=get_stacklevel(),
|
| 873 |
+
)
|
| 874 |
+
|
| 875 |
+
|
| 876 |
+
# Equality checks are applied to these
|
| 877 |
+
origin_type_checkers = {
|
| 878 |
+
bytes: check_byteslike,
|
| 879 |
+
AbstractSet: check_set,
|
| 880 |
+
BinaryIO: check_io,
|
| 881 |
+
Callable: check_callable,
|
| 882 |
+
collections.abc.Callable: check_callable,
|
| 883 |
+
complex: check_number,
|
| 884 |
+
dict: check_mapping,
|
| 885 |
+
Dict: check_mapping,
|
| 886 |
+
float: check_number,
|
| 887 |
+
frozenset: check_set,
|
| 888 |
+
IO: check_io,
|
| 889 |
+
list: check_list,
|
| 890 |
+
List: check_list,
|
| 891 |
+
typing.Literal: check_literal,
|
| 892 |
+
Mapping: check_mapping,
|
| 893 |
+
MutableMapping: check_mapping,
|
| 894 |
+
None: check_none,
|
| 895 |
+
collections.abc.Mapping: check_mapping,
|
| 896 |
+
collections.abc.MutableMapping: check_mapping,
|
| 897 |
+
Sequence: check_sequence,
|
| 898 |
+
collections.abc.Sequence: check_sequence,
|
| 899 |
+
collections.abc.Set: check_set,
|
| 900 |
+
set: check_set,
|
| 901 |
+
Set: check_set,
|
| 902 |
+
TextIO: check_io,
|
| 903 |
+
tuple: check_tuple,
|
| 904 |
+
Tuple: check_tuple,
|
| 905 |
+
type: check_class,
|
| 906 |
+
Type: check_class,
|
| 907 |
+
Union: check_union,
|
| 908 |
+
}
|
| 909 |
+
if sys.version_info >= (3, 10):
|
| 910 |
+
origin_type_checkers[types.UnionType] = check_uniontype
|
| 911 |
+
origin_type_checkers[typing.TypeGuard] = check_typeguard
|
| 912 |
+
if sys.version_info >= (3, 11):
|
| 913 |
+
origin_type_checkers.update(
|
| 914 |
+
{typing.LiteralString: check_literal_string, typing.Self: check_self}
|
| 915 |
+
)
|
| 916 |
+
if typing_extensions is not None:
|
| 917 |
+
# On some Python versions, these may simply be re-exports from typing,
|
| 918 |
+
# but exactly which Python versions is subject to change,
|
| 919 |
+
# so it's best to err on the safe side
|
| 920 |
+
# and update the dictionary on all Python versions
|
| 921 |
+
# if typing_extensions is installed
|
| 922 |
+
origin_type_checkers[typing_extensions.Literal] = check_literal
|
| 923 |
+
origin_type_checkers[typing_extensions.LiteralString] = check_literal_string
|
| 924 |
+
origin_type_checkers[typing_extensions.Self] = check_self
|
| 925 |
+
origin_type_checkers[typing_extensions.TypeGuard] = check_typeguard
|
| 926 |
+
|
| 927 |
+
|
| 928 |
+
def builtin_checker_lookup(
|
| 929 |
+
origin_type: Any, args: tuple[Any, ...], extras: tuple[Any, ...]
|
| 930 |
+
) -> TypeCheckerCallable | None:
|
| 931 |
+
checker = origin_type_checkers.get(origin_type)
|
| 932 |
+
if checker is not None:
|
| 933 |
+
return checker
|
| 934 |
+
elif is_typeddict(origin_type):
|
| 935 |
+
return check_typed_dict
|
| 936 |
+
elif isclass(origin_type) and issubclass(
|
| 937 |
+
origin_type,
|
| 938 |
+
Tuple, # type: ignore[arg-type]
|
| 939 |
+
):
|
| 940 |
+
# NamedTuple
|
| 941 |
+
return check_tuple
|
| 942 |
+
elif getattr(origin_type, "_is_protocol", False):
|
| 943 |
+
return check_protocol
|
| 944 |
+
elif isinstance(origin_type, ParamSpec):
|
| 945 |
+
return check_paramspec
|
| 946 |
+
elif isinstance(origin_type, TypeVar):
|
| 947 |
+
return check_typevar
|
| 948 |
+
elif origin_type.__class__ is NewType:
|
| 949 |
+
# typing.NewType on Python 3.10+
|
| 950 |
+
return check_newtype
|
| 951 |
+
elif (
|
| 952 |
+
isfunction(origin_type)
|
| 953 |
+
and getattr(origin_type, "__module__", None) == "typing"
|
| 954 |
+
and getattr(origin_type, "__qualname__", "").startswith("NewType.")
|
| 955 |
+
and hasattr(origin_type, "__supertype__")
|
| 956 |
+
):
|
| 957 |
+
# typing.NewType on Python 3.9 and below
|
| 958 |
+
return check_newtype
|
| 959 |
+
|
| 960 |
+
return None
|
| 961 |
+
|
| 962 |
+
|
| 963 |
+
checker_lookup_functions.append(builtin_checker_lookup)
|
| 964 |
+
|
| 965 |
+
|
| 966 |
+
def load_plugins() -> None:
|
| 967 |
+
"""
|
| 968 |
+
Load all type checker lookup functions from entry points.
|
| 969 |
+
|
| 970 |
+
All entry points from the ``typeguard.checker_lookup`` group are loaded, and the
|
| 971 |
+
returned lookup functions are added to :data:`typeguard.checker_lookup_functions`.
|
| 972 |
+
|
| 973 |
+
.. note:: This function is called implicitly on import, unless the
|
| 974 |
+
``TYPEGUARD_DISABLE_PLUGIN_AUTOLOAD`` environment variable is present.
|
| 975 |
+
"""
|
| 976 |
+
|
| 977 |
+
for ep in entry_points(group="typeguard.checker_lookup"):
|
| 978 |
+
try:
|
| 979 |
+
plugin = ep.load()
|
| 980 |
+
except Exception as exc:
|
| 981 |
+
warnings.warn(
|
| 982 |
+
f"Failed to load plugin {ep.name!r}: " f"{qualified_name(exc)}: {exc}",
|
| 983 |
+
stacklevel=2,
|
| 984 |
+
)
|
| 985 |
+
continue
|
| 986 |
+
|
| 987 |
+
if not callable(plugin):
|
| 988 |
+
warnings.warn(
|
| 989 |
+
f"Plugin {ep} returned a non-callable object: {plugin!r}", stacklevel=2
|
| 990 |
+
)
|
| 991 |
+
continue
|
| 992 |
+
|
| 993 |
+
checker_lookup_functions.insert(0, plugin)
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_config.py
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from collections.abc import Iterable
|
| 4 |
+
from dataclasses import dataclass
|
| 5 |
+
from enum import Enum, auto
|
| 6 |
+
from typing import TYPE_CHECKING, TypeVar
|
| 7 |
+
|
| 8 |
+
if TYPE_CHECKING:
|
| 9 |
+
from ._functions import TypeCheckFailCallback
|
| 10 |
+
|
| 11 |
+
T = TypeVar("T")
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
class ForwardRefPolicy(Enum):
|
| 15 |
+
"""
|
| 16 |
+
Defines how unresolved forward references are handled.
|
| 17 |
+
|
| 18 |
+
Members:
|
| 19 |
+
|
| 20 |
+
* ``ERROR``: propagate the :exc:`NameError` when the forward reference lookup fails
|
| 21 |
+
* ``WARN``: emit a :class:`~.TypeHintWarning` if the forward reference lookup fails
|
| 22 |
+
* ``IGNORE``: silently skip checks for unresolveable forward references
|
| 23 |
+
"""
|
| 24 |
+
|
| 25 |
+
ERROR = auto()
|
| 26 |
+
WARN = auto()
|
| 27 |
+
IGNORE = auto()
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
class CollectionCheckStrategy(Enum):
|
| 31 |
+
"""
|
| 32 |
+
Specifies how thoroughly the contents of collections are type checked.
|
| 33 |
+
|
| 34 |
+
This has an effect on the following built-in checkers:
|
| 35 |
+
|
| 36 |
+
* ``AbstractSet``
|
| 37 |
+
* ``Dict``
|
| 38 |
+
* ``List``
|
| 39 |
+
* ``Mapping``
|
| 40 |
+
* ``Set``
|
| 41 |
+
* ``Tuple[<type>, ...]`` (arbitrarily sized tuples)
|
| 42 |
+
|
| 43 |
+
Members:
|
| 44 |
+
|
| 45 |
+
* ``FIRST_ITEM``: check only the first item
|
| 46 |
+
* ``ALL_ITEMS``: check all items
|
| 47 |
+
"""
|
| 48 |
+
|
| 49 |
+
FIRST_ITEM = auto()
|
| 50 |
+
ALL_ITEMS = auto()
|
| 51 |
+
|
| 52 |
+
def iterate_samples(self, collection: Iterable[T]) -> Iterable[T]:
|
| 53 |
+
if self is CollectionCheckStrategy.FIRST_ITEM:
|
| 54 |
+
try:
|
| 55 |
+
return [next(iter(collection))]
|
| 56 |
+
except StopIteration:
|
| 57 |
+
return ()
|
| 58 |
+
else:
|
| 59 |
+
return collection
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
@dataclass
|
| 63 |
+
class TypeCheckConfiguration:
|
| 64 |
+
"""
|
| 65 |
+
You can change Typeguard's behavior with these settings.
|
| 66 |
+
|
| 67 |
+
.. attribute:: typecheck_fail_callback
|
| 68 |
+
:type: Callable[[TypeCheckError, TypeCheckMemo], Any]
|
| 69 |
+
|
| 70 |
+
Callable that is called when type checking fails.
|
| 71 |
+
|
| 72 |
+
Default: ``None`` (the :exc:`~.TypeCheckError` is raised directly)
|
| 73 |
+
|
| 74 |
+
.. attribute:: forward_ref_policy
|
| 75 |
+
:type: ForwardRefPolicy
|
| 76 |
+
|
| 77 |
+
Specifies what to do when a forward reference fails to resolve.
|
| 78 |
+
|
| 79 |
+
Default: ``WARN``
|
| 80 |
+
|
| 81 |
+
.. attribute:: collection_check_strategy
|
| 82 |
+
:type: CollectionCheckStrategy
|
| 83 |
+
|
| 84 |
+
Specifies how thoroughly the contents of collections (list, dict, etc.) are
|
| 85 |
+
type checked.
|
| 86 |
+
|
| 87 |
+
Default: ``FIRST_ITEM``
|
| 88 |
+
|
| 89 |
+
.. attribute:: debug_instrumentation
|
| 90 |
+
:type: bool
|
| 91 |
+
|
| 92 |
+
If set to ``True``, the code of modules or functions instrumented by typeguard
|
| 93 |
+
is printed to ``sys.stderr`` after the instrumentation is done
|
| 94 |
+
|
| 95 |
+
Requires Python 3.9 or newer.
|
| 96 |
+
|
| 97 |
+
Default: ``False``
|
| 98 |
+
"""
|
| 99 |
+
|
| 100 |
+
forward_ref_policy: ForwardRefPolicy = ForwardRefPolicy.WARN
|
| 101 |
+
typecheck_fail_callback: TypeCheckFailCallback | None = None
|
| 102 |
+
collection_check_strategy: CollectionCheckStrategy = (
|
| 103 |
+
CollectionCheckStrategy.FIRST_ITEM
|
| 104 |
+
)
|
| 105 |
+
debug_instrumentation: bool = False
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
global_config = TypeCheckConfiguration()
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_decorators.py
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import ast
|
| 4 |
+
import inspect
|
| 5 |
+
import sys
|
| 6 |
+
from collections.abc import Sequence
|
| 7 |
+
from functools import partial
|
| 8 |
+
from inspect import isclass, isfunction
|
| 9 |
+
from types import CodeType, FrameType, FunctionType
|
| 10 |
+
from typing import TYPE_CHECKING, Any, Callable, ForwardRef, TypeVar, cast, overload
|
| 11 |
+
from warnings import warn
|
| 12 |
+
|
| 13 |
+
from ._config import CollectionCheckStrategy, ForwardRefPolicy, global_config
|
| 14 |
+
from ._exceptions import InstrumentationWarning
|
| 15 |
+
from ._functions import TypeCheckFailCallback
|
| 16 |
+
from ._transformer import TypeguardTransformer
|
| 17 |
+
from ._utils import Unset, function_name, get_stacklevel, is_method_of, unset
|
| 18 |
+
|
| 19 |
+
if TYPE_CHECKING:
|
| 20 |
+
from typeshed.stdlib.types import _Cell
|
| 21 |
+
|
| 22 |
+
_F = TypeVar("_F")
|
| 23 |
+
|
| 24 |
+
def typeguard_ignore(f: _F) -> _F:
|
| 25 |
+
"""This decorator is a noop during static type-checking."""
|
| 26 |
+
return f
|
| 27 |
+
|
| 28 |
+
else:
|
| 29 |
+
from typing import no_type_check as typeguard_ignore # noqa: F401
|
| 30 |
+
|
| 31 |
+
T_CallableOrType = TypeVar("T_CallableOrType", bound=Callable[..., Any])
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
def make_cell(value: object) -> _Cell:
|
| 35 |
+
return (lambda: value).__closure__[0] # type: ignore[index]
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
def find_target_function(
|
| 39 |
+
new_code: CodeType, target_path: Sequence[str], firstlineno: int
|
| 40 |
+
) -> CodeType | None:
|
| 41 |
+
target_name = target_path[0]
|
| 42 |
+
for const in new_code.co_consts:
|
| 43 |
+
if isinstance(const, CodeType):
|
| 44 |
+
if const.co_name == target_name:
|
| 45 |
+
if const.co_firstlineno == firstlineno:
|
| 46 |
+
return const
|
| 47 |
+
elif len(target_path) > 1:
|
| 48 |
+
target_code = find_target_function(
|
| 49 |
+
const, target_path[1:], firstlineno
|
| 50 |
+
)
|
| 51 |
+
if target_code:
|
| 52 |
+
return target_code
|
| 53 |
+
|
| 54 |
+
return None
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
def instrument(f: T_CallableOrType) -> FunctionType | str:
|
| 58 |
+
if not getattr(f, "__code__", None):
|
| 59 |
+
return "no code associated"
|
| 60 |
+
elif not getattr(f, "__module__", None):
|
| 61 |
+
return "__module__ attribute is not set"
|
| 62 |
+
elif f.__code__.co_filename == "<stdin>":
|
| 63 |
+
return "cannot instrument functions defined in a REPL"
|
| 64 |
+
elif hasattr(f, "__wrapped__"):
|
| 65 |
+
return (
|
| 66 |
+
"@typechecked only supports instrumenting functions wrapped with "
|
| 67 |
+
"@classmethod, @staticmethod or @property"
|
| 68 |
+
)
|
| 69 |
+
|
| 70 |
+
target_path = [item for item in f.__qualname__.split(".") if item != "<locals>"]
|
| 71 |
+
module_source = inspect.getsource(sys.modules[f.__module__])
|
| 72 |
+
module_ast = ast.parse(module_source)
|
| 73 |
+
instrumentor = TypeguardTransformer(target_path, f.__code__.co_firstlineno)
|
| 74 |
+
instrumentor.visit(module_ast)
|
| 75 |
+
|
| 76 |
+
if not instrumentor.target_node or instrumentor.target_lineno is None:
|
| 77 |
+
return "instrumentor did not find the target function"
|
| 78 |
+
|
| 79 |
+
module_code = compile(module_ast, f.__code__.co_filename, "exec", dont_inherit=True)
|
| 80 |
+
new_code = find_target_function(
|
| 81 |
+
module_code, target_path, instrumentor.target_lineno
|
| 82 |
+
)
|
| 83 |
+
if not new_code:
|
| 84 |
+
return "cannot find the target function in the AST"
|
| 85 |
+
|
| 86 |
+
if global_config.debug_instrumentation and sys.version_info >= (3, 9):
|
| 87 |
+
# Find the matching AST node, then unparse it to source and print to stdout
|
| 88 |
+
print(
|
| 89 |
+
f"Source code of {f.__qualname__}() after instrumentation:"
|
| 90 |
+
"\n----------------------------------------------",
|
| 91 |
+
file=sys.stderr,
|
| 92 |
+
)
|
| 93 |
+
print(ast.unparse(instrumentor.target_node), file=sys.stderr)
|
| 94 |
+
print(
|
| 95 |
+
"----------------------------------------------",
|
| 96 |
+
file=sys.stderr,
|
| 97 |
+
)
|
| 98 |
+
|
| 99 |
+
closure = f.__closure__
|
| 100 |
+
if new_code.co_freevars != f.__code__.co_freevars:
|
| 101 |
+
# Create a new closure and find values for the new free variables
|
| 102 |
+
frame = cast(FrameType, inspect.currentframe())
|
| 103 |
+
frame = cast(FrameType, frame.f_back)
|
| 104 |
+
frame_locals = cast(FrameType, frame.f_back).f_locals
|
| 105 |
+
cells: list[_Cell] = []
|
| 106 |
+
for key in new_code.co_freevars:
|
| 107 |
+
if key in instrumentor.names_used_in_annotations:
|
| 108 |
+
# Find the value and make a new cell from it
|
| 109 |
+
value = frame_locals.get(key) or ForwardRef(key)
|
| 110 |
+
cells.append(make_cell(value))
|
| 111 |
+
else:
|
| 112 |
+
# Reuse the cell from the existing closure
|
| 113 |
+
assert f.__closure__
|
| 114 |
+
cells.append(f.__closure__[f.__code__.co_freevars.index(key)])
|
| 115 |
+
|
| 116 |
+
closure = tuple(cells)
|
| 117 |
+
|
| 118 |
+
new_function = FunctionType(new_code, f.__globals__, f.__name__, closure=closure)
|
| 119 |
+
new_function.__module__ = f.__module__
|
| 120 |
+
new_function.__name__ = f.__name__
|
| 121 |
+
new_function.__qualname__ = f.__qualname__
|
| 122 |
+
new_function.__annotations__ = f.__annotations__
|
| 123 |
+
new_function.__doc__ = f.__doc__
|
| 124 |
+
new_function.__defaults__ = f.__defaults__
|
| 125 |
+
new_function.__kwdefaults__ = f.__kwdefaults__
|
| 126 |
+
return new_function
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
@overload
|
| 130 |
+
def typechecked(
|
| 131 |
+
*,
|
| 132 |
+
forward_ref_policy: ForwardRefPolicy | Unset = unset,
|
| 133 |
+
typecheck_fail_callback: TypeCheckFailCallback | Unset = unset,
|
| 134 |
+
collection_check_strategy: CollectionCheckStrategy | Unset = unset,
|
| 135 |
+
debug_instrumentation: bool | Unset = unset,
|
| 136 |
+
) -> Callable[[T_CallableOrType], T_CallableOrType]: ...
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
@overload
|
| 140 |
+
def typechecked(target: T_CallableOrType) -> T_CallableOrType: ...
|
| 141 |
+
|
| 142 |
+
|
| 143 |
+
def typechecked(
|
| 144 |
+
target: T_CallableOrType | None = None,
|
| 145 |
+
*,
|
| 146 |
+
forward_ref_policy: ForwardRefPolicy | Unset = unset,
|
| 147 |
+
typecheck_fail_callback: TypeCheckFailCallback | Unset = unset,
|
| 148 |
+
collection_check_strategy: CollectionCheckStrategy | Unset = unset,
|
| 149 |
+
debug_instrumentation: bool | Unset = unset,
|
| 150 |
+
) -> Any:
|
| 151 |
+
"""
|
| 152 |
+
Instrument the target function to perform run-time type checking.
|
| 153 |
+
|
| 154 |
+
This decorator recompiles the target function, injecting code to type check
|
| 155 |
+
arguments, return values, yield values (excluding ``yield from``) and assignments to
|
| 156 |
+
annotated local variables.
|
| 157 |
+
|
| 158 |
+
This can also be used as a class decorator. This will instrument all type annotated
|
| 159 |
+
methods, including :func:`@classmethod <classmethod>`,
|
| 160 |
+
:func:`@staticmethod <staticmethod>`, and :class:`@property <property>` decorated
|
| 161 |
+
methods in the class.
|
| 162 |
+
|
| 163 |
+
.. note:: When Python is run in optimized mode (``-O`` or ``-OO``, this decorator
|
| 164 |
+
is a no-op). This is a feature meant for selectively introducing type checking
|
| 165 |
+
into a code base where the checks aren't meant to be run in production.
|
| 166 |
+
|
| 167 |
+
:param target: the function or class to enable type checking for
|
| 168 |
+
:param forward_ref_policy: override for
|
| 169 |
+
:attr:`.TypeCheckConfiguration.forward_ref_policy`
|
| 170 |
+
:param typecheck_fail_callback: override for
|
| 171 |
+
:attr:`.TypeCheckConfiguration.typecheck_fail_callback`
|
| 172 |
+
:param collection_check_strategy: override for
|
| 173 |
+
:attr:`.TypeCheckConfiguration.collection_check_strategy`
|
| 174 |
+
:param debug_instrumentation: override for
|
| 175 |
+
:attr:`.TypeCheckConfiguration.debug_instrumentation`
|
| 176 |
+
|
| 177 |
+
"""
|
| 178 |
+
if target is None:
|
| 179 |
+
return partial(
|
| 180 |
+
typechecked,
|
| 181 |
+
forward_ref_policy=forward_ref_policy,
|
| 182 |
+
typecheck_fail_callback=typecheck_fail_callback,
|
| 183 |
+
collection_check_strategy=collection_check_strategy,
|
| 184 |
+
debug_instrumentation=debug_instrumentation,
|
| 185 |
+
)
|
| 186 |
+
|
| 187 |
+
if not __debug__:
|
| 188 |
+
return target
|
| 189 |
+
|
| 190 |
+
if isclass(target):
|
| 191 |
+
for key, attr in target.__dict__.items():
|
| 192 |
+
if is_method_of(attr, target):
|
| 193 |
+
retval = instrument(attr)
|
| 194 |
+
if isfunction(retval):
|
| 195 |
+
setattr(target, key, retval)
|
| 196 |
+
elif isinstance(attr, (classmethod, staticmethod)):
|
| 197 |
+
if is_method_of(attr.__func__, target):
|
| 198 |
+
retval = instrument(attr.__func__)
|
| 199 |
+
if isfunction(retval):
|
| 200 |
+
wrapper = attr.__class__(retval)
|
| 201 |
+
setattr(target, key, wrapper)
|
| 202 |
+
elif isinstance(attr, property):
|
| 203 |
+
kwargs: dict[str, Any] = dict(doc=attr.__doc__)
|
| 204 |
+
for name in ("fset", "fget", "fdel"):
|
| 205 |
+
property_func = kwargs[name] = getattr(attr, name)
|
| 206 |
+
if is_method_of(property_func, target):
|
| 207 |
+
retval = instrument(property_func)
|
| 208 |
+
if isfunction(retval):
|
| 209 |
+
kwargs[name] = retval
|
| 210 |
+
|
| 211 |
+
setattr(target, key, attr.__class__(**kwargs))
|
| 212 |
+
|
| 213 |
+
return target
|
| 214 |
+
|
| 215 |
+
# Find either the first Python wrapper or the actual function
|
| 216 |
+
wrapper_class: (
|
| 217 |
+
type[classmethod[Any, Any, Any]] | type[staticmethod[Any, Any]] | None
|
| 218 |
+
) = None
|
| 219 |
+
if isinstance(target, (classmethod, staticmethod)):
|
| 220 |
+
wrapper_class = target.__class__
|
| 221 |
+
target = target.__func__
|
| 222 |
+
|
| 223 |
+
retval = instrument(target)
|
| 224 |
+
if isinstance(retval, str):
|
| 225 |
+
warn(
|
| 226 |
+
f"{retval} -- not typechecking {function_name(target)}",
|
| 227 |
+
InstrumentationWarning,
|
| 228 |
+
stacklevel=get_stacklevel(),
|
| 229 |
+
)
|
| 230 |
+
return target
|
| 231 |
+
|
| 232 |
+
if wrapper_class is None:
|
| 233 |
+
return retval
|
| 234 |
+
else:
|
| 235 |
+
return wrapper_class(retval)
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_exceptions.py
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from collections import deque
|
| 2 |
+
from typing import Deque
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
class TypeHintWarning(UserWarning):
|
| 6 |
+
"""
|
| 7 |
+
A warning that is emitted when a type hint in string form could not be resolved to
|
| 8 |
+
an actual type.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class TypeCheckWarning(UserWarning):
|
| 13 |
+
"""Emitted by typeguard's type checkers when a type mismatch is detected."""
|
| 14 |
+
|
| 15 |
+
def __init__(self, message: str):
|
| 16 |
+
super().__init__(message)
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class InstrumentationWarning(UserWarning):
|
| 20 |
+
"""Emitted when there's a problem with instrumenting a function for type checks."""
|
| 21 |
+
|
| 22 |
+
def __init__(self, message: str):
|
| 23 |
+
super().__init__(message)
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
class TypeCheckError(Exception):
|
| 27 |
+
"""
|
| 28 |
+
Raised by typeguard's type checkers when a type mismatch is detected.
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
def __init__(self, message: str):
|
| 32 |
+
super().__init__(message)
|
| 33 |
+
self._path: Deque[str] = deque()
|
| 34 |
+
|
| 35 |
+
def append_path_element(self, element: str) -> None:
|
| 36 |
+
self._path.append(element)
|
| 37 |
+
|
| 38 |
+
def __str__(self) -> str:
|
| 39 |
+
if self._path:
|
| 40 |
+
return " of ".join(self._path) + " " + str(self.args[0])
|
| 41 |
+
else:
|
| 42 |
+
return str(self.args[0])
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_functions.py
ADDED
|
@@ -0,0 +1,308 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import sys
|
| 4 |
+
import warnings
|
| 5 |
+
from typing import Any, Callable, NoReturn, TypeVar, Union, overload
|
| 6 |
+
|
| 7 |
+
from . import _suppression
|
| 8 |
+
from ._checkers import BINARY_MAGIC_METHODS, check_type_internal
|
| 9 |
+
from ._config import (
|
| 10 |
+
CollectionCheckStrategy,
|
| 11 |
+
ForwardRefPolicy,
|
| 12 |
+
TypeCheckConfiguration,
|
| 13 |
+
)
|
| 14 |
+
from ._exceptions import TypeCheckError, TypeCheckWarning
|
| 15 |
+
from ._memo import TypeCheckMemo
|
| 16 |
+
from ._utils import get_stacklevel, qualified_name
|
| 17 |
+
|
| 18 |
+
if sys.version_info >= (3, 11):
|
| 19 |
+
from typing import Literal, Never, TypeAlias
|
| 20 |
+
else:
|
| 21 |
+
from typing_extensions import Literal, Never, TypeAlias
|
| 22 |
+
|
| 23 |
+
T = TypeVar("T")
|
| 24 |
+
TypeCheckFailCallback: TypeAlias = Callable[[TypeCheckError, TypeCheckMemo], Any]
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
@overload
|
| 28 |
+
def check_type(
|
| 29 |
+
value: object,
|
| 30 |
+
expected_type: type[T],
|
| 31 |
+
*,
|
| 32 |
+
forward_ref_policy: ForwardRefPolicy = ...,
|
| 33 |
+
typecheck_fail_callback: TypeCheckFailCallback | None = ...,
|
| 34 |
+
collection_check_strategy: CollectionCheckStrategy = ...,
|
| 35 |
+
) -> T: ...
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
@overload
|
| 39 |
+
def check_type(
|
| 40 |
+
value: object,
|
| 41 |
+
expected_type: Any,
|
| 42 |
+
*,
|
| 43 |
+
forward_ref_policy: ForwardRefPolicy = ...,
|
| 44 |
+
typecheck_fail_callback: TypeCheckFailCallback | None = ...,
|
| 45 |
+
collection_check_strategy: CollectionCheckStrategy = ...,
|
| 46 |
+
) -> Any: ...
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
def check_type(
|
| 50 |
+
value: object,
|
| 51 |
+
expected_type: Any,
|
| 52 |
+
*,
|
| 53 |
+
forward_ref_policy: ForwardRefPolicy = TypeCheckConfiguration().forward_ref_policy,
|
| 54 |
+
typecheck_fail_callback: TypeCheckFailCallback | None = (
|
| 55 |
+
TypeCheckConfiguration().typecheck_fail_callback
|
| 56 |
+
),
|
| 57 |
+
collection_check_strategy: CollectionCheckStrategy = (
|
| 58 |
+
TypeCheckConfiguration().collection_check_strategy
|
| 59 |
+
),
|
| 60 |
+
) -> Any:
|
| 61 |
+
"""
|
| 62 |
+
Ensure that ``value`` matches ``expected_type``.
|
| 63 |
+
|
| 64 |
+
The types from the :mod:`typing` module do not support :func:`isinstance` or
|
| 65 |
+
:func:`issubclass` so a number of type specific checks are required. This function
|
| 66 |
+
knows which checker to call for which type.
|
| 67 |
+
|
| 68 |
+
This function wraps :func:`~.check_type_internal` in the following ways:
|
| 69 |
+
|
| 70 |
+
* Respects type checking suppression (:func:`~.suppress_type_checks`)
|
| 71 |
+
* Forms a :class:`~.TypeCheckMemo` from the current stack frame
|
| 72 |
+
* Calls the configured type check fail callback if the check fails
|
| 73 |
+
|
| 74 |
+
Note that this function is independent of the globally shared configuration in
|
| 75 |
+
:data:`typeguard.config`. This means that usage within libraries is safe from being
|
| 76 |
+
affected configuration changes made by other libraries or by the integrating
|
| 77 |
+
application. Instead, configuration options have the same default values as their
|
| 78 |
+
corresponding fields in :class:`TypeCheckConfiguration`.
|
| 79 |
+
|
| 80 |
+
:param value: value to be checked against ``expected_type``
|
| 81 |
+
:param expected_type: a class or generic type instance, or a tuple of such things
|
| 82 |
+
:param forward_ref_policy: see :attr:`TypeCheckConfiguration.forward_ref_policy`
|
| 83 |
+
:param typecheck_fail_callback:
|
| 84 |
+
see :attr`TypeCheckConfiguration.typecheck_fail_callback`
|
| 85 |
+
:param collection_check_strategy:
|
| 86 |
+
see :attr:`TypeCheckConfiguration.collection_check_strategy`
|
| 87 |
+
:return: ``value``, unmodified
|
| 88 |
+
:raises TypeCheckError: if there is a type mismatch
|
| 89 |
+
|
| 90 |
+
"""
|
| 91 |
+
if type(expected_type) is tuple:
|
| 92 |
+
expected_type = Union[expected_type]
|
| 93 |
+
|
| 94 |
+
config = TypeCheckConfiguration(
|
| 95 |
+
forward_ref_policy=forward_ref_policy,
|
| 96 |
+
typecheck_fail_callback=typecheck_fail_callback,
|
| 97 |
+
collection_check_strategy=collection_check_strategy,
|
| 98 |
+
)
|
| 99 |
+
|
| 100 |
+
if _suppression.type_checks_suppressed or expected_type is Any:
|
| 101 |
+
return value
|
| 102 |
+
|
| 103 |
+
frame = sys._getframe(1)
|
| 104 |
+
memo = TypeCheckMemo(frame.f_globals, frame.f_locals, config=config)
|
| 105 |
+
try:
|
| 106 |
+
check_type_internal(value, expected_type, memo)
|
| 107 |
+
except TypeCheckError as exc:
|
| 108 |
+
exc.append_path_element(qualified_name(value, add_class_prefix=True))
|
| 109 |
+
if config.typecheck_fail_callback:
|
| 110 |
+
config.typecheck_fail_callback(exc, memo)
|
| 111 |
+
else:
|
| 112 |
+
raise
|
| 113 |
+
|
| 114 |
+
return value
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
def check_argument_types(
|
| 118 |
+
func_name: str,
|
| 119 |
+
arguments: dict[str, tuple[Any, Any]],
|
| 120 |
+
memo: TypeCheckMemo,
|
| 121 |
+
) -> Literal[True]:
|
| 122 |
+
if _suppression.type_checks_suppressed:
|
| 123 |
+
return True
|
| 124 |
+
|
| 125 |
+
for argname, (value, annotation) in arguments.items():
|
| 126 |
+
if annotation is NoReturn or annotation is Never:
|
| 127 |
+
exc = TypeCheckError(
|
| 128 |
+
f"{func_name}() was declared never to be called but it was"
|
| 129 |
+
)
|
| 130 |
+
if memo.config.typecheck_fail_callback:
|
| 131 |
+
memo.config.typecheck_fail_callback(exc, memo)
|
| 132 |
+
else:
|
| 133 |
+
raise exc
|
| 134 |
+
|
| 135 |
+
try:
|
| 136 |
+
check_type_internal(value, annotation, memo)
|
| 137 |
+
except TypeCheckError as exc:
|
| 138 |
+
qualname = qualified_name(value, add_class_prefix=True)
|
| 139 |
+
exc.append_path_element(f'argument "{argname}" ({qualname})')
|
| 140 |
+
if memo.config.typecheck_fail_callback:
|
| 141 |
+
memo.config.typecheck_fail_callback(exc, memo)
|
| 142 |
+
else:
|
| 143 |
+
raise
|
| 144 |
+
|
| 145 |
+
return True
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
def check_return_type(
|
| 149 |
+
func_name: str,
|
| 150 |
+
retval: T,
|
| 151 |
+
annotation: Any,
|
| 152 |
+
memo: TypeCheckMemo,
|
| 153 |
+
) -> T:
|
| 154 |
+
if _suppression.type_checks_suppressed:
|
| 155 |
+
return retval
|
| 156 |
+
|
| 157 |
+
if annotation is NoReturn or annotation is Never:
|
| 158 |
+
exc = TypeCheckError(f"{func_name}() was declared never to return but it did")
|
| 159 |
+
if memo.config.typecheck_fail_callback:
|
| 160 |
+
memo.config.typecheck_fail_callback(exc, memo)
|
| 161 |
+
else:
|
| 162 |
+
raise exc
|
| 163 |
+
|
| 164 |
+
try:
|
| 165 |
+
check_type_internal(retval, annotation, memo)
|
| 166 |
+
except TypeCheckError as exc:
|
| 167 |
+
# Allow NotImplemented if this is a binary magic method (__eq__() et al)
|
| 168 |
+
if retval is NotImplemented and annotation is bool:
|
| 169 |
+
# This does (and cannot) not check if it's actually a method
|
| 170 |
+
func_name = func_name.rsplit(".", 1)[-1]
|
| 171 |
+
if func_name in BINARY_MAGIC_METHODS:
|
| 172 |
+
return retval
|
| 173 |
+
|
| 174 |
+
qualname = qualified_name(retval, add_class_prefix=True)
|
| 175 |
+
exc.append_path_element(f"the return value ({qualname})")
|
| 176 |
+
if memo.config.typecheck_fail_callback:
|
| 177 |
+
memo.config.typecheck_fail_callback(exc, memo)
|
| 178 |
+
else:
|
| 179 |
+
raise
|
| 180 |
+
|
| 181 |
+
return retval
|
| 182 |
+
|
| 183 |
+
|
| 184 |
+
def check_send_type(
|
| 185 |
+
func_name: str,
|
| 186 |
+
sendval: T,
|
| 187 |
+
annotation: Any,
|
| 188 |
+
memo: TypeCheckMemo,
|
| 189 |
+
) -> T:
|
| 190 |
+
if _suppression.type_checks_suppressed:
|
| 191 |
+
return sendval
|
| 192 |
+
|
| 193 |
+
if annotation is NoReturn or annotation is Never:
|
| 194 |
+
exc = TypeCheckError(
|
| 195 |
+
f"{func_name}() was declared never to be sent a value to but it was"
|
| 196 |
+
)
|
| 197 |
+
if memo.config.typecheck_fail_callback:
|
| 198 |
+
memo.config.typecheck_fail_callback(exc, memo)
|
| 199 |
+
else:
|
| 200 |
+
raise exc
|
| 201 |
+
|
| 202 |
+
try:
|
| 203 |
+
check_type_internal(sendval, annotation, memo)
|
| 204 |
+
except TypeCheckError as exc:
|
| 205 |
+
qualname = qualified_name(sendval, add_class_prefix=True)
|
| 206 |
+
exc.append_path_element(f"the value sent to generator ({qualname})")
|
| 207 |
+
if memo.config.typecheck_fail_callback:
|
| 208 |
+
memo.config.typecheck_fail_callback(exc, memo)
|
| 209 |
+
else:
|
| 210 |
+
raise
|
| 211 |
+
|
| 212 |
+
return sendval
|
| 213 |
+
|
| 214 |
+
|
| 215 |
+
def check_yield_type(
|
| 216 |
+
func_name: str,
|
| 217 |
+
yieldval: T,
|
| 218 |
+
annotation: Any,
|
| 219 |
+
memo: TypeCheckMemo,
|
| 220 |
+
) -> T:
|
| 221 |
+
if _suppression.type_checks_suppressed:
|
| 222 |
+
return yieldval
|
| 223 |
+
|
| 224 |
+
if annotation is NoReturn or annotation is Never:
|
| 225 |
+
exc = TypeCheckError(f"{func_name}() was declared never to yield but it did")
|
| 226 |
+
if memo.config.typecheck_fail_callback:
|
| 227 |
+
memo.config.typecheck_fail_callback(exc, memo)
|
| 228 |
+
else:
|
| 229 |
+
raise exc
|
| 230 |
+
|
| 231 |
+
try:
|
| 232 |
+
check_type_internal(yieldval, annotation, memo)
|
| 233 |
+
except TypeCheckError as exc:
|
| 234 |
+
qualname = qualified_name(yieldval, add_class_prefix=True)
|
| 235 |
+
exc.append_path_element(f"the yielded value ({qualname})")
|
| 236 |
+
if memo.config.typecheck_fail_callback:
|
| 237 |
+
memo.config.typecheck_fail_callback(exc, memo)
|
| 238 |
+
else:
|
| 239 |
+
raise
|
| 240 |
+
|
| 241 |
+
return yieldval
|
| 242 |
+
|
| 243 |
+
|
| 244 |
+
def check_variable_assignment(
|
| 245 |
+
value: object, varname: str, annotation: Any, memo: TypeCheckMemo
|
| 246 |
+
) -> Any:
|
| 247 |
+
if _suppression.type_checks_suppressed:
|
| 248 |
+
return value
|
| 249 |
+
|
| 250 |
+
try:
|
| 251 |
+
check_type_internal(value, annotation, memo)
|
| 252 |
+
except TypeCheckError as exc:
|
| 253 |
+
qualname = qualified_name(value, add_class_prefix=True)
|
| 254 |
+
exc.append_path_element(f"value assigned to {varname} ({qualname})")
|
| 255 |
+
if memo.config.typecheck_fail_callback:
|
| 256 |
+
memo.config.typecheck_fail_callback(exc, memo)
|
| 257 |
+
else:
|
| 258 |
+
raise
|
| 259 |
+
|
| 260 |
+
return value
|
| 261 |
+
|
| 262 |
+
|
| 263 |
+
def check_multi_variable_assignment(
|
| 264 |
+
value: Any, targets: list[dict[str, Any]], memo: TypeCheckMemo
|
| 265 |
+
) -> Any:
|
| 266 |
+
if max(len(target) for target in targets) == 1:
|
| 267 |
+
iterated_values = [value]
|
| 268 |
+
else:
|
| 269 |
+
iterated_values = list(value)
|
| 270 |
+
|
| 271 |
+
if not _suppression.type_checks_suppressed:
|
| 272 |
+
for expected_types in targets:
|
| 273 |
+
value_index = 0
|
| 274 |
+
for ann_index, (varname, expected_type) in enumerate(
|
| 275 |
+
expected_types.items()
|
| 276 |
+
):
|
| 277 |
+
if varname.startswith("*"):
|
| 278 |
+
varname = varname[1:]
|
| 279 |
+
keys_left = len(expected_types) - 1 - ann_index
|
| 280 |
+
next_value_index = len(iterated_values) - keys_left
|
| 281 |
+
obj: object = iterated_values[value_index:next_value_index]
|
| 282 |
+
value_index = next_value_index
|
| 283 |
+
else:
|
| 284 |
+
obj = iterated_values[value_index]
|
| 285 |
+
value_index += 1
|
| 286 |
+
|
| 287 |
+
try:
|
| 288 |
+
check_type_internal(obj, expected_type, memo)
|
| 289 |
+
except TypeCheckError as exc:
|
| 290 |
+
qualname = qualified_name(obj, add_class_prefix=True)
|
| 291 |
+
exc.append_path_element(f"value assigned to {varname} ({qualname})")
|
| 292 |
+
if memo.config.typecheck_fail_callback:
|
| 293 |
+
memo.config.typecheck_fail_callback(exc, memo)
|
| 294 |
+
else:
|
| 295 |
+
raise
|
| 296 |
+
|
| 297 |
+
return iterated_values[0] if len(iterated_values) == 1 else iterated_values
|
| 298 |
+
|
| 299 |
+
|
| 300 |
+
def warn_on_error(exc: TypeCheckError, memo: TypeCheckMemo) -> None:
|
| 301 |
+
"""
|
| 302 |
+
Emit a warning on a type mismatch.
|
| 303 |
+
|
| 304 |
+
This is intended to be used as an error handler in
|
| 305 |
+
:attr:`TypeCheckConfiguration.typecheck_fail_callback`.
|
| 306 |
+
|
| 307 |
+
"""
|
| 308 |
+
warnings.warn(TypeCheckWarning(str(exc)), stacklevel=get_stacklevel())
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_importhook.py
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import ast
|
| 4 |
+
import sys
|
| 5 |
+
import types
|
| 6 |
+
from collections.abc import Callable, Iterable
|
| 7 |
+
from importlib.abc import MetaPathFinder
|
| 8 |
+
from importlib.machinery import ModuleSpec, SourceFileLoader
|
| 9 |
+
from importlib.util import cache_from_source, decode_source
|
| 10 |
+
from inspect import isclass
|
| 11 |
+
from os import PathLike
|
| 12 |
+
from types import CodeType, ModuleType, TracebackType
|
| 13 |
+
from typing import Sequence, TypeVar
|
| 14 |
+
from unittest.mock import patch
|
| 15 |
+
|
| 16 |
+
from ._config import global_config
|
| 17 |
+
from ._transformer import TypeguardTransformer
|
| 18 |
+
|
| 19 |
+
if sys.version_info >= (3, 12):
|
| 20 |
+
from collections.abc import Buffer
|
| 21 |
+
else:
|
| 22 |
+
from typing_extensions import Buffer
|
| 23 |
+
|
| 24 |
+
if sys.version_info >= (3, 11):
|
| 25 |
+
from typing import ParamSpec
|
| 26 |
+
else:
|
| 27 |
+
from typing_extensions import ParamSpec
|
| 28 |
+
|
| 29 |
+
if sys.version_info >= (3, 10):
|
| 30 |
+
from importlib.metadata import PackageNotFoundError, version
|
| 31 |
+
else:
|
| 32 |
+
from importlib_metadata import PackageNotFoundError, version
|
| 33 |
+
|
| 34 |
+
try:
|
| 35 |
+
OPTIMIZATION = "typeguard" + "".join(version("typeguard").split(".")[:3])
|
| 36 |
+
except PackageNotFoundError:
|
| 37 |
+
OPTIMIZATION = "typeguard"
|
| 38 |
+
|
| 39 |
+
P = ParamSpec("P")
|
| 40 |
+
T = TypeVar("T")
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
# The name of this function is magical
|
| 44 |
+
def _call_with_frames_removed(
|
| 45 |
+
f: Callable[P, T], *args: P.args, **kwargs: P.kwargs
|
| 46 |
+
) -> T:
|
| 47 |
+
return f(*args, **kwargs)
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
def optimized_cache_from_source(path: str, debug_override: bool | None = None) -> str:
|
| 51 |
+
return cache_from_source(path, debug_override, optimization=OPTIMIZATION)
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
class TypeguardLoader(SourceFileLoader):
|
| 55 |
+
@staticmethod
|
| 56 |
+
def source_to_code(
|
| 57 |
+
data: Buffer | str | ast.Module | ast.Expression | ast.Interactive,
|
| 58 |
+
path: Buffer | str | PathLike[str] = "<string>",
|
| 59 |
+
) -> CodeType:
|
| 60 |
+
if isinstance(data, (ast.Module, ast.Expression, ast.Interactive)):
|
| 61 |
+
tree = data
|
| 62 |
+
else:
|
| 63 |
+
if isinstance(data, str):
|
| 64 |
+
source = data
|
| 65 |
+
else:
|
| 66 |
+
source = decode_source(data)
|
| 67 |
+
|
| 68 |
+
tree = _call_with_frames_removed(
|
| 69 |
+
ast.parse,
|
| 70 |
+
source,
|
| 71 |
+
path,
|
| 72 |
+
"exec",
|
| 73 |
+
)
|
| 74 |
+
|
| 75 |
+
tree = TypeguardTransformer().visit(tree)
|
| 76 |
+
ast.fix_missing_locations(tree)
|
| 77 |
+
|
| 78 |
+
if global_config.debug_instrumentation and sys.version_info >= (3, 9):
|
| 79 |
+
print(
|
| 80 |
+
f"Source code of {path!r} after instrumentation:\n"
|
| 81 |
+
"----------------------------------------------",
|
| 82 |
+
file=sys.stderr,
|
| 83 |
+
)
|
| 84 |
+
print(ast.unparse(tree), file=sys.stderr)
|
| 85 |
+
print("----------------------------------------------", file=sys.stderr)
|
| 86 |
+
|
| 87 |
+
return _call_with_frames_removed(
|
| 88 |
+
compile, tree, path, "exec", 0, dont_inherit=True
|
| 89 |
+
)
|
| 90 |
+
|
| 91 |
+
def exec_module(self, module: ModuleType) -> None:
|
| 92 |
+
# Use a custom optimization marker – the import lock should make this monkey
|
| 93 |
+
# patch safe
|
| 94 |
+
with patch(
|
| 95 |
+
"importlib._bootstrap_external.cache_from_source",
|
| 96 |
+
optimized_cache_from_source,
|
| 97 |
+
):
|
| 98 |
+
super().exec_module(module)
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
class TypeguardFinder(MetaPathFinder):
|
| 102 |
+
"""
|
| 103 |
+
Wraps another path finder and instruments the module with
|
| 104 |
+
:func:`@typechecked <typeguard.typechecked>` if :meth:`should_instrument` returns
|
| 105 |
+
``True``.
|
| 106 |
+
|
| 107 |
+
Should not be used directly, but rather via :func:`~.install_import_hook`.
|
| 108 |
+
|
| 109 |
+
.. versionadded:: 2.6
|
| 110 |
+
"""
|
| 111 |
+
|
| 112 |
+
def __init__(self, packages: list[str] | None, original_pathfinder: MetaPathFinder):
|
| 113 |
+
self.packages = packages
|
| 114 |
+
self._original_pathfinder = original_pathfinder
|
| 115 |
+
|
| 116 |
+
def find_spec(
|
| 117 |
+
self,
|
| 118 |
+
fullname: str,
|
| 119 |
+
path: Sequence[str] | None,
|
| 120 |
+
target: types.ModuleType | None = None,
|
| 121 |
+
) -> ModuleSpec | None:
|
| 122 |
+
if self.should_instrument(fullname):
|
| 123 |
+
spec = self._original_pathfinder.find_spec(fullname, path, target)
|
| 124 |
+
if spec is not None and isinstance(spec.loader, SourceFileLoader):
|
| 125 |
+
spec.loader = TypeguardLoader(spec.loader.name, spec.loader.path)
|
| 126 |
+
return spec
|
| 127 |
+
|
| 128 |
+
return None
|
| 129 |
+
|
| 130 |
+
def should_instrument(self, module_name: str) -> bool:
|
| 131 |
+
"""
|
| 132 |
+
Determine whether the module with the given name should be instrumented.
|
| 133 |
+
|
| 134 |
+
:param module_name: full name of the module that is about to be imported (e.g.
|
| 135 |
+
``xyz.abc``)
|
| 136 |
+
|
| 137 |
+
"""
|
| 138 |
+
if self.packages is None:
|
| 139 |
+
return True
|
| 140 |
+
|
| 141 |
+
for package in self.packages:
|
| 142 |
+
if module_name == package or module_name.startswith(package + "."):
|
| 143 |
+
return True
|
| 144 |
+
|
| 145 |
+
return False
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
class ImportHookManager:
|
| 149 |
+
"""
|
| 150 |
+
A handle that can be used to uninstall the Typeguard import hook.
|
| 151 |
+
"""
|
| 152 |
+
|
| 153 |
+
def __init__(self, hook: MetaPathFinder):
|
| 154 |
+
self.hook = hook
|
| 155 |
+
|
| 156 |
+
def __enter__(self) -> None:
|
| 157 |
+
pass
|
| 158 |
+
|
| 159 |
+
def __exit__(
|
| 160 |
+
self,
|
| 161 |
+
exc_type: type[BaseException],
|
| 162 |
+
exc_val: BaseException,
|
| 163 |
+
exc_tb: TracebackType,
|
| 164 |
+
) -> None:
|
| 165 |
+
self.uninstall()
|
| 166 |
+
|
| 167 |
+
def uninstall(self) -> None:
|
| 168 |
+
"""Uninstall the import hook."""
|
| 169 |
+
try:
|
| 170 |
+
sys.meta_path.remove(self.hook)
|
| 171 |
+
except ValueError:
|
| 172 |
+
pass # already removed
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
def install_import_hook(
|
| 176 |
+
packages: Iterable[str] | None = None,
|
| 177 |
+
*,
|
| 178 |
+
cls: type[TypeguardFinder] = TypeguardFinder,
|
| 179 |
+
) -> ImportHookManager:
|
| 180 |
+
"""
|
| 181 |
+
Install an import hook that instruments functions for automatic type checking.
|
| 182 |
+
|
| 183 |
+
This only affects modules loaded **after** this hook has been installed.
|
| 184 |
+
|
| 185 |
+
:param packages: an iterable of package names to instrument, or ``None`` to
|
| 186 |
+
instrument all packages
|
| 187 |
+
:param cls: a custom meta path finder class
|
| 188 |
+
:return: a context manager that uninstalls the hook on exit (or when you call
|
| 189 |
+
``.uninstall()``)
|
| 190 |
+
|
| 191 |
+
.. versionadded:: 2.6
|
| 192 |
+
|
| 193 |
+
"""
|
| 194 |
+
if packages is None:
|
| 195 |
+
target_packages: list[str] | None = None
|
| 196 |
+
elif isinstance(packages, str):
|
| 197 |
+
target_packages = [packages]
|
| 198 |
+
else:
|
| 199 |
+
target_packages = list(packages)
|
| 200 |
+
|
| 201 |
+
for finder in sys.meta_path:
|
| 202 |
+
if (
|
| 203 |
+
isclass(finder)
|
| 204 |
+
and finder.__name__ == "PathFinder"
|
| 205 |
+
and hasattr(finder, "find_spec")
|
| 206 |
+
):
|
| 207 |
+
break
|
| 208 |
+
else:
|
| 209 |
+
raise RuntimeError("Cannot find a PathFinder in sys.meta_path")
|
| 210 |
+
|
| 211 |
+
hook = cls(target_packages, finder)
|
| 212 |
+
sys.meta_path.insert(0, hook)
|
| 213 |
+
return ImportHookManager(hook)
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_memo.py
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import Any
|
| 4 |
+
|
| 5 |
+
from typeguard._config import TypeCheckConfiguration, global_config
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class TypeCheckMemo:
|
| 9 |
+
"""
|
| 10 |
+
Contains information necessary for type checkers to do their work.
|
| 11 |
+
|
| 12 |
+
.. attribute:: globals
|
| 13 |
+
:type: dict[str, Any]
|
| 14 |
+
|
| 15 |
+
Dictionary of global variables to use for resolving forward references.
|
| 16 |
+
|
| 17 |
+
.. attribute:: locals
|
| 18 |
+
:type: dict[str, Any]
|
| 19 |
+
|
| 20 |
+
Dictionary of local variables to use for resolving forward references.
|
| 21 |
+
|
| 22 |
+
.. attribute:: self_type
|
| 23 |
+
:type: type | None
|
| 24 |
+
|
| 25 |
+
When running type checks within an instance method or class method, this is the
|
| 26 |
+
class object that the first argument (usually named ``self`` or ``cls``) refers
|
| 27 |
+
to.
|
| 28 |
+
|
| 29 |
+
.. attribute:: config
|
| 30 |
+
:type: TypeCheckConfiguration
|
| 31 |
+
|
| 32 |
+
Contains the configuration for a particular set of type checking operations.
|
| 33 |
+
"""
|
| 34 |
+
|
| 35 |
+
__slots__ = "globals", "locals", "self_type", "config"
|
| 36 |
+
|
| 37 |
+
def __init__(
|
| 38 |
+
self,
|
| 39 |
+
globals: dict[str, Any],
|
| 40 |
+
locals: dict[str, Any],
|
| 41 |
+
*,
|
| 42 |
+
self_type: type | None = None,
|
| 43 |
+
config: TypeCheckConfiguration = global_config,
|
| 44 |
+
):
|
| 45 |
+
self.globals = globals
|
| 46 |
+
self.locals = locals
|
| 47 |
+
self.self_type = self_type
|
| 48 |
+
self.config = config
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_pytest_plugin.py
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import sys
|
| 4 |
+
import warnings
|
| 5 |
+
from typing import TYPE_CHECKING, Any, Literal
|
| 6 |
+
|
| 7 |
+
from typeguard._config import CollectionCheckStrategy, ForwardRefPolicy, global_config
|
| 8 |
+
from typeguard._exceptions import InstrumentationWarning
|
| 9 |
+
from typeguard._importhook import install_import_hook
|
| 10 |
+
from typeguard._utils import qualified_name, resolve_reference
|
| 11 |
+
|
| 12 |
+
if TYPE_CHECKING:
|
| 13 |
+
from pytest import Config, Parser
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
def pytest_addoption(parser: Parser) -> None:
|
| 17 |
+
def add_ini_option(
|
| 18 |
+
opt_type: (
|
| 19 |
+
Literal["string", "paths", "pathlist", "args", "linelist", "bool"] | None
|
| 20 |
+
),
|
| 21 |
+
) -> None:
|
| 22 |
+
parser.addini(
|
| 23 |
+
group.options[-1].names()[0][2:],
|
| 24 |
+
group.options[-1].attrs()["help"],
|
| 25 |
+
opt_type,
|
| 26 |
+
)
|
| 27 |
+
|
| 28 |
+
group = parser.getgroup("typeguard")
|
| 29 |
+
group.addoption(
|
| 30 |
+
"--typeguard-packages",
|
| 31 |
+
action="store",
|
| 32 |
+
help="comma separated name list of packages and modules to instrument for "
|
| 33 |
+
"type checking, or :all: to instrument all modules loaded after typeguard",
|
| 34 |
+
)
|
| 35 |
+
add_ini_option("linelist")
|
| 36 |
+
|
| 37 |
+
group.addoption(
|
| 38 |
+
"--typeguard-debug-instrumentation",
|
| 39 |
+
action="store_true",
|
| 40 |
+
help="print all instrumented code to stderr",
|
| 41 |
+
)
|
| 42 |
+
add_ini_option("bool")
|
| 43 |
+
|
| 44 |
+
group.addoption(
|
| 45 |
+
"--typeguard-typecheck-fail-callback",
|
| 46 |
+
action="store",
|
| 47 |
+
help=(
|
| 48 |
+
"a module:varname (e.g. typeguard:warn_on_error) reference to a function "
|
| 49 |
+
"that is called (with the exception, and memo object as arguments) to "
|
| 50 |
+
"handle a TypeCheckError"
|
| 51 |
+
),
|
| 52 |
+
)
|
| 53 |
+
add_ini_option("string")
|
| 54 |
+
|
| 55 |
+
group.addoption(
|
| 56 |
+
"--typeguard-forward-ref-policy",
|
| 57 |
+
action="store",
|
| 58 |
+
choices=list(ForwardRefPolicy.__members__),
|
| 59 |
+
help=(
|
| 60 |
+
"determines how to deal with unresolveable forward references in type "
|
| 61 |
+
"annotations"
|
| 62 |
+
),
|
| 63 |
+
)
|
| 64 |
+
add_ini_option("string")
|
| 65 |
+
|
| 66 |
+
group.addoption(
|
| 67 |
+
"--typeguard-collection-check-strategy",
|
| 68 |
+
action="store",
|
| 69 |
+
choices=list(CollectionCheckStrategy.__members__),
|
| 70 |
+
help="determines how thoroughly to check collections (list, dict, etc)",
|
| 71 |
+
)
|
| 72 |
+
add_ini_option("string")
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
def pytest_configure(config: Config) -> None:
|
| 76 |
+
def getoption(name: str) -> Any:
|
| 77 |
+
return config.getoption(name.replace("-", "_")) or config.getini(name)
|
| 78 |
+
|
| 79 |
+
packages: list[str] | None = []
|
| 80 |
+
if packages_option := config.getoption("typeguard_packages"):
|
| 81 |
+
packages = [pkg.strip() for pkg in packages_option.split(",")]
|
| 82 |
+
elif packages_ini := config.getini("typeguard-packages"):
|
| 83 |
+
packages = packages_ini
|
| 84 |
+
|
| 85 |
+
if packages:
|
| 86 |
+
if packages == [":all:"]:
|
| 87 |
+
packages = None
|
| 88 |
+
else:
|
| 89 |
+
already_imported_packages = sorted(
|
| 90 |
+
package for package in packages if package in sys.modules
|
| 91 |
+
)
|
| 92 |
+
if already_imported_packages:
|
| 93 |
+
warnings.warn(
|
| 94 |
+
f"typeguard cannot check these packages because they are already "
|
| 95 |
+
f"imported: {', '.join(already_imported_packages)}",
|
| 96 |
+
InstrumentationWarning,
|
| 97 |
+
stacklevel=1,
|
| 98 |
+
)
|
| 99 |
+
|
| 100 |
+
install_import_hook(packages=packages)
|
| 101 |
+
|
| 102 |
+
debug_option = getoption("typeguard-debug-instrumentation")
|
| 103 |
+
if debug_option:
|
| 104 |
+
global_config.debug_instrumentation = True
|
| 105 |
+
|
| 106 |
+
fail_callback_option = getoption("typeguard-typecheck-fail-callback")
|
| 107 |
+
if fail_callback_option:
|
| 108 |
+
callback = resolve_reference(fail_callback_option)
|
| 109 |
+
if not callable(callback):
|
| 110 |
+
raise TypeError(
|
| 111 |
+
f"{fail_callback_option} ({qualified_name(callback.__class__)}) is not "
|
| 112 |
+
f"a callable"
|
| 113 |
+
)
|
| 114 |
+
|
| 115 |
+
global_config.typecheck_fail_callback = callback
|
| 116 |
+
|
| 117 |
+
forward_ref_policy_option = getoption("typeguard-forward-ref-policy")
|
| 118 |
+
if forward_ref_policy_option:
|
| 119 |
+
forward_ref_policy = ForwardRefPolicy.__members__[forward_ref_policy_option]
|
| 120 |
+
global_config.forward_ref_policy = forward_ref_policy
|
| 121 |
+
|
| 122 |
+
collection_check_strategy_option = getoption("typeguard-collection-check-strategy")
|
| 123 |
+
if collection_check_strategy_option:
|
| 124 |
+
collection_check_strategy = CollectionCheckStrategy.__members__[
|
| 125 |
+
collection_check_strategy_option
|
| 126 |
+
]
|
| 127 |
+
global_config.collection_check_strategy = collection_check_strategy
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_suppression.py
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import sys
|
| 4 |
+
from collections.abc import Callable, Generator
|
| 5 |
+
from contextlib import contextmanager
|
| 6 |
+
from functools import update_wrapper
|
| 7 |
+
from threading import Lock
|
| 8 |
+
from typing import ContextManager, TypeVar, overload
|
| 9 |
+
|
| 10 |
+
if sys.version_info >= (3, 10):
|
| 11 |
+
from typing import ParamSpec
|
| 12 |
+
else:
|
| 13 |
+
from typing_extensions import ParamSpec
|
| 14 |
+
|
| 15 |
+
P = ParamSpec("P")
|
| 16 |
+
T = TypeVar("T")
|
| 17 |
+
|
| 18 |
+
type_checks_suppressed = 0
|
| 19 |
+
type_checks_suppress_lock = Lock()
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
@overload
|
| 23 |
+
def suppress_type_checks(func: Callable[P, T]) -> Callable[P, T]: ...
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
@overload
|
| 27 |
+
def suppress_type_checks() -> ContextManager[None]: ...
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
def suppress_type_checks(
|
| 31 |
+
func: Callable[P, T] | None = None,
|
| 32 |
+
) -> Callable[P, T] | ContextManager[None]:
|
| 33 |
+
"""
|
| 34 |
+
Temporarily suppress all type checking.
|
| 35 |
+
|
| 36 |
+
This function has two operating modes, based on how it's used:
|
| 37 |
+
|
| 38 |
+
#. as a context manager (``with suppress_type_checks(): ...``)
|
| 39 |
+
#. as a decorator (``@suppress_type_checks``)
|
| 40 |
+
|
| 41 |
+
When used as a context manager, :func:`check_type` and any automatically
|
| 42 |
+
instrumented functions skip the actual type checking. These context managers can be
|
| 43 |
+
nested.
|
| 44 |
+
|
| 45 |
+
When used as a decorator, all type checking is suppressed while the function is
|
| 46 |
+
running.
|
| 47 |
+
|
| 48 |
+
Type checking will resume once no more context managers are active and no decorated
|
| 49 |
+
functions are running.
|
| 50 |
+
|
| 51 |
+
Both operating modes are thread-safe.
|
| 52 |
+
|
| 53 |
+
"""
|
| 54 |
+
|
| 55 |
+
def wrapper(*args: P.args, **kwargs: P.kwargs) -> T:
|
| 56 |
+
global type_checks_suppressed
|
| 57 |
+
|
| 58 |
+
with type_checks_suppress_lock:
|
| 59 |
+
type_checks_suppressed += 1
|
| 60 |
+
|
| 61 |
+
assert func is not None
|
| 62 |
+
try:
|
| 63 |
+
return func(*args, **kwargs)
|
| 64 |
+
finally:
|
| 65 |
+
with type_checks_suppress_lock:
|
| 66 |
+
type_checks_suppressed -= 1
|
| 67 |
+
|
| 68 |
+
def cm() -> Generator[None, None, None]:
|
| 69 |
+
global type_checks_suppressed
|
| 70 |
+
|
| 71 |
+
with type_checks_suppress_lock:
|
| 72 |
+
type_checks_suppressed += 1
|
| 73 |
+
|
| 74 |
+
try:
|
| 75 |
+
yield
|
| 76 |
+
finally:
|
| 77 |
+
with type_checks_suppress_lock:
|
| 78 |
+
type_checks_suppressed -= 1
|
| 79 |
+
|
| 80 |
+
if func is None:
|
| 81 |
+
# Context manager mode
|
| 82 |
+
return contextmanager(cm)()
|
| 83 |
+
else:
|
| 84 |
+
# Decorator mode
|
| 85 |
+
update_wrapper(wrapper, func)
|
| 86 |
+
return wrapper
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_transformer.py
ADDED
|
@@ -0,0 +1,1229 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import ast
|
| 4 |
+
import builtins
|
| 5 |
+
import sys
|
| 6 |
+
import typing
|
| 7 |
+
from ast import (
|
| 8 |
+
AST,
|
| 9 |
+
Add,
|
| 10 |
+
AnnAssign,
|
| 11 |
+
Assign,
|
| 12 |
+
AsyncFunctionDef,
|
| 13 |
+
Attribute,
|
| 14 |
+
AugAssign,
|
| 15 |
+
BinOp,
|
| 16 |
+
BitAnd,
|
| 17 |
+
BitOr,
|
| 18 |
+
BitXor,
|
| 19 |
+
Call,
|
| 20 |
+
ClassDef,
|
| 21 |
+
Constant,
|
| 22 |
+
Dict,
|
| 23 |
+
Div,
|
| 24 |
+
Expr,
|
| 25 |
+
Expression,
|
| 26 |
+
FloorDiv,
|
| 27 |
+
FunctionDef,
|
| 28 |
+
If,
|
| 29 |
+
Import,
|
| 30 |
+
ImportFrom,
|
| 31 |
+
Index,
|
| 32 |
+
List,
|
| 33 |
+
Load,
|
| 34 |
+
LShift,
|
| 35 |
+
MatMult,
|
| 36 |
+
Mod,
|
| 37 |
+
Module,
|
| 38 |
+
Mult,
|
| 39 |
+
Name,
|
| 40 |
+
NamedExpr,
|
| 41 |
+
NodeTransformer,
|
| 42 |
+
NodeVisitor,
|
| 43 |
+
Pass,
|
| 44 |
+
Pow,
|
| 45 |
+
Return,
|
| 46 |
+
RShift,
|
| 47 |
+
Starred,
|
| 48 |
+
Store,
|
| 49 |
+
Sub,
|
| 50 |
+
Subscript,
|
| 51 |
+
Tuple,
|
| 52 |
+
Yield,
|
| 53 |
+
YieldFrom,
|
| 54 |
+
alias,
|
| 55 |
+
copy_location,
|
| 56 |
+
expr,
|
| 57 |
+
fix_missing_locations,
|
| 58 |
+
keyword,
|
| 59 |
+
walk,
|
| 60 |
+
)
|
| 61 |
+
from collections import defaultdict
|
| 62 |
+
from collections.abc import Generator, Sequence
|
| 63 |
+
from contextlib import contextmanager
|
| 64 |
+
from copy import deepcopy
|
| 65 |
+
from dataclasses import dataclass, field
|
| 66 |
+
from typing import Any, ClassVar, cast, overload
|
| 67 |
+
|
| 68 |
+
generator_names = (
|
| 69 |
+
"typing.Generator",
|
| 70 |
+
"collections.abc.Generator",
|
| 71 |
+
"typing.Iterator",
|
| 72 |
+
"collections.abc.Iterator",
|
| 73 |
+
"typing.Iterable",
|
| 74 |
+
"collections.abc.Iterable",
|
| 75 |
+
"typing.AsyncIterator",
|
| 76 |
+
"collections.abc.AsyncIterator",
|
| 77 |
+
"typing.AsyncIterable",
|
| 78 |
+
"collections.abc.AsyncIterable",
|
| 79 |
+
"typing.AsyncGenerator",
|
| 80 |
+
"collections.abc.AsyncGenerator",
|
| 81 |
+
)
|
| 82 |
+
anytype_names = (
|
| 83 |
+
"typing.Any",
|
| 84 |
+
"typing_extensions.Any",
|
| 85 |
+
)
|
| 86 |
+
literal_names = (
|
| 87 |
+
"typing.Literal",
|
| 88 |
+
"typing_extensions.Literal",
|
| 89 |
+
)
|
| 90 |
+
annotated_names = (
|
| 91 |
+
"typing.Annotated",
|
| 92 |
+
"typing_extensions.Annotated",
|
| 93 |
+
)
|
| 94 |
+
ignore_decorators = (
|
| 95 |
+
"typing.no_type_check",
|
| 96 |
+
"typeguard.typeguard_ignore",
|
| 97 |
+
)
|
| 98 |
+
aug_assign_functions = {
|
| 99 |
+
Add: "iadd",
|
| 100 |
+
Sub: "isub",
|
| 101 |
+
Mult: "imul",
|
| 102 |
+
MatMult: "imatmul",
|
| 103 |
+
Div: "itruediv",
|
| 104 |
+
FloorDiv: "ifloordiv",
|
| 105 |
+
Mod: "imod",
|
| 106 |
+
Pow: "ipow",
|
| 107 |
+
LShift: "ilshift",
|
| 108 |
+
RShift: "irshift",
|
| 109 |
+
BitAnd: "iand",
|
| 110 |
+
BitXor: "ixor",
|
| 111 |
+
BitOr: "ior",
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
@dataclass
|
| 116 |
+
class TransformMemo:
|
| 117 |
+
node: Module | ClassDef | FunctionDef | AsyncFunctionDef | None
|
| 118 |
+
parent: TransformMemo | None
|
| 119 |
+
path: tuple[str, ...]
|
| 120 |
+
joined_path: Constant = field(init=False)
|
| 121 |
+
return_annotation: expr | None = None
|
| 122 |
+
yield_annotation: expr | None = None
|
| 123 |
+
send_annotation: expr | None = None
|
| 124 |
+
is_async: bool = False
|
| 125 |
+
local_names: set[str] = field(init=False, default_factory=set)
|
| 126 |
+
imported_names: dict[str, str] = field(init=False, default_factory=dict)
|
| 127 |
+
ignored_names: set[str] = field(init=False, default_factory=set)
|
| 128 |
+
load_names: defaultdict[str, dict[str, Name]] = field(
|
| 129 |
+
init=False, default_factory=lambda: defaultdict(dict)
|
| 130 |
+
)
|
| 131 |
+
has_yield_expressions: bool = field(init=False, default=False)
|
| 132 |
+
has_return_expressions: bool = field(init=False, default=False)
|
| 133 |
+
memo_var_name: Name | None = field(init=False, default=None)
|
| 134 |
+
should_instrument: bool = field(init=False, default=True)
|
| 135 |
+
variable_annotations: dict[str, expr] = field(init=False, default_factory=dict)
|
| 136 |
+
configuration_overrides: dict[str, Any] = field(init=False, default_factory=dict)
|
| 137 |
+
code_inject_index: int = field(init=False, default=0)
|
| 138 |
+
|
| 139 |
+
def __post_init__(self) -> None:
|
| 140 |
+
elements: list[str] = []
|
| 141 |
+
memo = self
|
| 142 |
+
while isinstance(memo.node, (ClassDef, FunctionDef, AsyncFunctionDef)):
|
| 143 |
+
elements.insert(0, memo.node.name)
|
| 144 |
+
if not memo.parent:
|
| 145 |
+
break
|
| 146 |
+
|
| 147 |
+
memo = memo.parent
|
| 148 |
+
if isinstance(memo.node, (FunctionDef, AsyncFunctionDef)):
|
| 149 |
+
elements.insert(0, "<locals>")
|
| 150 |
+
|
| 151 |
+
self.joined_path = Constant(".".join(elements))
|
| 152 |
+
|
| 153 |
+
# Figure out where to insert instrumentation code
|
| 154 |
+
if self.node:
|
| 155 |
+
for index, child in enumerate(self.node.body):
|
| 156 |
+
if isinstance(child, ImportFrom) and child.module == "__future__":
|
| 157 |
+
# (module only) __future__ imports must come first
|
| 158 |
+
continue
|
| 159 |
+
elif (
|
| 160 |
+
isinstance(child, Expr)
|
| 161 |
+
and isinstance(child.value, Constant)
|
| 162 |
+
and isinstance(child.value.value, str)
|
| 163 |
+
):
|
| 164 |
+
continue # docstring
|
| 165 |
+
|
| 166 |
+
self.code_inject_index = index
|
| 167 |
+
break
|
| 168 |
+
|
| 169 |
+
def get_unused_name(self, name: str) -> str:
|
| 170 |
+
memo: TransformMemo | None = self
|
| 171 |
+
while memo is not None:
|
| 172 |
+
if name in memo.local_names:
|
| 173 |
+
memo = self
|
| 174 |
+
name += "_"
|
| 175 |
+
else:
|
| 176 |
+
memo = memo.parent
|
| 177 |
+
|
| 178 |
+
self.local_names.add(name)
|
| 179 |
+
return name
|
| 180 |
+
|
| 181 |
+
def is_ignored_name(self, expression: expr | Expr | None) -> bool:
|
| 182 |
+
top_expression = (
|
| 183 |
+
expression.value if isinstance(expression, Expr) else expression
|
| 184 |
+
)
|
| 185 |
+
|
| 186 |
+
if isinstance(top_expression, Attribute) and isinstance(
|
| 187 |
+
top_expression.value, Name
|
| 188 |
+
):
|
| 189 |
+
name = top_expression.value.id
|
| 190 |
+
elif isinstance(top_expression, Name):
|
| 191 |
+
name = top_expression.id
|
| 192 |
+
else:
|
| 193 |
+
return False
|
| 194 |
+
|
| 195 |
+
memo: TransformMemo | None = self
|
| 196 |
+
while memo is not None:
|
| 197 |
+
if name in memo.ignored_names:
|
| 198 |
+
return True
|
| 199 |
+
|
| 200 |
+
memo = memo.parent
|
| 201 |
+
|
| 202 |
+
return False
|
| 203 |
+
|
| 204 |
+
def get_memo_name(self) -> Name:
|
| 205 |
+
if not self.memo_var_name:
|
| 206 |
+
self.memo_var_name = Name(id="memo", ctx=Load())
|
| 207 |
+
|
| 208 |
+
return self.memo_var_name
|
| 209 |
+
|
| 210 |
+
def get_import(self, module: str, name: str) -> Name:
|
| 211 |
+
if module in self.load_names and name in self.load_names[module]:
|
| 212 |
+
return self.load_names[module][name]
|
| 213 |
+
|
| 214 |
+
qualified_name = f"{module}.{name}"
|
| 215 |
+
if name in self.imported_names and self.imported_names[name] == qualified_name:
|
| 216 |
+
return Name(id=name, ctx=Load())
|
| 217 |
+
|
| 218 |
+
alias = self.get_unused_name(name)
|
| 219 |
+
node = self.load_names[module][name] = Name(id=alias, ctx=Load())
|
| 220 |
+
self.imported_names[name] = qualified_name
|
| 221 |
+
return node
|
| 222 |
+
|
| 223 |
+
def insert_imports(self, node: Module | FunctionDef | AsyncFunctionDef) -> None:
|
| 224 |
+
"""Insert imports needed by injected code."""
|
| 225 |
+
if not self.load_names:
|
| 226 |
+
return
|
| 227 |
+
|
| 228 |
+
# Insert imports after any "from __future__ ..." imports and any docstring
|
| 229 |
+
for modulename, names in self.load_names.items():
|
| 230 |
+
aliases = [
|
| 231 |
+
alias(orig_name, new_name.id if orig_name != new_name.id else None)
|
| 232 |
+
for orig_name, new_name in sorted(names.items())
|
| 233 |
+
]
|
| 234 |
+
node.body.insert(self.code_inject_index, ImportFrom(modulename, aliases, 0))
|
| 235 |
+
|
| 236 |
+
def name_matches(self, expression: expr | Expr | None, *names: str) -> bool:
|
| 237 |
+
if expression is None:
|
| 238 |
+
return False
|
| 239 |
+
|
| 240 |
+
path: list[str] = []
|
| 241 |
+
top_expression = (
|
| 242 |
+
expression.value if isinstance(expression, Expr) else expression
|
| 243 |
+
)
|
| 244 |
+
|
| 245 |
+
if isinstance(top_expression, Subscript):
|
| 246 |
+
top_expression = top_expression.value
|
| 247 |
+
elif isinstance(top_expression, Call):
|
| 248 |
+
top_expression = top_expression.func
|
| 249 |
+
|
| 250 |
+
while isinstance(top_expression, Attribute):
|
| 251 |
+
path.insert(0, top_expression.attr)
|
| 252 |
+
top_expression = top_expression.value
|
| 253 |
+
|
| 254 |
+
if not isinstance(top_expression, Name):
|
| 255 |
+
return False
|
| 256 |
+
|
| 257 |
+
if top_expression.id in self.imported_names:
|
| 258 |
+
translated = self.imported_names[top_expression.id]
|
| 259 |
+
elif hasattr(builtins, top_expression.id):
|
| 260 |
+
translated = "builtins." + top_expression.id
|
| 261 |
+
else:
|
| 262 |
+
translated = top_expression.id
|
| 263 |
+
|
| 264 |
+
path.insert(0, translated)
|
| 265 |
+
joined_path = ".".join(path)
|
| 266 |
+
if joined_path in names:
|
| 267 |
+
return True
|
| 268 |
+
elif self.parent:
|
| 269 |
+
return self.parent.name_matches(expression, *names)
|
| 270 |
+
else:
|
| 271 |
+
return False
|
| 272 |
+
|
| 273 |
+
def get_config_keywords(self) -> list[keyword]:
|
| 274 |
+
if self.parent and isinstance(self.parent.node, ClassDef):
|
| 275 |
+
overrides = self.parent.configuration_overrides.copy()
|
| 276 |
+
else:
|
| 277 |
+
overrides = {}
|
| 278 |
+
|
| 279 |
+
overrides.update(self.configuration_overrides)
|
| 280 |
+
return [keyword(key, value) for key, value in overrides.items()]
|
| 281 |
+
|
| 282 |
+
|
| 283 |
+
class NameCollector(NodeVisitor):
|
| 284 |
+
def __init__(self) -> None:
|
| 285 |
+
self.names: set[str] = set()
|
| 286 |
+
|
| 287 |
+
def visit_Import(self, node: Import) -> None:
|
| 288 |
+
for name in node.names:
|
| 289 |
+
self.names.add(name.asname or name.name)
|
| 290 |
+
|
| 291 |
+
def visit_ImportFrom(self, node: ImportFrom) -> None:
|
| 292 |
+
for name in node.names:
|
| 293 |
+
self.names.add(name.asname or name.name)
|
| 294 |
+
|
| 295 |
+
def visit_Assign(self, node: Assign) -> None:
|
| 296 |
+
for target in node.targets:
|
| 297 |
+
if isinstance(target, Name):
|
| 298 |
+
self.names.add(target.id)
|
| 299 |
+
|
| 300 |
+
def visit_NamedExpr(self, node: NamedExpr) -> Any:
|
| 301 |
+
if isinstance(node.target, Name):
|
| 302 |
+
self.names.add(node.target.id)
|
| 303 |
+
|
| 304 |
+
def visit_FunctionDef(self, node: FunctionDef) -> None:
|
| 305 |
+
pass
|
| 306 |
+
|
| 307 |
+
def visit_ClassDef(self, node: ClassDef) -> None:
|
| 308 |
+
pass
|
| 309 |
+
|
| 310 |
+
|
| 311 |
+
class GeneratorDetector(NodeVisitor):
|
| 312 |
+
"""Detects if a function node is a generator function."""
|
| 313 |
+
|
| 314 |
+
contains_yields: bool = False
|
| 315 |
+
in_root_function: bool = False
|
| 316 |
+
|
| 317 |
+
def visit_Yield(self, node: Yield) -> Any:
|
| 318 |
+
self.contains_yields = True
|
| 319 |
+
|
| 320 |
+
def visit_YieldFrom(self, node: YieldFrom) -> Any:
|
| 321 |
+
self.contains_yields = True
|
| 322 |
+
|
| 323 |
+
def visit_ClassDef(self, node: ClassDef) -> Any:
|
| 324 |
+
pass
|
| 325 |
+
|
| 326 |
+
def visit_FunctionDef(self, node: FunctionDef | AsyncFunctionDef) -> Any:
|
| 327 |
+
if not self.in_root_function:
|
| 328 |
+
self.in_root_function = True
|
| 329 |
+
self.generic_visit(node)
|
| 330 |
+
self.in_root_function = False
|
| 331 |
+
|
| 332 |
+
def visit_AsyncFunctionDef(self, node: AsyncFunctionDef) -> Any:
|
| 333 |
+
self.visit_FunctionDef(node)
|
| 334 |
+
|
| 335 |
+
|
| 336 |
+
class AnnotationTransformer(NodeTransformer):
|
| 337 |
+
type_substitutions: ClassVar[dict[str, tuple[str, str]]] = {
|
| 338 |
+
"builtins.dict": ("typing", "Dict"),
|
| 339 |
+
"builtins.list": ("typing", "List"),
|
| 340 |
+
"builtins.tuple": ("typing", "Tuple"),
|
| 341 |
+
"builtins.set": ("typing", "Set"),
|
| 342 |
+
"builtins.frozenset": ("typing", "FrozenSet"),
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
def __init__(self, transformer: TypeguardTransformer):
|
| 346 |
+
self.transformer = transformer
|
| 347 |
+
self._memo = transformer._memo
|
| 348 |
+
self._level = 0
|
| 349 |
+
|
| 350 |
+
def visit(self, node: AST) -> Any:
|
| 351 |
+
# Don't process Literals
|
| 352 |
+
if isinstance(node, expr) and self._memo.name_matches(node, *literal_names):
|
| 353 |
+
return node
|
| 354 |
+
|
| 355 |
+
self._level += 1
|
| 356 |
+
new_node = super().visit(node)
|
| 357 |
+
self._level -= 1
|
| 358 |
+
|
| 359 |
+
if isinstance(new_node, Expression) and not hasattr(new_node, "body"):
|
| 360 |
+
return None
|
| 361 |
+
|
| 362 |
+
# Return None if this new node matches a variation of typing.Any
|
| 363 |
+
if (
|
| 364 |
+
self._level == 0
|
| 365 |
+
and isinstance(new_node, expr)
|
| 366 |
+
and self._memo.name_matches(new_node, *anytype_names)
|
| 367 |
+
):
|
| 368 |
+
return None
|
| 369 |
+
|
| 370 |
+
return new_node
|
| 371 |
+
|
| 372 |
+
def visit_BinOp(self, node: BinOp) -> Any:
|
| 373 |
+
self.generic_visit(node)
|
| 374 |
+
|
| 375 |
+
if isinstance(node.op, BitOr):
|
| 376 |
+
# If either branch of the BinOp has been transformed to `None`, it means
|
| 377 |
+
# that a type in the union was ignored, so the entire annotation should e
|
| 378 |
+
# ignored
|
| 379 |
+
if not hasattr(node, "left") or not hasattr(node, "right"):
|
| 380 |
+
return None
|
| 381 |
+
|
| 382 |
+
# Return Any if either side is Any
|
| 383 |
+
if self._memo.name_matches(node.left, *anytype_names):
|
| 384 |
+
return node.left
|
| 385 |
+
elif self._memo.name_matches(node.right, *anytype_names):
|
| 386 |
+
return node.right
|
| 387 |
+
|
| 388 |
+
if sys.version_info < (3, 10):
|
| 389 |
+
union_name = self.transformer._get_import("typing", "Union")
|
| 390 |
+
return Subscript(
|
| 391 |
+
value=union_name,
|
| 392 |
+
slice=Index(
|
| 393 |
+
Tuple(elts=[node.left, node.right], ctx=Load()), ctx=Load()
|
| 394 |
+
),
|
| 395 |
+
ctx=Load(),
|
| 396 |
+
)
|
| 397 |
+
|
| 398 |
+
return node
|
| 399 |
+
|
| 400 |
+
def visit_Attribute(self, node: Attribute) -> Any:
|
| 401 |
+
if self._memo.is_ignored_name(node):
|
| 402 |
+
return None
|
| 403 |
+
|
| 404 |
+
return node
|
| 405 |
+
|
| 406 |
+
def visit_Subscript(self, node: Subscript) -> Any:
|
| 407 |
+
if self._memo.is_ignored_name(node.value):
|
| 408 |
+
return None
|
| 409 |
+
|
| 410 |
+
# The subscript of typing(_extensions).Literal can be any arbitrary string, so
|
| 411 |
+
# don't try to evaluate it as code
|
| 412 |
+
if node.slice:
|
| 413 |
+
if isinstance(node.slice, Index):
|
| 414 |
+
# Python 3.8
|
| 415 |
+
slice_value = node.slice.value # type: ignore[attr-defined]
|
| 416 |
+
else:
|
| 417 |
+
slice_value = node.slice
|
| 418 |
+
|
| 419 |
+
if isinstance(slice_value, Tuple):
|
| 420 |
+
if self._memo.name_matches(node.value, *annotated_names):
|
| 421 |
+
# Only treat the first argument to typing.Annotated as a potential
|
| 422 |
+
# forward reference
|
| 423 |
+
items = cast(
|
| 424 |
+
typing.List[expr],
|
| 425 |
+
[self.visit(slice_value.elts[0])] + slice_value.elts[1:],
|
| 426 |
+
)
|
| 427 |
+
else:
|
| 428 |
+
items = cast(
|
| 429 |
+
typing.List[expr],
|
| 430 |
+
[self.visit(item) for item in slice_value.elts],
|
| 431 |
+
)
|
| 432 |
+
|
| 433 |
+
# If this is a Union and any of the items is Any, erase the entire
|
| 434 |
+
# annotation
|
| 435 |
+
if self._memo.name_matches(node.value, "typing.Union") and any(
|
| 436 |
+
item is None
|
| 437 |
+
or (
|
| 438 |
+
isinstance(item, expr)
|
| 439 |
+
and self._memo.name_matches(item, *anytype_names)
|
| 440 |
+
)
|
| 441 |
+
for item in items
|
| 442 |
+
):
|
| 443 |
+
return None
|
| 444 |
+
|
| 445 |
+
# If all items in the subscript were Any, erase the subscript entirely
|
| 446 |
+
if all(item is None for item in items):
|
| 447 |
+
return node.value
|
| 448 |
+
|
| 449 |
+
for index, item in enumerate(items):
|
| 450 |
+
if item is None:
|
| 451 |
+
items[index] = self.transformer._get_import("typing", "Any")
|
| 452 |
+
|
| 453 |
+
slice_value.elts = items
|
| 454 |
+
else:
|
| 455 |
+
self.generic_visit(node)
|
| 456 |
+
|
| 457 |
+
# If the transformer erased the slice entirely, just return the node
|
| 458 |
+
# value without the subscript (unless it's Optional, in which case erase
|
| 459 |
+
# the node entirely
|
| 460 |
+
if self._memo.name_matches(
|
| 461 |
+
node.value, "typing.Optional"
|
| 462 |
+
) and not hasattr(node, "slice"):
|
| 463 |
+
return None
|
| 464 |
+
if sys.version_info >= (3, 9) and not hasattr(node, "slice"):
|
| 465 |
+
return node.value
|
| 466 |
+
elif sys.version_info < (3, 9) and not hasattr(node.slice, "value"):
|
| 467 |
+
return node.value
|
| 468 |
+
|
| 469 |
+
return node
|
| 470 |
+
|
| 471 |
+
def visit_Name(self, node: Name) -> Any:
|
| 472 |
+
if self._memo.is_ignored_name(node):
|
| 473 |
+
return None
|
| 474 |
+
|
| 475 |
+
if sys.version_info < (3, 9):
|
| 476 |
+
for typename, substitute in self.type_substitutions.items():
|
| 477 |
+
if self._memo.name_matches(node, typename):
|
| 478 |
+
new_node = self.transformer._get_import(*substitute)
|
| 479 |
+
return copy_location(new_node, node)
|
| 480 |
+
|
| 481 |
+
return node
|
| 482 |
+
|
| 483 |
+
def visit_Call(self, node: Call) -> Any:
|
| 484 |
+
# Don't recurse into calls
|
| 485 |
+
return node
|
| 486 |
+
|
| 487 |
+
def visit_Constant(self, node: Constant) -> Any:
|
| 488 |
+
if isinstance(node.value, str):
|
| 489 |
+
expression = ast.parse(node.value, mode="eval")
|
| 490 |
+
new_node = self.visit(expression)
|
| 491 |
+
if new_node:
|
| 492 |
+
return copy_location(new_node.body, node)
|
| 493 |
+
else:
|
| 494 |
+
return None
|
| 495 |
+
|
| 496 |
+
return node
|
| 497 |
+
|
| 498 |
+
|
| 499 |
+
class TypeguardTransformer(NodeTransformer):
|
| 500 |
+
def __init__(
|
| 501 |
+
self, target_path: Sequence[str] | None = None, target_lineno: int | None = None
|
| 502 |
+
) -> None:
|
| 503 |
+
self._target_path = tuple(target_path) if target_path else None
|
| 504 |
+
self._memo = self._module_memo = TransformMemo(None, None, ())
|
| 505 |
+
self.names_used_in_annotations: set[str] = set()
|
| 506 |
+
self.target_node: FunctionDef | AsyncFunctionDef | None = None
|
| 507 |
+
self.target_lineno = target_lineno
|
| 508 |
+
|
| 509 |
+
def generic_visit(self, node: AST) -> AST:
|
| 510 |
+
has_non_empty_body_initially = bool(getattr(node, "body", None))
|
| 511 |
+
initial_type = type(node)
|
| 512 |
+
|
| 513 |
+
node = super().generic_visit(node)
|
| 514 |
+
|
| 515 |
+
if (
|
| 516 |
+
type(node) is initial_type
|
| 517 |
+
and has_non_empty_body_initially
|
| 518 |
+
and hasattr(node, "body")
|
| 519 |
+
and not node.body
|
| 520 |
+
):
|
| 521 |
+
# If we have still the same node type after transformation
|
| 522 |
+
# but we've optimised it's body away, we add a `pass` statement.
|
| 523 |
+
node.body = [Pass()]
|
| 524 |
+
|
| 525 |
+
return node
|
| 526 |
+
|
| 527 |
+
@contextmanager
|
| 528 |
+
def _use_memo(
|
| 529 |
+
self, node: ClassDef | FunctionDef | AsyncFunctionDef
|
| 530 |
+
) -> Generator[None, Any, None]:
|
| 531 |
+
new_memo = TransformMemo(node, self._memo, self._memo.path + (node.name,))
|
| 532 |
+
old_memo = self._memo
|
| 533 |
+
self._memo = new_memo
|
| 534 |
+
|
| 535 |
+
if isinstance(node, (FunctionDef, AsyncFunctionDef)):
|
| 536 |
+
new_memo.should_instrument = (
|
| 537 |
+
self._target_path is None or new_memo.path == self._target_path
|
| 538 |
+
)
|
| 539 |
+
if new_memo.should_instrument:
|
| 540 |
+
# Check if the function is a generator function
|
| 541 |
+
detector = GeneratorDetector()
|
| 542 |
+
detector.visit(node)
|
| 543 |
+
|
| 544 |
+
# Extract yield, send and return types where possible from a subscripted
|
| 545 |
+
# annotation like Generator[int, str, bool]
|
| 546 |
+
return_annotation = deepcopy(node.returns)
|
| 547 |
+
if detector.contains_yields and new_memo.name_matches(
|
| 548 |
+
return_annotation, *generator_names
|
| 549 |
+
):
|
| 550 |
+
if isinstance(return_annotation, Subscript):
|
| 551 |
+
annotation_slice = return_annotation.slice
|
| 552 |
+
|
| 553 |
+
# Python < 3.9
|
| 554 |
+
if isinstance(annotation_slice, Index):
|
| 555 |
+
annotation_slice = (
|
| 556 |
+
annotation_slice.value # type: ignore[attr-defined]
|
| 557 |
+
)
|
| 558 |
+
|
| 559 |
+
if isinstance(annotation_slice, Tuple):
|
| 560 |
+
items = annotation_slice.elts
|
| 561 |
+
else:
|
| 562 |
+
items = [annotation_slice]
|
| 563 |
+
|
| 564 |
+
if len(items) > 0:
|
| 565 |
+
new_memo.yield_annotation = self._convert_annotation(
|
| 566 |
+
items[0]
|
| 567 |
+
)
|
| 568 |
+
|
| 569 |
+
if len(items) > 1:
|
| 570 |
+
new_memo.send_annotation = self._convert_annotation(
|
| 571 |
+
items[1]
|
| 572 |
+
)
|
| 573 |
+
|
| 574 |
+
if len(items) > 2:
|
| 575 |
+
new_memo.return_annotation = self._convert_annotation(
|
| 576 |
+
items[2]
|
| 577 |
+
)
|
| 578 |
+
else:
|
| 579 |
+
new_memo.return_annotation = self._convert_annotation(
|
| 580 |
+
return_annotation
|
| 581 |
+
)
|
| 582 |
+
|
| 583 |
+
if isinstance(node, AsyncFunctionDef):
|
| 584 |
+
new_memo.is_async = True
|
| 585 |
+
|
| 586 |
+
yield
|
| 587 |
+
self._memo = old_memo
|
| 588 |
+
|
| 589 |
+
def _get_import(self, module: str, name: str) -> Name:
|
| 590 |
+
memo = self._memo if self._target_path else self._module_memo
|
| 591 |
+
return memo.get_import(module, name)
|
| 592 |
+
|
| 593 |
+
@overload
|
| 594 |
+
def _convert_annotation(self, annotation: None) -> None: ...
|
| 595 |
+
|
| 596 |
+
@overload
|
| 597 |
+
def _convert_annotation(self, annotation: expr) -> expr: ...
|
| 598 |
+
|
| 599 |
+
def _convert_annotation(self, annotation: expr | None) -> expr | None:
|
| 600 |
+
if annotation is None:
|
| 601 |
+
return None
|
| 602 |
+
|
| 603 |
+
# Convert PEP 604 unions (x | y) and generic built-in collections where
|
| 604 |
+
# necessary, and undo forward references
|
| 605 |
+
new_annotation = cast(expr, AnnotationTransformer(self).visit(annotation))
|
| 606 |
+
if isinstance(new_annotation, expr):
|
| 607 |
+
new_annotation = ast.copy_location(new_annotation, annotation)
|
| 608 |
+
|
| 609 |
+
# Store names used in the annotation
|
| 610 |
+
names = {node.id for node in walk(new_annotation) if isinstance(node, Name)}
|
| 611 |
+
self.names_used_in_annotations.update(names)
|
| 612 |
+
|
| 613 |
+
return new_annotation
|
| 614 |
+
|
| 615 |
+
def visit_Name(self, node: Name) -> Name:
|
| 616 |
+
self._memo.local_names.add(node.id)
|
| 617 |
+
return node
|
| 618 |
+
|
| 619 |
+
def visit_Module(self, node: Module) -> Module:
|
| 620 |
+
self._module_memo = self._memo = TransformMemo(node, None, ())
|
| 621 |
+
self.generic_visit(node)
|
| 622 |
+
self._module_memo.insert_imports(node)
|
| 623 |
+
|
| 624 |
+
fix_missing_locations(node)
|
| 625 |
+
return node
|
| 626 |
+
|
| 627 |
+
def visit_Import(self, node: Import) -> Import:
|
| 628 |
+
for name in node.names:
|
| 629 |
+
self._memo.local_names.add(name.asname or name.name)
|
| 630 |
+
self._memo.imported_names[name.asname or name.name] = name.name
|
| 631 |
+
|
| 632 |
+
return node
|
| 633 |
+
|
| 634 |
+
def visit_ImportFrom(self, node: ImportFrom) -> ImportFrom:
|
| 635 |
+
for name in node.names:
|
| 636 |
+
if name.name != "*":
|
| 637 |
+
alias = name.asname or name.name
|
| 638 |
+
self._memo.local_names.add(alias)
|
| 639 |
+
self._memo.imported_names[alias] = f"{node.module}.{name.name}"
|
| 640 |
+
|
| 641 |
+
return node
|
| 642 |
+
|
| 643 |
+
def visit_ClassDef(self, node: ClassDef) -> ClassDef | None:
|
| 644 |
+
self._memo.local_names.add(node.name)
|
| 645 |
+
|
| 646 |
+
# Eliminate top level classes not belonging to the target path
|
| 647 |
+
if (
|
| 648 |
+
self._target_path is not None
|
| 649 |
+
and not self._memo.path
|
| 650 |
+
and node.name != self._target_path[0]
|
| 651 |
+
):
|
| 652 |
+
return None
|
| 653 |
+
|
| 654 |
+
with self._use_memo(node):
|
| 655 |
+
for decorator in node.decorator_list.copy():
|
| 656 |
+
if self._memo.name_matches(decorator, "typeguard.typechecked"):
|
| 657 |
+
# Remove the decorator to prevent duplicate instrumentation
|
| 658 |
+
node.decorator_list.remove(decorator)
|
| 659 |
+
|
| 660 |
+
# Store any configuration overrides
|
| 661 |
+
if isinstance(decorator, Call) and decorator.keywords:
|
| 662 |
+
self._memo.configuration_overrides.update(
|
| 663 |
+
{kw.arg: kw.value for kw in decorator.keywords if kw.arg}
|
| 664 |
+
)
|
| 665 |
+
|
| 666 |
+
self.generic_visit(node)
|
| 667 |
+
return node
|
| 668 |
+
|
| 669 |
+
def visit_FunctionDef(
|
| 670 |
+
self, node: FunctionDef | AsyncFunctionDef
|
| 671 |
+
) -> FunctionDef | AsyncFunctionDef | None:
|
| 672 |
+
"""
|
| 673 |
+
Injects type checks for function arguments, and for a return of None if the
|
| 674 |
+
function is annotated to return something else than Any or None, and the body
|
| 675 |
+
ends without an explicit "return".
|
| 676 |
+
|
| 677 |
+
"""
|
| 678 |
+
self._memo.local_names.add(node.name)
|
| 679 |
+
|
| 680 |
+
# Eliminate top level functions not belonging to the target path
|
| 681 |
+
if (
|
| 682 |
+
self._target_path is not None
|
| 683 |
+
and not self._memo.path
|
| 684 |
+
and node.name != self._target_path[0]
|
| 685 |
+
):
|
| 686 |
+
return None
|
| 687 |
+
|
| 688 |
+
# Skip instrumentation if we're instrumenting the whole module and the function
|
| 689 |
+
# contains either @no_type_check or @typeguard_ignore
|
| 690 |
+
if self._target_path is None:
|
| 691 |
+
for decorator in node.decorator_list:
|
| 692 |
+
if self._memo.name_matches(decorator, *ignore_decorators):
|
| 693 |
+
return node
|
| 694 |
+
|
| 695 |
+
with self._use_memo(node):
|
| 696 |
+
arg_annotations: dict[str, Any] = {}
|
| 697 |
+
if self._target_path is None or self._memo.path == self._target_path:
|
| 698 |
+
# Find line number we're supposed to match against
|
| 699 |
+
if node.decorator_list:
|
| 700 |
+
first_lineno = node.decorator_list[0].lineno
|
| 701 |
+
else:
|
| 702 |
+
first_lineno = node.lineno
|
| 703 |
+
|
| 704 |
+
for decorator in node.decorator_list.copy():
|
| 705 |
+
if self._memo.name_matches(decorator, "typing.overload"):
|
| 706 |
+
# Remove overloads entirely
|
| 707 |
+
return None
|
| 708 |
+
elif self._memo.name_matches(decorator, "typeguard.typechecked"):
|
| 709 |
+
# Remove the decorator to prevent duplicate instrumentation
|
| 710 |
+
node.decorator_list.remove(decorator)
|
| 711 |
+
|
| 712 |
+
# Store any configuration overrides
|
| 713 |
+
if isinstance(decorator, Call) and decorator.keywords:
|
| 714 |
+
self._memo.configuration_overrides = {
|
| 715 |
+
kw.arg: kw.value for kw in decorator.keywords if kw.arg
|
| 716 |
+
}
|
| 717 |
+
|
| 718 |
+
if self.target_lineno == first_lineno:
|
| 719 |
+
assert self.target_node is None
|
| 720 |
+
self.target_node = node
|
| 721 |
+
if node.decorator_list:
|
| 722 |
+
self.target_lineno = node.decorator_list[0].lineno
|
| 723 |
+
else:
|
| 724 |
+
self.target_lineno = node.lineno
|
| 725 |
+
|
| 726 |
+
all_args = node.args.args + node.args.kwonlyargs + node.args.posonlyargs
|
| 727 |
+
|
| 728 |
+
# Ensure that any type shadowed by the positional or keyword-only
|
| 729 |
+
# argument names are ignored in this function
|
| 730 |
+
for arg in all_args:
|
| 731 |
+
self._memo.ignored_names.add(arg.arg)
|
| 732 |
+
|
| 733 |
+
# Ensure that any type shadowed by the variable positional argument name
|
| 734 |
+
# (e.g. "args" in *args) is ignored this function
|
| 735 |
+
if node.args.vararg:
|
| 736 |
+
self._memo.ignored_names.add(node.args.vararg.arg)
|
| 737 |
+
|
| 738 |
+
# Ensure that any type shadowed by the variable keywrod argument name
|
| 739 |
+
# (e.g. "kwargs" in *kwargs) is ignored this function
|
| 740 |
+
if node.args.kwarg:
|
| 741 |
+
self._memo.ignored_names.add(node.args.kwarg.arg)
|
| 742 |
+
|
| 743 |
+
for arg in all_args:
|
| 744 |
+
annotation = self._convert_annotation(deepcopy(arg.annotation))
|
| 745 |
+
if annotation:
|
| 746 |
+
arg_annotations[arg.arg] = annotation
|
| 747 |
+
|
| 748 |
+
if node.args.vararg:
|
| 749 |
+
annotation_ = self._convert_annotation(node.args.vararg.annotation)
|
| 750 |
+
if annotation_:
|
| 751 |
+
if sys.version_info >= (3, 9):
|
| 752 |
+
container = Name("tuple", ctx=Load())
|
| 753 |
+
else:
|
| 754 |
+
container = self._get_import("typing", "Tuple")
|
| 755 |
+
|
| 756 |
+
subscript_slice: Tuple | Index = Tuple(
|
| 757 |
+
[
|
| 758 |
+
annotation_,
|
| 759 |
+
Constant(Ellipsis),
|
| 760 |
+
],
|
| 761 |
+
ctx=Load(),
|
| 762 |
+
)
|
| 763 |
+
if sys.version_info < (3, 9):
|
| 764 |
+
subscript_slice = Index(subscript_slice, ctx=Load())
|
| 765 |
+
|
| 766 |
+
arg_annotations[node.args.vararg.arg] = Subscript(
|
| 767 |
+
container, subscript_slice, ctx=Load()
|
| 768 |
+
)
|
| 769 |
+
|
| 770 |
+
if node.args.kwarg:
|
| 771 |
+
annotation_ = self._convert_annotation(node.args.kwarg.annotation)
|
| 772 |
+
if annotation_:
|
| 773 |
+
if sys.version_info >= (3, 9):
|
| 774 |
+
container = Name("dict", ctx=Load())
|
| 775 |
+
else:
|
| 776 |
+
container = self._get_import("typing", "Dict")
|
| 777 |
+
|
| 778 |
+
subscript_slice = Tuple(
|
| 779 |
+
[
|
| 780 |
+
Name("str", ctx=Load()),
|
| 781 |
+
annotation_,
|
| 782 |
+
],
|
| 783 |
+
ctx=Load(),
|
| 784 |
+
)
|
| 785 |
+
if sys.version_info < (3, 9):
|
| 786 |
+
subscript_slice = Index(subscript_slice, ctx=Load())
|
| 787 |
+
|
| 788 |
+
arg_annotations[node.args.kwarg.arg] = Subscript(
|
| 789 |
+
container, subscript_slice, ctx=Load()
|
| 790 |
+
)
|
| 791 |
+
|
| 792 |
+
if arg_annotations:
|
| 793 |
+
self._memo.variable_annotations.update(arg_annotations)
|
| 794 |
+
|
| 795 |
+
self.generic_visit(node)
|
| 796 |
+
|
| 797 |
+
if arg_annotations:
|
| 798 |
+
annotations_dict = Dict(
|
| 799 |
+
keys=[Constant(key) for key in arg_annotations.keys()],
|
| 800 |
+
values=[
|
| 801 |
+
Tuple([Name(key, ctx=Load()), annotation], ctx=Load())
|
| 802 |
+
for key, annotation in arg_annotations.items()
|
| 803 |
+
],
|
| 804 |
+
)
|
| 805 |
+
func_name = self._get_import(
|
| 806 |
+
"typeguard._functions", "check_argument_types"
|
| 807 |
+
)
|
| 808 |
+
args = [
|
| 809 |
+
self._memo.joined_path,
|
| 810 |
+
annotations_dict,
|
| 811 |
+
self._memo.get_memo_name(),
|
| 812 |
+
]
|
| 813 |
+
node.body.insert(
|
| 814 |
+
self._memo.code_inject_index, Expr(Call(func_name, args, []))
|
| 815 |
+
)
|
| 816 |
+
|
| 817 |
+
# Add a checked "return None" to the end if there's no explicit return
|
| 818 |
+
# Skip if the return annotation is None or Any
|
| 819 |
+
if (
|
| 820 |
+
self._memo.return_annotation
|
| 821 |
+
and (not self._memo.is_async or not self._memo.has_yield_expressions)
|
| 822 |
+
and not isinstance(node.body[-1], Return)
|
| 823 |
+
and (
|
| 824 |
+
not isinstance(self._memo.return_annotation, Constant)
|
| 825 |
+
or self._memo.return_annotation.value is not None
|
| 826 |
+
)
|
| 827 |
+
):
|
| 828 |
+
func_name = self._get_import(
|
| 829 |
+
"typeguard._functions", "check_return_type"
|
| 830 |
+
)
|
| 831 |
+
return_node = Return(
|
| 832 |
+
Call(
|
| 833 |
+
func_name,
|
| 834 |
+
[
|
| 835 |
+
self._memo.joined_path,
|
| 836 |
+
Constant(None),
|
| 837 |
+
self._memo.return_annotation,
|
| 838 |
+
self._memo.get_memo_name(),
|
| 839 |
+
],
|
| 840 |
+
[],
|
| 841 |
+
)
|
| 842 |
+
)
|
| 843 |
+
|
| 844 |
+
# Replace a placeholder "pass" at the end
|
| 845 |
+
if isinstance(node.body[-1], Pass):
|
| 846 |
+
copy_location(return_node, node.body[-1])
|
| 847 |
+
del node.body[-1]
|
| 848 |
+
|
| 849 |
+
node.body.append(return_node)
|
| 850 |
+
|
| 851 |
+
# Insert code to create the call memo, if it was ever needed for this
|
| 852 |
+
# function
|
| 853 |
+
if self._memo.memo_var_name:
|
| 854 |
+
memo_kwargs: dict[str, Any] = {}
|
| 855 |
+
if self._memo.parent and isinstance(self._memo.parent.node, ClassDef):
|
| 856 |
+
for decorator in node.decorator_list:
|
| 857 |
+
if (
|
| 858 |
+
isinstance(decorator, Name)
|
| 859 |
+
and decorator.id == "staticmethod"
|
| 860 |
+
):
|
| 861 |
+
break
|
| 862 |
+
elif (
|
| 863 |
+
isinstance(decorator, Name)
|
| 864 |
+
and decorator.id == "classmethod"
|
| 865 |
+
):
|
| 866 |
+
memo_kwargs["self_type"] = Name(
|
| 867 |
+
id=node.args.args[0].arg, ctx=Load()
|
| 868 |
+
)
|
| 869 |
+
break
|
| 870 |
+
else:
|
| 871 |
+
if node.args.args:
|
| 872 |
+
if node.name == "__new__":
|
| 873 |
+
memo_kwargs["self_type"] = Name(
|
| 874 |
+
id=node.args.args[0].arg, ctx=Load()
|
| 875 |
+
)
|
| 876 |
+
else:
|
| 877 |
+
memo_kwargs["self_type"] = Attribute(
|
| 878 |
+
Name(id=node.args.args[0].arg, ctx=Load()),
|
| 879 |
+
"__class__",
|
| 880 |
+
ctx=Load(),
|
| 881 |
+
)
|
| 882 |
+
|
| 883 |
+
# Construct the function reference
|
| 884 |
+
# Nested functions get special treatment: the function name is added
|
| 885 |
+
# to free variables (and the closure of the resulting function)
|
| 886 |
+
names: list[str] = [node.name]
|
| 887 |
+
memo = self._memo.parent
|
| 888 |
+
while memo:
|
| 889 |
+
if isinstance(memo.node, (FunctionDef, AsyncFunctionDef)):
|
| 890 |
+
# This is a nested function. Use the function name as-is.
|
| 891 |
+
del names[:-1]
|
| 892 |
+
break
|
| 893 |
+
elif not isinstance(memo.node, ClassDef):
|
| 894 |
+
break
|
| 895 |
+
|
| 896 |
+
names.insert(0, memo.node.name)
|
| 897 |
+
memo = memo.parent
|
| 898 |
+
|
| 899 |
+
config_keywords = self._memo.get_config_keywords()
|
| 900 |
+
if config_keywords:
|
| 901 |
+
memo_kwargs["config"] = Call(
|
| 902 |
+
self._get_import("dataclasses", "replace"),
|
| 903 |
+
[self._get_import("typeguard._config", "global_config")],
|
| 904 |
+
config_keywords,
|
| 905 |
+
)
|
| 906 |
+
|
| 907 |
+
self._memo.memo_var_name.id = self._memo.get_unused_name("memo")
|
| 908 |
+
memo_store_name = Name(id=self._memo.memo_var_name.id, ctx=Store())
|
| 909 |
+
globals_call = Call(Name(id="globals", ctx=Load()), [], [])
|
| 910 |
+
locals_call = Call(Name(id="locals", ctx=Load()), [], [])
|
| 911 |
+
memo_expr = Call(
|
| 912 |
+
self._get_import("typeguard", "TypeCheckMemo"),
|
| 913 |
+
[globals_call, locals_call],
|
| 914 |
+
[keyword(key, value) for key, value in memo_kwargs.items()],
|
| 915 |
+
)
|
| 916 |
+
node.body.insert(
|
| 917 |
+
self._memo.code_inject_index,
|
| 918 |
+
Assign([memo_store_name], memo_expr),
|
| 919 |
+
)
|
| 920 |
+
|
| 921 |
+
self._memo.insert_imports(node)
|
| 922 |
+
|
| 923 |
+
# Special case the __new__() method to create a local alias from the
|
| 924 |
+
# class name to the first argument (usually "cls")
|
| 925 |
+
if (
|
| 926 |
+
isinstance(node, FunctionDef)
|
| 927 |
+
and node.args
|
| 928 |
+
and self._memo.parent is not None
|
| 929 |
+
and isinstance(self._memo.parent.node, ClassDef)
|
| 930 |
+
and node.name == "__new__"
|
| 931 |
+
):
|
| 932 |
+
first_args_expr = Name(node.args.args[0].arg, ctx=Load())
|
| 933 |
+
cls_name = Name(self._memo.parent.node.name, ctx=Store())
|
| 934 |
+
node.body.insert(
|
| 935 |
+
self._memo.code_inject_index,
|
| 936 |
+
Assign([cls_name], first_args_expr),
|
| 937 |
+
)
|
| 938 |
+
|
| 939 |
+
# Rmove any placeholder "pass" at the end
|
| 940 |
+
if isinstance(node.body[-1], Pass):
|
| 941 |
+
del node.body[-1]
|
| 942 |
+
|
| 943 |
+
return node
|
| 944 |
+
|
| 945 |
+
def visit_AsyncFunctionDef(
|
| 946 |
+
self, node: AsyncFunctionDef
|
| 947 |
+
) -> FunctionDef | AsyncFunctionDef | None:
|
| 948 |
+
return self.visit_FunctionDef(node)
|
| 949 |
+
|
| 950 |
+
def visit_Return(self, node: Return) -> Return:
|
| 951 |
+
"""This injects type checks into "return" statements."""
|
| 952 |
+
self.generic_visit(node)
|
| 953 |
+
if (
|
| 954 |
+
self._memo.return_annotation
|
| 955 |
+
and self._memo.should_instrument
|
| 956 |
+
and not self._memo.is_ignored_name(self._memo.return_annotation)
|
| 957 |
+
):
|
| 958 |
+
func_name = self._get_import("typeguard._functions", "check_return_type")
|
| 959 |
+
old_node = node
|
| 960 |
+
retval = old_node.value or Constant(None)
|
| 961 |
+
node = Return(
|
| 962 |
+
Call(
|
| 963 |
+
func_name,
|
| 964 |
+
[
|
| 965 |
+
self._memo.joined_path,
|
| 966 |
+
retval,
|
| 967 |
+
self._memo.return_annotation,
|
| 968 |
+
self._memo.get_memo_name(),
|
| 969 |
+
],
|
| 970 |
+
[],
|
| 971 |
+
)
|
| 972 |
+
)
|
| 973 |
+
copy_location(node, old_node)
|
| 974 |
+
|
| 975 |
+
return node
|
| 976 |
+
|
| 977 |
+
def visit_Yield(self, node: Yield) -> Yield | Call:
|
| 978 |
+
"""
|
| 979 |
+
This injects type checks into "yield" expressions, checking both the yielded
|
| 980 |
+
value and the value sent back to the generator, when appropriate.
|
| 981 |
+
|
| 982 |
+
"""
|
| 983 |
+
self._memo.has_yield_expressions = True
|
| 984 |
+
self.generic_visit(node)
|
| 985 |
+
|
| 986 |
+
if (
|
| 987 |
+
self._memo.yield_annotation
|
| 988 |
+
and self._memo.should_instrument
|
| 989 |
+
and not self._memo.is_ignored_name(self._memo.yield_annotation)
|
| 990 |
+
):
|
| 991 |
+
func_name = self._get_import("typeguard._functions", "check_yield_type")
|
| 992 |
+
yieldval = node.value or Constant(None)
|
| 993 |
+
node.value = Call(
|
| 994 |
+
func_name,
|
| 995 |
+
[
|
| 996 |
+
self._memo.joined_path,
|
| 997 |
+
yieldval,
|
| 998 |
+
self._memo.yield_annotation,
|
| 999 |
+
self._memo.get_memo_name(),
|
| 1000 |
+
],
|
| 1001 |
+
[],
|
| 1002 |
+
)
|
| 1003 |
+
|
| 1004 |
+
if (
|
| 1005 |
+
self._memo.send_annotation
|
| 1006 |
+
and self._memo.should_instrument
|
| 1007 |
+
and not self._memo.is_ignored_name(self._memo.send_annotation)
|
| 1008 |
+
):
|
| 1009 |
+
func_name = self._get_import("typeguard._functions", "check_send_type")
|
| 1010 |
+
old_node = node
|
| 1011 |
+
call_node = Call(
|
| 1012 |
+
func_name,
|
| 1013 |
+
[
|
| 1014 |
+
self._memo.joined_path,
|
| 1015 |
+
old_node,
|
| 1016 |
+
self._memo.send_annotation,
|
| 1017 |
+
self._memo.get_memo_name(),
|
| 1018 |
+
],
|
| 1019 |
+
[],
|
| 1020 |
+
)
|
| 1021 |
+
copy_location(call_node, old_node)
|
| 1022 |
+
return call_node
|
| 1023 |
+
|
| 1024 |
+
return node
|
| 1025 |
+
|
| 1026 |
+
def visit_AnnAssign(self, node: AnnAssign) -> Any:
|
| 1027 |
+
"""
|
| 1028 |
+
This injects a type check into a local variable annotation-assignment within a
|
| 1029 |
+
function body.
|
| 1030 |
+
|
| 1031 |
+
"""
|
| 1032 |
+
self.generic_visit(node)
|
| 1033 |
+
|
| 1034 |
+
if (
|
| 1035 |
+
isinstance(self._memo.node, (FunctionDef, AsyncFunctionDef))
|
| 1036 |
+
and node.annotation
|
| 1037 |
+
and isinstance(node.target, Name)
|
| 1038 |
+
):
|
| 1039 |
+
self._memo.ignored_names.add(node.target.id)
|
| 1040 |
+
annotation = self._convert_annotation(deepcopy(node.annotation))
|
| 1041 |
+
if annotation:
|
| 1042 |
+
self._memo.variable_annotations[node.target.id] = annotation
|
| 1043 |
+
if node.value:
|
| 1044 |
+
func_name = self._get_import(
|
| 1045 |
+
"typeguard._functions", "check_variable_assignment"
|
| 1046 |
+
)
|
| 1047 |
+
node.value = Call(
|
| 1048 |
+
func_name,
|
| 1049 |
+
[
|
| 1050 |
+
node.value,
|
| 1051 |
+
Constant(node.target.id),
|
| 1052 |
+
annotation,
|
| 1053 |
+
self._memo.get_memo_name(),
|
| 1054 |
+
],
|
| 1055 |
+
[],
|
| 1056 |
+
)
|
| 1057 |
+
|
| 1058 |
+
return node
|
| 1059 |
+
|
| 1060 |
+
def visit_Assign(self, node: Assign) -> Any:
|
| 1061 |
+
"""
|
| 1062 |
+
This injects a type check into a local variable assignment within a function
|
| 1063 |
+
body. The variable must have been annotated earlier in the function body.
|
| 1064 |
+
|
| 1065 |
+
"""
|
| 1066 |
+
self.generic_visit(node)
|
| 1067 |
+
|
| 1068 |
+
# Only instrument function-local assignments
|
| 1069 |
+
if isinstance(self._memo.node, (FunctionDef, AsyncFunctionDef)):
|
| 1070 |
+
targets: list[dict[Constant, expr | None]] = []
|
| 1071 |
+
check_required = False
|
| 1072 |
+
for target in node.targets:
|
| 1073 |
+
elts: Sequence[expr]
|
| 1074 |
+
if isinstance(target, Name):
|
| 1075 |
+
elts = [target]
|
| 1076 |
+
elif isinstance(target, Tuple):
|
| 1077 |
+
elts = target.elts
|
| 1078 |
+
else:
|
| 1079 |
+
continue
|
| 1080 |
+
|
| 1081 |
+
annotations_: dict[Constant, expr | None] = {}
|
| 1082 |
+
for exp in elts:
|
| 1083 |
+
prefix = ""
|
| 1084 |
+
if isinstance(exp, Starred):
|
| 1085 |
+
exp = exp.value
|
| 1086 |
+
prefix = "*"
|
| 1087 |
+
|
| 1088 |
+
if isinstance(exp, Name):
|
| 1089 |
+
self._memo.ignored_names.add(exp.id)
|
| 1090 |
+
name = prefix + exp.id
|
| 1091 |
+
annotation = self._memo.variable_annotations.get(exp.id)
|
| 1092 |
+
if annotation:
|
| 1093 |
+
annotations_[Constant(name)] = annotation
|
| 1094 |
+
check_required = True
|
| 1095 |
+
else:
|
| 1096 |
+
annotations_[Constant(name)] = None
|
| 1097 |
+
|
| 1098 |
+
targets.append(annotations_)
|
| 1099 |
+
|
| 1100 |
+
if check_required:
|
| 1101 |
+
# Replace missing annotations with typing.Any
|
| 1102 |
+
for item in targets:
|
| 1103 |
+
for key, expression in item.items():
|
| 1104 |
+
if expression is None:
|
| 1105 |
+
item[key] = self._get_import("typing", "Any")
|
| 1106 |
+
|
| 1107 |
+
if len(targets) == 1 and len(targets[0]) == 1:
|
| 1108 |
+
func_name = self._get_import(
|
| 1109 |
+
"typeguard._functions", "check_variable_assignment"
|
| 1110 |
+
)
|
| 1111 |
+
target_varname = next(iter(targets[0]))
|
| 1112 |
+
node.value = Call(
|
| 1113 |
+
func_name,
|
| 1114 |
+
[
|
| 1115 |
+
node.value,
|
| 1116 |
+
target_varname,
|
| 1117 |
+
targets[0][target_varname],
|
| 1118 |
+
self._memo.get_memo_name(),
|
| 1119 |
+
],
|
| 1120 |
+
[],
|
| 1121 |
+
)
|
| 1122 |
+
elif targets:
|
| 1123 |
+
func_name = self._get_import(
|
| 1124 |
+
"typeguard._functions", "check_multi_variable_assignment"
|
| 1125 |
+
)
|
| 1126 |
+
targets_arg = List(
|
| 1127 |
+
[
|
| 1128 |
+
Dict(keys=list(target), values=list(target.values()))
|
| 1129 |
+
for target in targets
|
| 1130 |
+
],
|
| 1131 |
+
ctx=Load(),
|
| 1132 |
+
)
|
| 1133 |
+
node.value = Call(
|
| 1134 |
+
func_name,
|
| 1135 |
+
[node.value, targets_arg, self._memo.get_memo_name()],
|
| 1136 |
+
[],
|
| 1137 |
+
)
|
| 1138 |
+
|
| 1139 |
+
return node
|
| 1140 |
+
|
| 1141 |
+
def visit_NamedExpr(self, node: NamedExpr) -> Any:
|
| 1142 |
+
"""This injects a type check into an assignment expression (a := foo())."""
|
| 1143 |
+
self.generic_visit(node)
|
| 1144 |
+
|
| 1145 |
+
# Only instrument function-local assignments
|
| 1146 |
+
if isinstance(self._memo.node, (FunctionDef, AsyncFunctionDef)) and isinstance(
|
| 1147 |
+
node.target, Name
|
| 1148 |
+
):
|
| 1149 |
+
self._memo.ignored_names.add(node.target.id)
|
| 1150 |
+
|
| 1151 |
+
# Bail out if no matching annotation is found
|
| 1152 |
+
annotation = self._memo.variable_annotations.get(node.target.id)
|
| 1153 |
+
if annotation is None:
|
| 1154 |
+
return node
|
| 1155 |
+
|
| 1156 |
+
func_name = self._get_import(
|
| 1157 |
+
"typeguard._functions", "check_variable_assignment"
|
| 1158 |
+
)
|
| 1159 |
+
node.value = Call(
|
| 1160 |
+
func_name,
|
| 1161 |
+
[
|
| 1162 |
+
node.value,
|
| 1163 |
+
Constant(node.target.id),
|
| 1164 |
+
annotation,
|
| 1165 |
+
self._memo.get_memo_name(),
|
| 1166 |
+
],
|
| 1167 |
+
[],
|
| 1168 |
+
)
|
| 1169 |
+
|
| 1170 |
+
return node
|
| 1171 |
+
|
| 1172 |
+
def visit_AugAssign(self, node: AugAssign) -> Any:
|
| 1173 |
+
"""
|
| 1174 |
+
This injects a type check into an augmented assignment expression (a += 1).
|
| 1175 |
+
|
| 1176 |
+
"""
|
| 1177 |
+
self.generic_visit(node)
|
| 1178 |
+
|
| 1179 |
+
# Only instrument function-local assignments
|
| 1180 |
+
if isinstance(self._memo.node, (FunctionDef, AsyncFunctionDef)) and isinstance(
|
| 1181 |
+
node.target, Name
|
| 1182 |
+
):
|
| 1183 |
+
# Bail out if no matching annotation is found
|
| 1184 |
+
annotation = self._memo.variable_annotations.get(node.target.id)
|
| 1185 |
+
if annotation is None:
|
| 1186 |
+
return node
|
| 1187 |
+
|
| 1188 |
+
# Bail out if the operator is not found (newer Python version?)
|
| 1189 |
+
try:
|
| 1190 |
+
operator_func_name = aug_assign_functions[node.op.__class__]
|
| 1191 |
+
except KeyError:
|
| 1192 |
+
return node
|
| 1193 |
+
|
| 1194 |
+
operator_func = self._get_import("operator", operator_func_name)
|
| 1195 |
+
operator_call = Call(
|
| 1196 |
+
operator_func, [Name(node.target.id, ctx=Load()), node.value], []
|
| 1197 |
+
)
|
| 1198 |
+
check_call = Call(
|
| 1199 |
+
self._get_import("typeguard._functions", "check_variable_assignment"),
|
| 1200 |
+
[
|
| 1201 |
+
operator_call,
|
| 1202 |
+
Constant(node.target.id),
|
| 1203 |
+
annotation,
|
| 1204 |
+
self._memo.get_memo_name(),
|
| 1205 |
+
],
|
| 1206 |
+
[],
|
| 1207 |
+
)
|
| 1208 |
+
return Assign(targets=[node.target], value=check_call)
|
| 1209 |
+
|
| 1210 |
+
return node
|
| 1211 |
+
|
| 1212 |
+
def visit_If(self, node: If) -> Any:
|
| 1213 |
+
"""
|
| 1214 |
+
This blocks names from being collected from a module-level
|
| 1215 |
+
"if typing.TYPE_CHECKING:" block, so that they won't be type checked.
|
| 1216 |
+
|
| 1217 |
+
"""
|
| 1218 |
+
self.generic_visit(node)
|
| 1219 |
+
|
| 1220 |
+
if (
|
| 1221 |
+
self._memo is self._module_memo
|
| 1222 |
+
and isinstance(node.test, Name)
|
| 1223 |
+
and self._memo.name_matches(node.test, "typing.TYPE_CHECKING")
|
| 1224 |
+
):
|
| 1225 |
+
collector = NameCollector()
|
| 1226 |
+
collector.visit(node)
|
| 1227 |
+
self._memo.ignored_names.update(collector.names)
|
| 1228 |
+
|
| 1229 |
+
return node
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_union_transformer.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Transforms lazily evaluated PEP 604 unions into typing.Unions, for compatibility with
|
| 3 |
+
Python versions older than 3.10.
|
| 4 |
+
"""
|
| 5 |
+
|
| 6 |
+
from __future__ import annotations
|
| 7 |
+
|
| 8 |
+
from ast import (
|
| 9 |
+
BinOp,
|
| 10 |
+
BitOr,
|
| 11 |
+
Index,
|
| 12 |
+
Load,
|
| 13 |
+
Name,
|
| 14 |
+
NodeTransformer,
|
| 15 |
+
Subscript,
|
| 16 |
+
fix_missing_locations,
|
| 17 |
+
parse,
|
| 18 |
+
)
|
| 19 |
+
from ast import Tuple as ASTTuple
|
| 20 |
+
from types import CodeType
|
| 21 |
+
from typing import Any, Dict, FrozenSet, List, Set, Tuple, Union
|
| 22 |
+
|
| 23 |
+
type_substitutions = {
|
| 24 |
+
"dict": Dict,
|
| 25 |
+
"list": List,
|
| 26 |
+
"tuple": Tuple,
|
| 27 |
+
"set": Set,
|
| 28 |
+
"frozenset": FrozenSet,
|
| 29 |
+
"Union": Union,
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
class UnionTransformer(NodeTransformer):
|
| 34 |
+
def __init__(self, union_name: Name | None = None):
|
| 35 |
+
self.union_name = union_name or Name(id="Union", ctx=Load())
|
| 36 |
+
|
| 37 |
+
def visit_BinOp(self, node: BinOp) -> Any:
|
| 38 |
+
self.generic_visit(node)
|
| 39 |
+
if isinstance(node.op, BitOr):
|
| 40 |
+
return Subscript(
|
| 41 |
+
value=self.union_name,
|
| 42 |
+
slice=Index(
|
| 43 |
+
ASTTuple(elts=[node.left, node.right], ctx=Load()), ctx=Load()
|
| 44 |
+
),
|
| 45 |
+
ctx=Load(),
|
| 46 |
+
)
|
| 47 |
+
|
| 48 |
+
return node
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def compile_type_hint(hint: str) -> CodeType:
|
| 52 |
+
parsed = parse(hint, "<string>", "eval")
|
| 53 |
+
UnionTransformer().visit(parsed)
|
| 54 |
+
fix_missing_locations(parsed)
|
| 55 |
+
return compile(parsed, "<string>", "eval", flags=0)
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/_utils.py
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import inspect
|
| 4 |
+
import sys
|
| 5 |
+
from importlib import import_module
|
| 6 |
+
from inspect import currentframe
|
| 7 |
+
from types import CodeType, FrameType, FunctionType
|
| 8 |
+
from typing import TYPE_CHECKING, Any, Callable, ForwardRef, Union, cast, final
|
| 9 |
+
from weakref import WeakValueDictionary
|
| 10 |
+
|
| 11 |
+
if TYPE_CHECKING:
|
| 12 |
+
from ._memo import TypeCheckMemo
|
| 13 |
+
|
| 14 |
+
if sys.version_info >= (3, 13):
|
| 15 |
+
from typing import get_args, get_origin
|
| 16 |
+
|
| 17 |
+
def evaluate_forwardref(forwardref: ForwardRef, memo: TypeCheckMemo) -> Any:
|
| 18 |
+
return forwardref._evaluate(
|
| 19 |
+
memo.globals, memo.locals, type_params=(), recursive_guard=frozenset()
|
| 20 |
+
)
|
| 21 |
+
|
| 22 |
+
elif sys.version_info >= (3, 10):
|
| 23 |
+
from typing import get_args, get_origin
|
| 24 |
+
|
| 25 |
+
def evaluate_forwardref(forwardref: ForwardRef, memo: TypeCheckMemo) -> Any:
|
| 26 |
+
return forwardref._evaluate(
|
| 27 |
+
memo.globals, memo.locals, recursive_guard=frozenset()
|
| 28 |
+
)
|
| 29 |
+
|
| 30 |
+
else:
|
| 31 |
+
from typing_extensions import get_args, get_origin
|
| 32 |
+
|
| 33 |
+
evaluate_extra_args: tuple[frozenset[Any], ...] = (
|
| 34 |
+
(frozenset(),) if sys.version_info >= (3, 9) else ()
|
| 35 |
+
)
|
| 36 |
+
|
| 37 |
+
def evaluate_forwardref(forwardref: ForwardRef, memo: TypeCheckMemo) -> Any:
|
| 38 |
+
from ._union_transformer import compile_type_hint, type_substitutions
|
| 39 |
+
|
| 40 |
+
if not forwardref.__forward_evaluated__:
|
| 41 |
+
forwardref.__forward_code__ = compile_type_hint(forwardref.__forward_arg__)
|
| 42 |
+
|
| 43 |
+
try:
|
| 44 |
+
return forwardref._evaluate(memo.globals, memo.locals, *evaluate_extra_args)
|
| 45 |
+
except NameError:
|
| 46 |
+
if sys.version_info < (3, 10):
|
| 47 |
+
# Try again, with the type substitutions (list -> List etc.) in place
|
| 48 |
+
new_globals = memo.globals.copy()
|
| 49 |
+
new_globals.setdefault("Union", Union)
|
| 50 |
+
if sys.version_info < (3, 9):
|
| 51 |
+
new_globals.update(type_substitutions)
|
| 52 |
+
|
| 53 |
+
return forwardref._evaluate(
|
| 54 |
+
new_globals, memo.locals or new_globals, *evaluate_extra_args
|
| 55 |
+
)
|
| 56 |
+
|
| 57 |
+
raise
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
_functions_map: WeakValueDictionary[CodeType, FunctionType] = WeakValueDictionary()
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
def get_type_name(type_: Any) -> str:
|
| 64 |
+
name: str
|
| 65 |
+
for attrname in "__name__", "_name", "__forward_arg__":
|
| 66 |
+
candidate = getattr(type_, attrname, None)
|
| 67 |
+
if isinstance(candidate, str):
|
| 68 |
+
name = candidate
|
| 69 |
+
break
|
| 70 |
+
else:
|
| 71 |
+
origin = get_origin(type_)
|
| 72 |
+
candidate = getattr(origin, "_name", None)
|
| 73 |
+
if candidate is None:
|
| 74 |
+
candidate = type_.__class__.__name__.strip("_")
|
| 75 |
+
|
| 76 |
+
if isinstance(candidate, str):
|
| 77 |
+
name = candidate
|
| 78 |
+
else:
|
| 79 |
+
return "(unknown)"
|
| 80 |
+
|
| 81 |
+
args = get_args(type_)
|
| 82 |
+
if args:
|
| 83 |
+
if name == "Literal":
|
| 84 |
+
formatted_args = ", ".join(repr(arg) for arg in args)
|
| 85 |
+
else:
|
| 86 |
+
formatted_args = ", ".join(get_type_name(arg) for arg in args)
|
| 87 |
+
|
| 88 |
+
name += f"[{formatted_args}]"
|
| 89 |
+
|
| 90 |
+
module = getattr(type_, "__module__", None)
|
| 91 |
+
if module and module not in (None, "typing", "typing_extensions", "builtins"):
|
| 92 |
+
name = module + "." + name
|
| 93 |
+
|
| 94 |
+
return name
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
def qualified_name(obj: Any, *, add_class_prefix: bool = False) -> str:
|
| 98 |
+
"""
|
| 99 |
+
Return the qualified name (e.g. package.module.Type) for the given object.
|
| 100 |
+
|
| 101 |
+
Builtins and types from the :mod:`typing` package get special treatment by having
|
| 102 |
+
the module name stripped from the generated name.
|
| 103 |
+
|
| 104 |
+
"""
|
| 105 |
+
if obj is None:
|
| 106 |
+
return "None"
|
| 107 |
+
elif inspect.isclass(obj):
|
| 108 |
+
prefix = "class " if add_class_prefix else ""
|
| 109 |
+
type_ = obj
|
| 110 |
+
else:
|
| 111 |
+
prefix = ""
|
| 112 |
+
type_ = type(obj)
|
| 113 |
+
|
| 114 |
+
module = type_.__module__
|
| 115 |
+
qualname = type_.__qualname__
|
| 116 |
+
name = qualname if module in ("typing", "builtins") else f"{module}.{qualname}"
|
| 117 |
+
return prefix + name
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
def function_name(func: Callable[..., Any]) -> str:
|
| 121 |
+
"""
|
| 122 |
+
Return the qualified name of the given function.
|
| 123 |
+
|
| 124 |
+
Builtins and types from the :mod:`typing` package get special treatment by having
|
| 125 |
+
the module name stripped from the generated name.
|
| 126 |
+
|
| 127 |
+
"""
|
| 128 |
+
# For partial functions and objects with __call__ defined, __qualname__ does not
|
| 129 |
+
# exist
|
| 130 |
+
module = getattr(func, "__module__", "")
|
| 131 |
+
qualname = (module + ".") if module not in ("builtins", "") else ""
|
| 132 |
+
return qualname + getattr(func, "__qualname__", repr(func))
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
def resolve_reference(reference: str) -> Any:
|
| 136 |
+
modulename, varname = reference.partition(":")[::2]
|
| 137 |
+
if not modulename or not varname:
|
| 138 |
+
raise ValueError(f"{reference!r} is not a module:varname reference")
|
| 139 |
+
|
| 140 |
+
obj = import_module(modulename)
|
| 141 |
+
for attr in varname.split("."):
|
| 142 |
+
obj = getattr(obj, attr)
|
| 143 |
+
|
| 144 |
+
return obj
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
def is_method_of(obj: object, cls: type) -> bool:
|
| 148 |
+
return (
|
| 149 |
+
inspect.isfunction(obj)
|
| 150 |
+
and obj.__module__ == cls.__module__
|
| 151 |
+
and obj.__qualname__.startswith(cls.__qualname__ + ".")
|
| 152 |
+
)
|
| 153 |
+
|
| 154 |
+
|
| 155 |
+
def get_stacklevel() -> int:
|
| 156 |
+
level = 1
|
| 157 |
+
frame = cast(FrameType, currentframe()).f_back
|
| 158 |
+
while frame and frame.f_globals.get("__name__", "").startswith("typeguard."):
|
| 159 |
+
level += 1
|
| 160 |
+
frame = frame.f_back
|
| 161 |
+
|
| 162 |
+
return level
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
@final
|
| 166 |
+
class Unset:
|
| 167 |
+
__slots__ = ()
|
| 168 |
+
|
| 169 |
+
def __repr__(self) -> str:
|
| 170 |
+
return "<unset>"
|
| 171 |
+
|
| 172 |
+
|
| 173 |
+
unset = Unset()
|
evaluation/tb1/datasets/terminal-bench-1.0-offline/extract-moves-from-video/tests/vendor/python/lib/python3.11/site-packages/setuptools/_vendor/typeguard/py.typed
ADDED
|
File without changes
|