├── .flake8 ├── .github ├── dependabot.yml ├── issue_template.md ├── pull_request_template.md └── workflows │ └── ci.yml ├── .gitignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── makefile ├── pyproject.toml ├── ruff_api ├── __init__.py ├── __ruff_version__.py ├── __version__.py ├── _rust.pyi ├── errors.py ├── py.typed └── tests │ ├── __init__.py │ ├── __main__.py │ └── smoke.py ├── scripts ├── ruff_version.py └── validate_formatting.py └── src └── lib.rs /.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | ignore = 3 | # mccabe complexity 4 | C901 5 | 6 | # covered by formatter 7 | E1 8 | E2 9 | E3 10 | E4 11 | E701 12 | max-line-length = 88 13 | per-file-ignores = 14 | __init__.py: F401 15 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "monthly" 7 | - package-ecosystem: "pip" 8 | directory: "/" 9 | schedule: 10 | interval: "monthly" 11 | -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | 4 | 5 | ### Details 6 | 7 | * OS: 8 | * Python version: 9 | * ruff-api version: 10 | * Can you repro on master? 11 | * Can you repro in a clean virtualenv? 12 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | 4 | 5 | Fixes: # 6 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | tags: 8 | - v* 9 | pull_request: 10 | workflow_dispatch: 11 | 12 | permissions: 13 | contents: read 14 | 15 | jobs: 16 | sdist: 17 | name: sdist 18 | runs-on: ubuntu-latest 19 | steps: 20 | - uses: actions/checkout@v4 21 | - name: Build sdist 22 | uses: PyO3/maturin-action@v1 23 | with: 24 | command: sdist 25 | args: --out dist 26 | - name: Upload sdist 27 | uses: actions/upload-artifact@v3 28 | with: 29 | name: wheels 30 | path: dist 31 | 32 | build: 33 | name: build ${{ matrix.target.os }} ${{ matrix.target.arch }} 34 | runs-on: ${{ matrix.target.os }} 35 | strategy: 36 | fail-fast: false 37 | matrix: 38 | target: 39 | - os: macos-latest 40 | arch: x86_64 41 | - os: macos-latest 42 | arch: aarch64 43 | - os: ubuntu-latest 44 | arch: x86_64 45 | - os: ubuntu-latest 46 | arch: aarch64 47 | - os: windows-latest 48 | arch: x64 49 | steps: 50 | - uses: actions/checkout@v4 51 | - uses: actions/setup-python@v5 52 | with: 53 | python-version: '3.13' 54 | allow-prereleases: true 55 | - name: Build wheel 56 | uses: PyO3/maturin-action@v1 57 | with: 58 | target: ${{ matrix.target.arch }} 59 | args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 3.13' 60 | sccache: 'true' 61 | manylinux: auto 62 | - name: Upload wheels 63 | uses: actions/upload-artifact@v3 64 | with: 65 | name: wheels 66 | path: dist 67 | 68 | lint: 69 | name: lint 70 | runs-on: ubuntu-latest 71 | steps: 72 | - uses: actions/checkout@v4 73 | - uses: actions/setup-python@v5 74 | with: 75 | python-version: '3.13' 76 | allow-prereleases: true 77 | - name: Install 78 | run: make install 79 | - name: Test 80 | run: make test 81 | - name: Lint 82 | run: make lint 83 | 84 | test: 85 | name: test 86 | needs: [build] 87 | runs-on: ${{ matrix.os }} 88 | strategy: 89 | fail-fast: false 90 | matrix: 91 | os: [macos-latest, ubuntu-latest, windows-latest] 92 | python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] 93 | steps: 94 | - uses: actions/setup-python@v5 95 | with: 96 | python-version: ${{ matrix.python-version }} 97 | allow-prereleases: true 98 | - uses: actions/download-artifact@v3 99 | with: 100 | name: wheels 101 | path: dist 102 | - name: Install 103 | run: | 104 | pip install --upgrade pip 105 | pip install --no-index --find-links dist/ --only-binary ruff-api ruff-api 106 | pip install ruff-api[dev] 107 | - name: Test 108 | run: | 109 | python -m ruff_api.tests 110 | python -m mypy -p ruff_api 111 | 112 | publish: 113 | name: publish 114 | runs-on: ubuntu-latest 115 | if: startsWith(github.ref, 'refs/tags/v') 116 | needs: [build, lint, test, sdist] 117 | permissions: 118 | id-token: write 119 | steps: 120 | - uses: actions/download-artifact@v3 121 | with: 122 | name: wheels 123 | - name: Publish to PyPI 124 | uses: PyO3/maturin-action@v1 125 | with: 126 | command: upload 127 | args: --non-interactive --skip-existing * 128 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ruff-api 2 | ======== 3 | 4 | [![Generated by attribution][attribution-badge]][attribution-url] 5 | 6 | 7 | v0.1.0 8 | ------ 9 | 10 | Feature release 11 | 12 | - New: import sorting options (#54) 13 | - `case_sensitive` 14 | - `combine_as_imports` 15 | - `detect_same_package` 16 | - `order_by_type` 17 | - Fix: update `ruff_version` to 0.4.10 to match reality (#58) 18 | - Dev: enabled rust clippy linter and fixed outstanding warnings (#57) 19 | - Dev: use uv to manage virtualenv when available (#55) 20 | 21 | ```text 22 | $ git shortlog -s v0.0.8...v0.1.0 23 | 5 Amethyst Reese 24 | 4 dependabot[bot] 25 | ``` 26 | 27 | 28 | v0.0.8 29 | ------ 30 | 31 | Feature release 32 | 33 | - Add optional `root` parameter to `isort_string` (#46) 34 | - Test and build wheels for Python 3.13 35 | - Dropped wheel builds for 32-bit x86, arm7l, s390x, and ppc 36 | 37 | ```text 38 | $ git shortlog -s v0.0.7...v0.0.8 39 | 4 Amethyst Reese 40 | 1 Thomas P. 41 | ``` 42 | 43 | 44 | v0.0.7 45 | ------ 46 | 47 | Maintenance release 48 | 49 | - Upgrade bundled ruff to v0.4.10 50 | 51 | ```text 52 | $ git shortlog -s v0.0.6...v0.0.7 53 | 2 Amethyst Reese 54 | 6 dependabot[bot] 55 | ``` 56 | 57 | 58 | v0.0.6 59 | ------ 60 | 61 | Feature release 62 | 63 | - Move ruff-api errors into native Python code (#33) 64 | 65 | ```text 66 | $ git shortlog -s v0.0.5...v0.0.6 67 | 2 Amethyst Reese 68 | 2 dependabot[bot] 69 | ``` 70 | 71 | 72 | v0.0.5 73 | ------ 74 | 75 | Feature release 76 | 77 | - New `isort_string()` function to sort imports (#24) 78 | - Upgrade bundled ruff to v0.3.7 (#30) 79 | - Documented basic usage in readme (#29) 80 | 81 | ```text 82 | $ git shortlog -s v0.0.4...v0.0.5 83 | 7 Amethyst Reese 84 | 1 Thomas Polasek 85 | 3 dependabot[bot] 86 | ``` 87 | 88 | 89 | v0.0.4 90 | ------ 91 | 92 | Feature release 93 | 94 | - Upgrade ruff to v0.3.0 (#19) 95 | - Added `ruff_version` attribute (#19) 96 | - Fix license metadata for PyPI 97 | 98 | ```text 99 | $ git shortlog -s v0.0.3...v0.0.4 100 | 3 Amethyst Reese 101 | 4 dependabot[bot] 102 | ``` 103 | 104 | 105 | v0.0.3 106 | ------ 107 | 108 | Experimental release 109 | 110 | - Upgrade ruff to v0.2.1+ git rev 91ae81b 111 | - Support back to Python 3.8 112 | - Add smoke tests 113 | 114 | ```text 115 | $ git shortlog -s v0.0.2...v0.0.3 116 | 6 Amethyst Reese 117 | 6 dependabot[bot] 118 | ``` 119 | 120 | 121 | v0.0.2 122 | ------ 123 | 124 | Dev release 125 | 126 | - type stubs and py.typed 127 | 128 | ```text 129 | $ git shortlog -s v0.0.1...v0.0.2 130 | 5 Amethyst Reese 131 | ``` 132 | 133 | 134 | v0.0.1 135 | ------ 136 | 137 | Proof of concept. 138 | 139 | - Can format strings 140 | 141 | ```text 142 | $ git shortlog -s v0.0.1 143 | 4 Amethyst Reese 144 | ``` 145 | 146 | [attribution-badge]: 147 | https://img.shields.io/badge/generated%20by-attribution-informational 148 | [attribution-url]: https://attribution.omnilib.dev 149 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | 2 | # Contributor Covenant Code of Conduct 3 | 4 | ## Our Pledge 5 | 6 | We as members, contributors, and leaders pledge to make participation in our 7 | community a harassment-free experience for everyone, regardless of age, body 8 | size, visible or invisible disability, ethnicity, sex characteristics, gender 9 | identity and expression, level of experience, education, socio-economic status, 10 | nationality, personal appearance, race, caste, color, religion, or sexual 11 | identity and orientation. 12 | 13 | We pledge to act and interact in ways that contribute to an open, welcoming, 14 | diverse, inclusive, and healthy community. 15 | 16 | ## Our Standards 17 | 18 | Examples of behavior that contributes to a positive environment for our 19 | community include: 20 | 21 | * Demonstrating empathy and kindness toward other people 22 | * Being respectful of differing opinions, viewpoints, and experiences 23 | * Giving and gracefully accepting constructive feedback 24 | * Accepting responsibility and apologizing to those affected by our mistakes, 25 | and learning from the experience 26 | * Focusing on what is best not just for us as individuals, but for the overall 27 | community 28 | 29 | Examples of unacceptable behavior include: 30 | 31 | * The use of sexualized language or imagery, and sexual attention or advances of 32 | any kind 33 | * Trolling, insulting or derogatory comments, and personal or political attacks 34 | * Public or private harassment 35 | * Publishing others' private information, such as a physical or email address, 36 | without their explicit permission 37 | * Other conduct which could reasonably be considered inappropriate in a 38 | professional setting 39 | 40 | ## Enforcement Responsibilities 41 | 42 | Community leaders are responsible for clarifying and enforcing our standards of 43 | acceptable behavior and will take appropriate and fair corrective action in 44 | response to any behavior that they deem inappropriate, threatening, offensive, 45 | or harmful. 46 | 47 | Community leaders have the right and responsibility to remove, edit, or reject 48 | comments, commits, code, wiki edits, issues, and other contributions that are 49 | not aligned to this Code of Conduct, and will communicate reasons for moderation 50 | decisions when appropriate. 51 | 52 | ## Scope 53 | 54 | This Code of Conduct applies within all community spaces, and also applies when 55 | an individual is officially representing the community in public spaces. 56 | Examples of representing our community include using an official e-mail address, 57 | posting via an official social media account, or acting as an appointed 58 | representative at an online or offline event. 59 | 60 | ## Enforcement 61 | 62 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 63 | reported to the community leaders responsible for enforcement at: 64 | 65 | amethyst@n7.gg 66 | 67 | All complaints will be reviewed and investigated promptly and fairly. 68 | 69 | All community leaders are obligated to respect the privacy and security of the 70 | reporter of any incident. 71 | 72 | ## Enforcement Guidelines 73 | 74 | Community leaders will follow these Community Impact Guidelines in determining 75 | the consequences for any action they deem in violation of this Code of Conduct: 76 | 77 | ### 1. Correction 78 | 79 | **Community Impact**: Use of inappropriate language or other behavior deemed 80 | unprofessional or unwelcome in the community. 81 | 82 | **Consequence**: A private, written warning from community leaders, providing 83 | clarity around the nature of the violation and an explanation of why the 84 | behavior was inappropriate. A public apology may be requested. 85 | 86 | ### 2. Warning 87 | 88 | **Community Impact**: A violation through a single incident or series of 89 | actions. 90 | 91 | **Consequence**: A warning with consequences for continued behavior. No 92 | interaction with the people involved, including unsolicited interaction with 93 | those enforcing the Code of Conduct, for a specified period of time. This 94 | includes avoiding interactions in community spaces as well as external channels 95 | like social media. Violating these terms may lead to a temporary or permanent 96 | ban. 97 | 98 | ### 3. Temporary Ban 99 | 100 | **Community Impact**: A serious violation of community standards, including 101 | sustained inappropriate behavior. 102 | 103 | **Consequence**: A temporary ban from any sort of interaction or public 104 | communication with the community for a specified period of time. No public or 105 | private interaction with the people involved, including unsolicited interaction 106 | with those enforcing the Code of Conduct, is allowed during this period. 107 | Violating these terms may lead to a permanent ban. 108 | 109 | ### 4. Permanent Ban 110 | 111 | **Community Impact**: Demonstrating a pattern of violation of community 112 | standards, including sustained inappropriate behavior, harassment of an 113 | individual, or aggression toward or disparagement of classes of individuals. 114 | 115 | **Consequence**: A permanent ban from any sort of public interaction within the 116 | community. 117 | 118 | ## Attribution 119 | 120 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 121 | version 2.1, available at 122 | [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. 123 | 124 | Community Impact Guidelines were inspired by 125 | [Mozilla's code of conduct enforcement ladder][Mozilla CoC]. 126 | 127 | For answers to common questions about this code of conduct, see the FAQ at 128 | [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at 129 | [https://www.contributor-covenant.org/translations][translations]. 130 | 131 | [homepage]: https://www.contributor-covenant.org 132 | [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html 133 | [Mozilla CoC]: https://github.com/mozilla/diversity 134 | [FAQ]: https://www.contributor-covenant.org/faq 135 | [translations]: https://www.contributor-covenant.org/translations 136 | 137 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to ruff-api 2 | 3 | ## Setup 4 | 5 | Create a fresh development enviroment, and install the 6 | appropriate tools and dependencies: 7 | 8 | $ make venv 9 | $ source .venv/bin/activate 10 | 11 | 12 | ## Validate 13 | 14 | With the virtualenv activated, run the tests and linters: 15 | 16 | $ make test lint 17 | 18 | 19 | ## Submit 20 | 21 | Before submitting a pull request, please ensure 22 | that you have done the following: 23 | 24 | * Documented changes or features in README.md 25 | * Added appropriate license headers to new files 26 | * Written or modified tests for new functionality 27 | * Used `make format` to format code appropriately 28 | * Validated and tested code with `make test lint` 29 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "Inflector" 7 | version = "0.11.4" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" 10 | 11 | [[package]] 12 | name = "aho-corasick" 13 | version = "1.1.3" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 16 | dependencies = [ 17 | "memchr", 18 | ] 19 | 20 | [[package]] 21 | name = "android-tzdata" 22 | version = "0.1.1" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 25 | 26 | [[package]] 27 | name = "android_system_properties" 28 | version = "0.1.5" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 31 | dependencies = [ 32 | "libc", 33 | ] 34 | 35 | [[package]] 36 | name = "annotate-snippets" 37 | version = "0.6.1" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "c7021ce4924a3f25f802b2cccd1af585e39ea1a363a1aa2e72afe54b67a3a7a7" 40 | 41 | [[package]] 42 | name = "annotate-snippets" 43 | version = "0.9.2" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "ccaf7e9dfbb6ab22c82e473cd1a8a7bd313c19a5b7e40970f3d89ef5a5c9e81e" 46 | dependencies = [ 47 | "unicode-width", 48 | "yansi-term", 49 | ] 50 | 51 | [[package]] 52 | name = "anstream" 53 | version = "0.6.15" 54 | source = "registry+https://github.com/rust-lang/crates.io-index" 55 | checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" 56 | dependencies = [ 57 | "anstyle", 58 | "anstyle-parse", 59 | "anstyle-query", 60 | "anstyle-wincon", 61 | "colorchoice", 62 | "is_terminal_polyfill", 63 | "utf8parse", 64 | ] 65 | 66 | [[package]] 67 | name = "anstyle" 68 | version = "1.0.8" 69 | source = "registry+https://github.com/rust-lang/crates.io-index" 70 | checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" 71 | 72 | [[package]] 73 | name = "anstyle-parse" 74 | version = "0.2.5" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" 77 | dependencies = [ 78 | "utf8parse", 79 | ] 80 | 81 | [[package]] 82 | name = "anstyle-query" 83 | version = "1.1.1" 84 | source = "registry+https://github.com/rust-lang/crates.io-index" 85 | checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" 86 | dependencies = [ 87 | "windows-sys 0.52.0", 88 | ] 89 | 90 | [[package]] 91 | name = "anstyle-wincon" 92 | version = "3.0.4" 93 | source = "registry+https://github.com/rust-lang/crates.io-index" 94 | checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" 95 | dependencies = [ 96 | "anstyle", 97 | "windows-sys 0.52.0", 98 | ] 99 | 100 | [[package]] 101 | name = "anyhow" 102 | version = "1.0.86" 103 | source = "registry+https://github.com/rust-lang/crates.io-index" 104 | checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" 105 | 106 | [[package]] 107 | name = "argfile" 108 | version = "0.2.1" 109 | source = "registry+https://github.com/rust-lang/crates.io-index" 110 | checksum = "0a1cc0ba69de57db40674c66f7cf2caee3981ddef084388482c95c0e2133e5e8" 111 | dependencies = [ 112 | "fs-err", 113 | "os_str_bytes", 114 | ] 115 | 116 | [[package]] 117 | name = "autocfg" 118 | version = "1.3.0" 119 | source = "registry+https://github.com/rust-lang/crates.io-index" 120 | checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" 121 | 122 | [[package]] 123 | name = "bincode" 124 | version = "1.3.3" 125 | source = "registry+https://github.com/rust-lang/crates.io-index" 126 | checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" 127 | dependencies = [ 128 | "serde", 129 | ] 130 | 131 | [[package]] 132 | name = "bitflags" 133 | version = "1.3.2" 134 | source = "registry+https://github.com/rust-lang/crates.io-index" 135 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 136 | 137 | [[package]] 138 | name = "bitflags" 139 | version = "2.6.0" 140 | source = "registry+https://github.com/rust-lang/crates.io-index" 141 | checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" 142 | 143 | [[package]] 144 | name = "bstr" 145 | version = "1.10.0" 146 | source = "registry+https://github.com/rust-lang/crates.io-index" 147 | checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" 148 | dependencies = [ 149 | "memchr", 150 | "regex-automata 0.4.7", 151 | "serde", 152 | ] 153 | 154 | [[package]] 155 | name = "bumpalo" 156 | version = "3.16.0" 157 | source = "registry+https://github.com/rust-lang/crates.io-index" 158 | checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" 159 | 160 | [[package]] 161 | name = "byteorder" 162 | version = "1.5.0" 163 | source = "registry+https://github.com/rust-lang/crates.io-index" 164 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 165 | 166 | [[package]] 167 | name = "cachedir" 168 | version = "0.3.1" 169 | source = "registry+https://github.com/rust-lang/crates.io-index" 170 | checksum = "4703f3937077db8fa35bee3c8789343c1aec2585f0146f09d658d4ccc0e8d873" 171 | dependencies = [ 172 | "tempfile", 173 | ] 174 | 175 | [[package]] 176 | name = "cc" 177 | version = "1.1.7" 178 | source = "registry+https://github.com/rust-lang/crates.io-index" 179 | checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" 180 | 181 | [[package]] 182 | name = "cfg-if" 183 | version = "1.0.0" 184 | source = "registry+https://github.com/rust-lang/crates.io-index" 185 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 186 | 187 | [[package]] 188 | name = "cfg_aliases" 189 | version = "0.1.1" 190 | source = "registry+https://github.com/rust-lang/crates.io-index" 191 | checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" 192 | 193 | [[package]] 194 | name = "chic" 195 | version = "1.2.2" 196 | source = "registry+https://github.com/rust-lang/crates.io-index" 197 | checksum = "a5b5db619f3556839cb2223ae86ff3f9a09da2c5013be42bc9af08c9589bf70c" 198 | dependencies = [ 199 | "annotate-snippets 0.6.1", 200 | ] 201 | 202 | [[package]] 203 | name = "chrono" 204 | version = "0.4.38" 205 | source = "registry+https://github.com/rust-lang/crates.io-index" 206 | checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" 207 | dependencies = [ 208 | "android-tzdata", 209 | "iana-time-zone", 210 | "num-traits", 211 | "windows-targets 0.52.6", 212 | ] 213 | 214 | [[package]] 215 | name = "clap" 216 | version = "4.5.13" 217 | source = "registry+https://github.com/rust-lang/crates.io-index" 218 | checksum = "0fbb260a053428790f3de475e304ff84cdbc4face759ea7a3e64c1edd938a7fc" 219 | dependencies = [ 220 | "clap_builder", 221 | "clap_derive", 222 | ] 223 | 224 | [[package]] 225 | name = "clap_builder" 226 | version = "4.5.13" 227 | source = "registry+https://github.com/rust-lang/crates.io-index" 228 | checksum = "64b17d7ea74e9f833c7dbf2cbe4fb12ff26783eda4782a8975b72f895c9b4d99" 229 | dependencies = [ 230 | "anstream", 231 | "anstyle", 232 | "clap_lex", 233 | "strsim", 234 | "terminal_size", 235 | ] 236 | 237 | [[package]] 238 | name = "clap_complete" 239 | version = "4.5.12" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "a8670053e87c316345e384ca1f3eba3006fc6355ed8b8a1140d104e109e3df34" 242 | dependencies = [ 243 | "clap", 244 | ] 245 | 246 | [[package]] 247 | name = "clap_complete_command" 248 | version = "0.5.1" 249 | source = "registry+https://github.com/rust-lang/crates.io-index" 250 | checksum = "183495371ea78d4c9ff638bfc6497d46fed2396e4f9c50aebc1278a4a9919a3d" 251 | dependencies = [ 252 | "clap", 253 | "clap_complete", 254 | "clap_complete_fig", 255 | "clap_complete_nushell", 256 | ] 257 | 258 | [[package]] 259 | name = "clap_complete_fig" 260 | version = "4.5.2" 261 | source = "registry+https://github.com/rust-lang/crates.io-index" 262 | checksum = "d494102c8ff3951810c72baf96910b980fb065ca5d3101243e6a8dc19747c86b" 263 | dependencies = [ 264 | "clap", 265 | "clap_complete", 266 | ] 267 | 268 | [[package]] 269 | name = "clap_complete_nushell" 270 | version = "0.1.11" 271 | source = "registry+https://github.com/rust-lang/crates.io-index" 272 | checksum = "5d02bc8b1a18ee47c4d2eec3fb5ac034dc68ebea6125b1509e9ccdffcddce66e" 273 | dependencies = [ 274 | "clap", 275 | "clap_complete", 276 | ] 277 | 278 | [[package]] 279 | name = "clap_derive" 280 | version = "4.5.13" 281 | source = "registry+https://github.com/rust-lang/crates.io-index" 282 | checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" 283 | dependencies = [ 284 | "heck", 285 | "proc-macro2", 286 | "quote", 287 | "syn 2.0.72", 288 | ] 289 | 290 | [[package]] 291 | name = "clap_lex" 292 | version = "0.7.2" 293 | source = "registry+https://github.com/rust-lang/crates.io-index" 294 | checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" 295 | 296 | [[package]] 297 | name = "clearscreen" 298 | version = "3.0.0" 299 | source = "registry+https://github.com/rust-lang/crates.io-index" 300 | checksum = "2f8c93eb5f77c9050c7750e14f13ef1033a40a0aac70c6371535b6763a01438c" 301 | dependencies = [ 302 | "nix", 303 | "terminfo", 304 | "thiserror", 305 | "which", 306 | "winapi", 307 | ] 308 | 309 | [[package]] 310 | name = "colorchoice" 311 | version = "1.0.2" 312 | source = "registry+https://github.com/rust-lang/crates.io-index" 313 | checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" 314 | 315 | [[package]] 316 | name = "colored" 317 | version = "2.1.0" 318 | source = "registry+https://github.com/rust-lang/crates.io-index" 319 | checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" 320 | dependencies = [ 321 | "lazy_static", 322 | "windows-sys 0.48.0", 323 | ] 324 | 325 | [[package]] 326 | name = "core-foundation-sys" 327 | version = "0.8.6" 328 | source = "registry+https://github.com/rust-lang/crates.io-index" 329 | checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" 330 | 331 | [[package]] 332 | name = "countme" 333 | version = "3.0.1" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | checksum = "7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636" 336 | 337 | [[package]] 338 | name = "crossbeam" 339 | version = "0.8.4" 340 | source = "registry+https://github.com/rust-lang/crates.io-index" 341 | checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" 342 | dependencies = [ 343 | "crossbeam-channel", 344 | "crossbeam-deque", 345 | "crossbeam-epoch", 346 | "crossbeam-queue", 347 | "crossbeam-utils", 348 | ] 349 | 350 | [[package]] 351 | name = "crossbeam-channel" 352 | version = "0.5.13" 353 | source = "registry+https://github.com/rust-lang/crates.io-index" 354 | checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" 355 | dependencies = [ 356 | "crossbeam-utils", 357 | ] 358 | 359 | [[package]] 360 | name = "crossbeam-deque" 361 | version = "0.8.5" 362 | source = "registry+https://github.com/rust-lang/crates.io-index" 363 | checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" 364 | dependencies = [ 365 | "crossbeam-epoch", 366 | "crossbeam-utils", 367 | ] 368 | 369 | [[package]] 370 | name = "crossbeam-epoch" 371 | version = "0.9.18" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" 374 | dependencies = [ 375 | "crossbeam-utils", 376 | ] 377 | 378 | [[package]] 379 | name = "crossbeam-queue" 380 | version = "0.3.11" 381 | source = "registry+https://github.com/rust-lang/crates.io-index" 382 | checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" 383 | dependencies = [ 384 | "crossbeam-utils", 385 | ] 386 | 387 | [[package]] 388 | name = "crossbeam-utils" 389 | version = "0.8.20" 390 | source = "registry+https://github.com/rust-lang/crates.io-index" 391 | checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" 392 | 393 | [[package]] 394 | name = "darling" 395 | version = "0.20.10" 396 | source = "registry+https://github.com/rust-lang/crates.io-index" 397 | checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" 398 | dependencies = [ 399 | "darling_core", 400 | "darling_macro", 401 | ] 402 | 403 | [[package]] 404 | name = "darling_core" 405 | version = "0.20.10" 406 | source = "registry+https://github.com/rust-lang/crates.io-index" 407 | checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" 408 | dependencies = [ 409 | "fnv", 410 | "ident_case", 411 | "proc-macro2", 412 | "quote", 413 | "strsim", 414 | "syn 2.0.72", 415 | ] 416 | 417 | [[package]] 418 | name = "darling_macro" 419 | version = "0.20.10" 420 | source = "registry+https://github.com/rust-lang/crates.io-index" 421 | checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" 422 | dependencies = [ 423 | "darling_core", 424 | "quote", 425 | "syn 2.0.72", 426 | ] 427 | 428 | [[package]] 429 | name = "dirs" 430 | version = "4.0.0" 431 | source = "registry+https://github.com/rust-lang/crates.io-index" 432 | checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" 433 | dependencies = [ 434 | "dirs-sys 0.3.7", 435 | ] 436 | 437 | [[package]] 438 | name = "dirs" 439 | version = "5.0.1" 440 | source = "registry+https://github.com/rust-lang/crates.io-index" 441 | checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" 442 | dependencies = [ 443 | "dirs-sys 0.4.1", 444 | ] 445 | 446 | [[package]] 447 | name = "dirs-sys" 448 | version = "0.3.7" 449 | source = "registry+https://github.com/rust-lang/crates.io-index" 450 | checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" 451 | dependencies = [ 452 | "libc", 453 | "redox_users", 454 | "winapi", 455 | ] 456 | 457 | [[package]] 458 | name = "dirs-sys" 459 | version = "0.4.1" 460 | source = "registry+https://github.com/rust-lang/crates.io-index" 461 | checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" 462 | dependencies = [ 463 | "libc", 464 | "option-ext", 465 | "redox_users", 466 | "windows-sys 0.48.0", 467 | ] 468 | 469 | [[package]] 470 | name = "drop_bomb" 471 | version = "0.1.5" 472 | source = "registry+https://github.com/rust-lang/crates.io-index" 473 | checksum = "9bda8e21c04aca2ae33ffc2fd8c23134f3cac46db123ba97bd9d3f3b8a4a85e1" 474 | 475 | [[package]] 476 | name = "either" 477 | version = "1.13.0" 478 | source = "registry+https://github.com/rust-lang/crates.io-index" 479 | checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" 480 | 481 | [[package]] 482 | name = "equivalent" 483 | version = "1.0.1" 484 | source = "registry+https://github.com/rust-lang/crates.io-index" 485 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 486 | 487 | [[package]] 488 | name = "errno" 489 | version = "0.3.9" 490 | source = "registry+https://github.com/rust-lang/crates.io-index" 491 | checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" 492 | dependencies = [ 493 | "libc", 494 | "windows-sys 0.52.0", 495 | ] 496 | 497 | [[package]] 498 | name = "fastrand" 499 | version = "2.1.0" 500 | source = "registry+https://github.com/rust-lang/crates.io-index" 501 | checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" 502 | 503 | [[package]] 504 | name = "fern" 505 | version = "0.6.2" 506 | source = "registry+https://github.com/rust-lang/crates.io-index" 507 | checksum = "d9f0c14694cbd524c8720dd69b0e3179344f04ebb5f90f2e4a440c6ea3b2f1ee" 508 | dependencies = [ 509 | "log", 510 | ] 511 | 512 | [[package]] 513 | name = "filetime" 514 | version = "0.2.23" 515 | source = "registry+https://github.com/rust-lang/crates.io-index" 516 | checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" 517 | dependencies = [ 518 | "cfg-if", 519 | "libc", 520 | "redox_syscall 0.4.1", 521 | "windows-sys 0.52.0", 522 | ] 523 | 524 | [[package]] 525 | name = "fnv" 526 | version = "1.0.7" 527 | source = "registry+https://github.com/rust-lang/crates.io-index" 528 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 529 | 530 | [[package]] 531 | name = "form_urlencoded" 532 | version = "1.2.1" 533 | source = "registry+https://github.com/rust-lang/crates.io-index" 534 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 535 | dependencies = [ 536 | "percent-encoding", 537 | ] 538 | 539 | [[package]] 540 | name = "fs-err" 541 | version = "2.11.0" 542 | source = "registry+https://github.com/rust-lang/crates.io-index" 543 | checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" 544 | dependencies = [ 545 | "autocfg", 546 | ] 547 | 548 | [[package]] 549 | name = "fsevent-sys" 550 | version = "4.1.0" 551 | source = "registry+https://github.com/rust-lang/crates.io-index" 552 | checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" 553 | dependencies = [ 554 | "libc", 555 | ] 556 | 557 | [[package]] 558 | name = "getopts" 559 | version = "0.2.21" 560 | source = "registry+https://github.com/rust-lang/crates.io-index" 561 | checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" 562 | dependencies = [ 563 | "unicode-width", 564 | ] 565 | 566 | [[package]] 567 | name = "getrandom" 568 | version = "0.2.15" 569 | source = "registry+https://github.com/rust-lang/crates.io-index" 570 | checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" 571 | dependencies = [ 572 | "cfg-if", 573 | "js-sys", 574 | "libc", 575 | "wasi", 576 | "wasm-bindgen", 577 | ] 578 | 579 | [[package]] 580 | name = "glob" 581 | version = "0.3.1" 582 | source = "registry+https://github.com/rust-lang/crates.io-index" 583 | checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" 584 | 585 | [[package]] 586 | name = "globset" 587 | version = "0.4.14" 588 | source = "registry+https://github.com/rust-lang/crates.io-index" 589 | checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" 590 | dependencies = [ 591 | "aho-corasick", 592 | "bstr", 593 | "log", 594 | "regex-automata 0.4.7", 595 | "regex-syntax 0.8.4", 596 | ] 597 | 598 | [[package]] 599 | name = "hashbrown" 600 | version = "0.14.5" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 603 | 604 | [[package]] 605 | name = "heck" 606 | version = "0.5.0" 607 | source = "registry+https://github.com/rust-lang/crates.io-index" 608 | checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 609 | 610 | [[package]] 611 | name = "home" 612 | version = "0.5.9" 613 | source = "registry+https://github.com/rust-lang/crates.io-index" 614 | checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" 615 | dependencies = [ 616 | "windows-sys 0.52.0", 617 | ] 618 | 619 | [[package]] 620 | name = "iana-time-zone" 621 | version = "0.1.60" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" 624 | dependencies = [ 625 | "android_system_properties", 626 | "core-foundation-sys", 627 | "iana-time-zone-haiku", 628 | "js-sys", 629 | "wasm-bindgen", 630 | "windows-core", 631 | ] 632 | 633 | [[package]] 634 | name = "iana-time-zone-haiku" 635 | version = "0.1.2" 636 | source = "registry+https://github.com/rust-lang/crates.io-index" 637 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 638 | dependencies = [ 639 | "cc", 640 | ] 641 | 642 | [[package]] 643 | name = "ident_case" 644 | version = "1.0.1" 645 | source = "registry+https://github.com/rust-lang/crates.io-index" 646 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 647 | 648 | [[package]] 649 | name = "idna" 650 | version = "0.5.0" 651 | source = "registry+https://github.com/rust-lang/crates.io-index" 652 | checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" 653 | dependencies = [ 654 | "unicode-bidi", 655 | "unicode-normalization", 656 | ] 657 | 658 | [[package]] 659 | name = "ignore" 660 | version = "0.4.22" 661 | source = "registry+https://github.com/rust-lang/crates.io-index" 662 | checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" 663 | dependencies = [ 664 | "crossbeam-deque", 665 | "globset", 666 | "log", 667 | "memchr", 668 | "regex-automata 0.4.7", 669 | "same-file", 670 | "walkdir", 671 | "winapi-util", 672 | ] 673 | 674 | [[package]] 675 | name = "imperative" 676 | version = "1.0.6" 677 | source = "registry+https://github.com/rust-lang/crates.io-index" 678 | checksum = "29a1f6526af721f9aec9ceed7ab8ebfca47f3399d08b80056c2acca3fcb694a9" 679 | dependencies = [ 680 | "phf", 681 | "rust-stemmers", 682 | ] 683 | 684 | [[package]] 685 | name = "indexmap" 686 | version = "2.3.0" 687 | source = "registry+https://github.com/rust-lang/crates.io-index" 688 | checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" 689 | dependencies = [ 690 | "equivalent", 691 | "hashbrown", 692 | "serde", 693 | ] 694 | 695 | [[package]] 696 | name = "indoc" 697 | version = "1.0.9" 698 | source = "registry+https://github.com/rust-lang/crates.io-index" 699 | checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" 700 | 701 | [[package]] 702 | name = "inotify" 703 | version = "0.9.6" 704 | source = "registry+https://github.com/rust-lang/crates.io-index" 705 | checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" 706 | dependencies = [ 707 | "bitflags 1.3.2", 708 | "inotify-sys", 709 | "libc", 710 | ] 711 | 712 | [[package]] 713 | name = "inotify-sys" 714 | version = "0.1.5" 715 | source = "registry+https://github.com/rust-lang/crates.io-index" 716 | checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" 717 | dependencies = [ 718 | "libc", 719 | ] 720 | 721 | [[package]] 722 | name = "is-docker" 723 | version = "0.2.0" 724 | source = "registry+https://github.com/rust-lang/crates.io-index" 725 | checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" 726 | dependencies = [ 727 | "once_cell", 728 | ] 729 | 730 | [[package]] 731 | name = "is-macro" 732 | version = "0.3.5" 733 | source = "registry+https://github.com/rust-lang/crates.io-index" 734 | checksum = "59a85abdc13717906baccb5a1e435556ce0df215f242892f721dff62bf25288f" 735 | dependencies = [ 736 | "Inflector", 737 | "proc-macro2", 738 | "quote", 739 | "syn 2.0.72", 740 | ] 741 | 742 | [[package]] 743 | name = "is-wsl" 744 | version = "0.4.0" 745 | source = "registry+https://github.com/rust-lang/crates.io-index" 746 | checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" 747 | dependencies = [ 748 | "is-docker", 749 | "once_cell", 750 | ] 751 | 752 | [[package]] 753 | name = "is_terminal_polyfill" 754 | version = "1.70.1" 755 | source = "registry+https://github.com/rust-lang/crates.io-index" 756 | checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" 757 | 758 | [[package]] 759 | name = "itertools" 760 | version = "0.13.0" 761 | source = "registry+https://github.com/rust-lang/crates.io-index" 762 | checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" 763 | dependencies = [ 764 | "either", 765 | ] 766 | 767 | [[package]] 768 | name = "itoa" 769 | version = "1.0.11" 770 | source = "registry+https://github.com/rust-lang/crates.io-index" 771 | checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" 772 | 773 | [[package]] 774 | name = "jod-thread" 775 | version = "0.1.2" 776 | source = "registry+https://github.com/rust-lang/crates.io-index" 777 | checksum = "8b23360e99b8717f20aaa4598f5a6541efbe30630039fbc7706cf954a87947ae" 778 | 779 | [[package]] 780 | name = "js-sys" 781 | version = "0.3.69" 782 | source = "registry+https://github.com/rust-lang/crates.io-index" 783 | checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" 784 | dependencies = [ 785 | "wasm-bindgen", 786 | ] 787 | 788 | [[package]] 789 | name = "kqueue" 790 | version = "1.0.8" 791 | source = "registry+https://github.com/rust-lang/crates.io-index" 792 | checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" 793 | dependencies = [ 794 | "kqueue-sys", 795 | "libc", 796 | ] 797 | 798 | [[package]] 799 | name = "kqueue-sys" 800 | version = "1.0.4" 801 | source = "registry+https://github.com/rust-lang/crates.io-index" 802 | checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" 803 | dependencies = [ 804 | "bitflags 1.3.2", 805 | "libc", 806 | ] 807 | 808 | [[package]] 809 | name = "lazy_static" 810 | version = "1.5.0" 811 | source = "registry+https://github.com/rust-lang/crates.io-index" 812 | checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 813 | 814 | [[package]] 815 | name = "libc" 816 | version = "0.2.155" 817 | source = "registry+https://github.com/rust-lang/crates.io-index" 818 | checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" 819 | 820 | [[package]] 821 | name = "libcst" 822 | version = "1.4.0" 823 | source = "registry+https://github.com/rust-lang/crates.io-index" 824 | checksum = "10293a04a48e8b0cb2cc825a93b83090e527bffd3c897a0255ad7bc96079e920" 825 | dependencies = [ 826 | "chic", 827 | "libcst_derive", 828 | "memchr", 829 | "paste", 830 | "peg", 831 | "regex", 832 | "thiserror", 833 | ] 834 | 835 | [[package]] 836 | name = "libcst_derive" 837 | version = "1.4.0" 838 | source = "registry+https://github.com/rust-lang/crates.io-index" 839 | checksum = "a2ae40017ac09cd2c6a53504cb3c871c7f2b41466eac5bc66ba63f39073b467b" 840 | dependencies = [ 841 | "quote", 842 | "syn 2.0.72", 843 | ] 844 | 845 | [[package]] 846 | name = "libmimalloc-sys" 847 | version = "0.1.39" 848 | source = "registry+https://github.com/rust-lang/crates.io-index" 849 | checksum = "23aa6811d3bd4deb8a84dde645f943476d13b248d818edcf8ce0b2f37f036b44" 850 | dependencies = [ 851 | "cc", 852 | "libc", 853 | ] 854 | 855 | [[package]] 856 | name = "libredox" 857 | version = "0.1.3" 858 | source = "registry+https://github.com/rust-lang/crates.io-index" 859 | checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" 860 | dependencies = [ 861 | "bitflags 2.6.0", 862 | "libc", 863 | ] 864 | 865 | [[package]] 866 | name = "linux-raw-sys" 867 | version = "0.4.14" 868 | source = "registry+https://github.com/rust-lang/crates.io-index" 869 | checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" 870 | 871 | [[package]] 872 | name = "lock_api" 873 | version = "0.4.12" 874 | source = "registry+https://github.com/rust-lang/crates.io-index" 875 | checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 876 | dependencies = [ 877 | "autocfg", 878 | "scopeguard", 879 | ] 880 | 881 | [[package]] 882 | name = "log" 883 | version = "0.4.22" 884 | source = "registry+https://github.com/rust-lang/crates.io-index" 885 | checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" 886 | 887 | [[package]] 888 | name = "lsp-server" 889 | version = "0.7.6" 890 | source = "registry+https://github.com/rust-lang/crates.io-index" 891 | checksum = "248f65b78f6db5d8e1b1604b4098a28b43d21a8eb1deeca22b1c421b276c7095" 892 | dependencies = [ 893 | "crossbeam-channel", 894 | "log", 895 | "serde", 896 | "serde_json", 897 | ] 898 | 899 | [[package]] 900 | name = "lsp-types" 901 | version = "0.95.1" 902 | source = "git+https://github.com/astral-sh/lsp-types.git?rev=3512a9f#3512a9f33eadc5402cfab1b8f7340824c8ca1439" 903 | dependencies = [ 904 | "bitflags 1.3.2", 905 | "serde", 906 | "serde_json", 907 | "serde_repr", 908 | "url", 909 | ] 910 | 911 | [[package]] 912 | name = "matchers" 913 | version = "0.1.0" 914 | source = "registry+https://github.com/rust-lang/crates.io-index" 915 | checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" 916 | dependencies = [ 917 | "regex-automata 0.1.10", 918 | ] 919 | 920 | [[package]] 921 | name = "matches" 922 | version = "0.1.10" 923 | source = "registry+https://github.com/rust-lang/crates.io-index" 924 | checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" 925 | 926 | [[package]] 927 | name = "matchit" 928 | version = "0.8.4" 929 | source = "registry+https://github.com/rust-lang/crates.io-index" 930 | checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" 931 | 932 | [[package]] 933 | name = "memchr" 934 | version = "2.7.4" 935 | source = "registry+https://github.com/rust-lang/crates.io-index" 936 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 937 | 938 | [[package]] 939 | name = "memoffset" 940 | version = "0.9.1" 941 | source = "registry+https://github.com/rust-lang/crates.io-index" 942 | checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" 943 | dependencies = [ 944 | "autocfg", 945 | ] 946 | 947 | [[package]] 948 | name = "mimalloc" 949 | version = "0.1.43" 950 | source = "registry+https://github.com/rust-lang/crates.io-index" 951 | checksum = "68914350ae34959d83f732418d51e2427a794055d0b9529f48259ac07af65633" 952 | dependencies = [ 953 | "libmimalloc-sys", 954 | ] 955 | 956 | [[package]] 957 | name = "minimal-lexical" 958 | version = "0.2.1" 959 | source = "registry+https://github.com/rust-lang/crates.io-index" 960 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 961 | 962 | [[package]] 963 | name = "mio" 964 | version = "0.8.11" 965 | source = "registry+https://github.com/rust-lang/crates.io-index" 966 | checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" 967 | dependencies = [ 968 | "libc", 969 | "log", 970 | "wasi", 971 | "windows-sys 0.48.0", 972 | ] 973 | 974 | [[package]] 975 | name = "natord" 976 | version = "1.0.9" 977 | source = "registry+https://github.com/rust-lang/crates.io-index" 978 | checksum = "308d96db8debc727c3fd9744aac51751243420e46edf401010908da7f8d5e57c" 979 | 980 | [[package]] 981 | name = "newtype-uuid" 982 | version = "1.1.0" 983 | source = "registry+https://github.com/rust-lang/crates.io-index" 984 | checksum = "3526cb7c660872e401beaf3297f95f548ce3b4b4bdd8121b7c0713771d7c4a6e" 985 | dependencies = [ 986 | "uuid", 987 | ] 988 | 989 | [[package]] 990 | name = "nix" 991 | version = "0.28.0" 992 | source = "registry+https://github.com/rust-lang/crates.io-index" 993 | checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" 994 | dependencies = [ 995 | "bitflags 2.6.0", 996 | "cfg-if", 997 | "cfg_aliases", 998 | "libc", 999 | ] 1000 | 1001 | [[package]] 1002 | name = "nom" 1003 | version = "7.1.3" 1004 | source = "registry+https://github.com/rust-lang/crates.io-index" 1005 | checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 1006 | dependencies = [ 1007 | "memchr", 1008 | "minimal-lexical", 1009 | ] 1010 | 1011 | [[package]] 1012 | name = "notify" 1013 | version = "6.1.1" 1014 | source = "registry+https://github.com/rust-lang/crates.io-index" 1015 | checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" 1016 | dependencies = [ 1017 | "bitflags 2.6.0", 1018 | "crossbeam-channel", 1019 | "filetime", 1020 | "fsevent-sys", 1021 | "inotify", 1022 | "kqueue", 1023 | "libc", 1024 | "log", 1025 | "mio", 1026 | "walkdir", 1027 | "windows-sys 0.48.0", 1028 | ] 1029 | 1030 | [[package]] 1031 | name = "nu-ansi-term" 1032 | version = "0.46.0" 1033 | source = "registry+https://github.com/rust-lang/crates.io-index" 1034 | checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" 1035 | dependencies = [ 1036 | "overload", 1037 | "winapi", 1038 | ] 1039 | 1040 | [[package]] 1041 | name = "num-traits" 1042 | version = "0.2.19" 1043 | source = "registry+https://github.com/rust-lang/crates.io-index" 1044 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 1045 | dependencies = [ 1046 | "autocfg", 1047 | ] 1048 | 1049 | [[package]] 1050 | name = "once_cell" 1051 | version = "1.19.0" 1052 | source = "registry+https://github.com/rust-lang/crates.io-index" 1053 | checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 1054 | 1055 | [[package]] 1056 | name = "option-ext" 1057 | version = "0.2.0" 1058 | source = "registry+https://github.com/rust-lang/crates.io-index" 1059 | checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" 1060 | 1061 | [[package]] 1062 | name = "os_str_bytes" 1063 | version = "7.0.0" 1064 | source = "registry+https://github.com/rust-lang/crates.io-index" 1065 | checksum = "7ac44c994af577c799b1b4bd80dc214701e349873ad894d6cdf96f4f7526e0b9" 1066 | dependencies = [ 1067 | "memchr", 1068 | ] 1069 | 1070 | [[package]] 1071 | name = "overload" 1072 | version = "0.1.1" 1073 | source = "registry+https://github.com/rust-lang/crates.io-index" 1074 | checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" 1075 | 1076 | [[package]] 1077 | name = "parking_lot" 1078 | version = "0.12.3" 1079 | source = "registry+https://github.com/rust-lang/crates.io-index" 1080 | checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" 1081 | dependencies = [ 1082 | "lock_api", 1083 | "parking_lot_core", 1084 | ] 1085 | 1086 | [[package]] 1087 | name = "parking_lot_core" 1088 | version = "0.9.10" 1089 | source = "registry+https://github.com/rust-lang/crates.io-index" 1090 | checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" 1091 | dependencies = [ 1092 | "cfg-if", 1093 | "libc", 1094 | "redox_syscall 0.5.3", 1095 | "smallvec", 1096 | "windows-targets 0.52.6", 1097 | ] 1098 | 1099 | [[package]] 1100 | name = "paste" 1101 | version = "1.0.15" 1102 | source = "registry+https://github.com/rust-lang/crates.io-index" 1103 | checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" 1104 | 1105 | [[package]] 1106 | name = "path-absolutize" 1107 | version = "3.1.1" 1108 | source = "registry+https://github.com/rust-lang/crates.io-index" 1109 | checksum = "e4af381fe79fa195b4909485d99f73a80792331df0625188e707854f0b3383f5" 1110 | dependencies = [ 1111 | "path-dedot", 1112 | ] 1113 | 1114 | [[package]] 1115 | name = "path-dedot" 1116 | version = "3.1.1" 1117 | source = "registry+https://github.com/rust-lang/crates.io-index" 1118 | checksum = "07ba0ad7e047712414213ff67533e6dd477af0a4e1d14fb52343e53d30ea9397" 1119 | dependencies = [ 1120 | "once_cell", 1121 | ] 1122 | 1123 | [[package]] 1124 | name = "path-slash" 1125 | version = "0.2.1" 1126 | source = "registry+https://github.com/rust-lang/crates.io-index" 1127 | checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" 1128 | 1129 | [[package]] 1130 | name = "pathdiff" 1131 | version = "0.2.1" 1132 | source = "registry+https://github.com/rust-lang/crates.io-index" 1133 | checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" 1134 | 1135 | [[package]] 1136 | name = "peg" 1137 | version = "0.8.4" 1138 | source = "registry+https://github.com/rust-lang/crates.io-index" 1139 | checksum = "295283b02df346d1ef66052a757869b2876ac29a6bb0ac3f5f7cd44aebe40e8f" 1140 | dependencies = [ 1141 | "peg-macros", 1142 | "peg-runtime", 1143 | ] 1144 | 1145 | [[package]] 1146 | name = "peg-macros" 1147 | version = "0.8.4" 1148 | source = "registry+https://github.com/rust-lang/crates.io-index" 1149 | checksum = "bdad6a1d9cf116a059582ce415d5f5566aabcd4008646779dab7fdc2a9a9d426" 1150 | dependencies = [ 1151 | "peg-runtime", 1152 | "proc-macro2", 1153 | "quote", 1154 | ] 1155 | 1156 | [[package]] 1157 | name = "peg-runtime" 1158 | version = "0.8.3" 1159 | source = "registry+https://github.com/rust-lang/crates.io-index" 1160 | checksum = "e3aeb8f54c078314c2065ee649a7241f46b9d8e418e1a9581ba0546657d7aa3a" 1161 | 1162 | [[package]] 1163 | name = "pep440_rs" 1164 | version = "0.4.0" 1165 | source = "registry+https://github.com/rust-lang/crates.io-index" 1166 | checksum = "e0c29f9c43de378b4e4e0cd7dbcce0e5cfb80443de8c05620368b2948bc936a1" 1167 | dependencies = [ 1168 | "once_cell", 1169 | "regex", 1170 | "serde", 1171 | "unicode-width", 1172 | ] 1173 | 1174 | [[package]] 1175 | name = "pep440_rs" 1176 | version = "0.6.6" 1177 | source = "registry+https://github.com/rust-lang/crates.io-index" 1178 | checksum = "466eada3179c2e069ca897b99006cbb33f816290eaeec62464eea907e22ae385" 1179 | dependencies = [ 1180 | "once_cell", 1181 | "serde", 1182 | "unicode-width", 1183 | "unscanny", 1184 | ] 1185 | 1186 | [[package]] 1187 | name = "pep508_rs" 1188 | version = "0.3.0" 1189 | source = "registry+https://github.com/rust-lang/crates.io-index" 1190 | checksum = "910c513bea0f4f833122321c0f20e8c704e01de98692f6989c2ec21f43d88b1e" 1191 | dependencies = [ 1192 | "once_cell", 1193 | "pep440_rs 0.4.0", 1194 | "regex", 1195 | "serde", 1196 | "thiserror", 1197 | "tracing", 1198 | "unicode-width", 1199 | "url", 1200 | ] 1201 | 1202 | [[package]] 1203 | name = "percent-encoding" 1204 | version = "2.3.1" 1205 | source = "registry+https://github.com/rust-lang/crates.io-index" 1206 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 1207 | 1208 | [[package]] 1209 | name = "phf" 1210 | version = "0.11.2" 1211 | source = "registry+https://github.com/rust-lang/crates.io-index" 1212 | checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" 1213 | dependencies = [ 1214 | "phf_shared", 1215 | ] 1216 | 1217 | [[package]] 1218 | name = "phf_codegen" 1219 | version = "0.11.2" 1220 | source = "registry+https://github.com/rust-lang/crates.io-index" 1221 | checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" 1222 | dependencies = [ 1223 | "phf_generator", 1224 | "phf_shared", 1225 | ] 1226 | 1227 | [[package]] 1228 | name = "phf_generator" 1229 | version = "0.11.2" 1230 | source = "registry+https://github.com/rust-lang/crates.io-index" 1231 | checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" 1232 | dependencies = [ 1233 | "phf_shared", 1234 | "rand", 1235 | ] 1236 | 1237 | [[package]] 1238 | name = "phf_shared" 1239 | version = "0.11.2" 1240 | source = "registry+https://github.com/rust-lang/crates.io-index" 1241 | checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" 1242 | dependencies = [ 1243 | "siphasher", 1244 | ] 1245 | 1246 | [[package]] 1247 | name = "pin-project-lite" 1248 | version = "0.2.14" 1249 | source = "registry+https://github.com/rust-lang/crates.io-index" 1250 | checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" 1251 | 1252 | [[package]] 1253 | name = "ppv-lite86" 1254 | version = "0.2.20" 1255 | source = "registry+https://github.com/rust-lang/crates.io-index" 1256 | checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" 1257 | dependencies = [ 1258 | "zerocopy", 1259 | ] 1260 | 1261 | [[package]] 1262 | name = "proc-macro2" 1263 | version = "1.0.86" 1264 | source = "registry+https://github.com/rust-lang/crates.io-index" 1265 | checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" 1266 | dependencies = [ 1267 | "unicode-ident", 1268 | ] 1269 | 1270 | [[package]] 1271 | name = "pyo3" 1272 | version = "0.19.2" 1273 | source = "registry+https://github.com/rust-lang/crates.io-index" 1274 | checksum = "e681a6cfdc4adcc93b4d3cf993749a4552018ee0a9b65fc0ccfad74352c72a38" 1275 | dependencies = [ 1276 | "cfg-if", 1277 | "indoc", 1278 | "libc", 1279 | "memoffset", 1280 | "parking_lot", 1281 | "pyo3-build-config", 1282 | "pyo3-ffi", 1283 | "pyo3-macros", 1284 | "unindent", 1285 | ] 1286 | 1287 | [[package]] 1288 | name = "pyo3-build-config" 1289 | version = "0.19.2" 1290 | source = "registry+https://github.com/rust-lang/crates.io-index" 1291 | checksum = "076c73d0bc438f7a4ef6fdd0c3bb4732149136abd952b110ac93e4edb13a6ba5" 1292 | dependencies = [ 1293 | "once_cell", 1294 | "target-lexicon", 1295 | ] 1296 | 1297 | [[package]] 1298 | name = "pyo3-ffi" 1299 | version = "0.19.2" 1300 | source = "registry+https://github.com/rust-lang/crates.io-index" 1301 | checksum = "e53cee42e77ebe256066ba8aa77eff722b3bb91f3419177cf4cd0f304d3284d9" 1302 | dependencies = [ 1303 | "libc", 1304 | "pyo3-build-config", 1305 | ] 1306 | 1307 | [[package]] 1308 | name = "pyo3-macros" 1309 | version = "0.19.2" 1310 | source = "registry+https://github.com/rust-lang/crates.io-index" 1311 | checksum = "dfeb4c99597e136528c6dd7d5e3de5434d1ceaf487436a3f03b2d56b6fc9efd1" 1312 | dependencies = [ 1313 | "proc-macro2", 1314 | "pyo3-macros-backend", 1315 | "quote", 1316 | "syn 1.0.109", 1317 | ] 1318 | 1319 | [[package]] 1320 | name = "pyo3-macros-backend" 1321 | version = "0.19.2" 1322 | source = "registry+https://github.com/rust-lang/crates.io-index" 1323 | checksum = "947dc12175c254889edc0c02e399476c2f652b4b9ebd123aa655c224de259536" 1324 | dependencies = [ 1325 | "proc-macro2", 1326 | "quote", 1327 | "syn 1.0.109", 1328 | ] 1329 | 1330 | [[package]] 1331 | name = "pyproject-toml" 1332 | version = "0.9.0" 1333 | source = "registry+https://github.com/rust-lang/crates.io-index" 1334 | checksum = "95c3dd745f99aa3c554b7bb00859f7d18c2f1d6afd749ccc86d60b61e702abd9" 1335 | dependencies = [ 1336 | "indexmap", 1337 | "pep440_rs 0.4.0", 1338 | "pep508_rs", 1339 | "serde", 1340 | "toml", 1341 | ] 1342 | 1343 | [[package]] 1344 | name = "quick-junit" 1345 | version = "0.4.0" 1346 | source = "registry+https://github.com/rust-lang/crates.io-index" 1347 | checksum = "cfc1a6a5406a114913df2df8507998c755311b55b78584bed5f6e88f6417c4d4" 1348 | dependencies = [ 1349 | "chrono", 1350 | "indexmap", 1351 | "newtype-uuid", 1352 | "quick-xml", 1353 | "strip-ansi-escapes", 1354 | "thiserror", 1355 | "uuid", 1356 | ] 1357 | 1358 | [[package]] 1359 | name = "quick-xml" 1360 | version = "0.31.0" 1361 | source = "registry+https://github.com/rust-lang/crates.io-index" 1362 | checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" 1363 | dependencies = [ 1364 | "memchr", 1365 | ] 1366 | 1367 | [[package]] 1368 | name = "quote" 1369 | version = "1.0.36" 1370 | source = "registry+https://github.com/rust-lang/crates.io-index" 1371 | checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" 1372 | dependencies = [ 1373 | "proc-macro2", 1374 | ] 1375 | 1376 | [[package]] 1377 | name = "rand" 1378 | version = "0.8.5" 1379 | source = "registry+https://github.com/rust-lang/crates.io-index" 1380 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1381 | dependencies = [ 1382 | "libc", 1383 | "rand_chacha", 1384 | "rand_core", 1385 | ] 1386 | 1387 | [[package]] 1388 | name = "rand_chacha" 1389 | version = "0.3.1" 1390 | source = "registry+https://github.com/rust-lang/crates.io-index" 1391 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1392 | dependencies = [ 1393 | "ppv-lite86", 1394 | "rand_core", 1395 | ] 1396 | 1397 | [[package]] 1398 | name = "rand_core" 1399 | version = "0.6.4" 1400 | source = "registry+https://github.com/rust-lang/crates.io-index" 1401 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1402 | dependencies = [ 1403 | "getrandom", 1404 | ] 1405 | 1406 | [[package]] 1407 | name = "rayon" 1408 | version = "1.10.0" 1409 | source = "registry+https://github.com/rust-lang/crates.io-index" 1410 | checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" 1411 | dependencies = [ 1412 | "either", 1413 | "rayon-core", 1414 | ] 1415 | 1416 | [[package]] 1417 | name = "rayon-core" 1418 | version = "1.12.1" 1419 | source = "registry+https://github.com/rust-lang/crates.io-index" 1420 | checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" 1421 | dependencies = [ 1422 | "crossbeam-deque", 1423 | "crossbeam-utils", 1424 | ] 1425 | 1426 | [[package]] 1427 | name = "redox_syscall" 1428 | version = "0.4.1" 1429 | source = "registry+https://github.com/rust-lang/crates.io-index" 1430 | checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" 1431 | dependencies = [ 1432 | "bitflags 1.3.2", 1433 | ] 1434 | 1435 | [[package]] 1436 | name = "redox_syscall" 1437 | version = "0.5.3" 1438 | source = "registry+https://github.com/rust-lang/crates.io-index" 1439 | checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" 1440 | dependencies = [ 1441 | "bitflags 2.6.0", 1442 | ] 1443 | 1444 | [[package]] 1445 | name = "redox_users" 1446 | version = "0.4.5" 1447 | source = "registry+https://github.com/rust-lang/crates.io-index" 1448 | checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" 1449 | dependencies = [ 1450 | "getrandom", 1451 | "libredox", 1452 | "thiserror", 1453 | ] 1454 | 1455 | [[package]] 1456 | name = "regex" 1457 | version = "1.10.6" 1458 | source = "registry+https://github.com/rust-lang/crates.io-index" 1459 | checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" 1460 | dependencies = [ 1461 | "aho-corasick", 1462 | "memchr", 1463 | "regex-automata 0.4.7", 1464 | "regex-syntax 0.8.4", 1465 | ] 1466 | 1467 | [[package]] 1468 | name = "regex-automata" 1469 | version = "0.1.10" 1470 | source = "registry+https://github.com/rust-lang/crates.io-index" 1471 | checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" 1472 | dependencies = [ 1473 | "regex-syntax 0.6.29", 1474 | ] 1475 | 1476 | [[package]] 1477 | name = "regex-automata" 1478 | version = "0.4.7" 1479 | source = "registry+https://github.com/rust-lang/crates.io-index" 1480 | checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" 1481 | dependencies = [ 1482 | "aho-corasick", 1483 | "memchr", 1484 | "regex-syntax 0.8.4", 1485 | ] 1486 | 1487 | [[package]] 1488 | name = "regex-syntax" 1489 | version = "0.6.29" 1490 | source = "registry+https://github.com/rust-lang/crates.io-index" 1491 | checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" 1492 | 1493 | [[package]] 1494 | name = "regex-syntax" 1495 | version = "0.8.4" 1496 | source = "registry+https://github.com/rust-lang/crates.io-index" 1497 | checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" 1498 | 1499 | [[package]] 1500 | name = "ruff" 1501 | version = "0.4.10" 1502 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1503 | dependencies = [ 1504 | "anyhow", 1505 | "argfile", 1506 | "bincode", 1507 | "bitflags 2.6.0", 1508 | "cachedir", 1509 | "chrono", 1510 | "clap", 1511 | "clap_complete_command", 1512 | "clearscreen", 1513 | "colored", 1514 | "filetime", 1515 | "ignore", 1516 | "is-macro", 1517 | "itertools", 1518 | "log", 1519 | "mimalloc", 1520 | "notify", 1521 | "path-absolutize", 1522 | "rayon", 1523 | "regex", 1524 | "ruff_cache", 1525 | "ruff_diagnostics", 1526 | "ruff_linter", 1527 | "ruff_macros", 1528 | "ruff_notebook", 1529 | "ruff_python_ast", 1530 | "ruff_python_formatter", 1531 | "ruff_server", 1532 | "ruff_source_file", 1533 | "ruff_text_size", 1534 | "ruff_workspace", 1535 | "rustc-hash", 1536 | "serde", 1537 | "serde_json", 1538 | "shellexpand", 1539 | "strum", 1540 | "tempfile", 1541 | "thiserror", 1542 | "tikv-jemallocator", 1543 | "toml", 1544 | "tracing", 1545 | "walkdir", 1546 | "wild", 1547 | ] 1548 | 1549 | [[package]] 1550 | name = "ruff-api" 1551 | version = "0.1.0" 1552 | dependencies = [ 1553 | "glob", 1554 | "pyo3", 1555 | "ruff", 1556 | "ruff_formatter", 1557 | "ruff_linter", 1558 | "ruff_python_ast", 1559 | "ruff_python_formatter", 1560 | "ruff_workspace", 1561 | "rustc-hash", 1562 | ] 1563 | 1564 | [[package]] 1565 | name = "ruff_cache" 1566 | version = "0.0.0" 1567 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1568 | dependencies = [ 1569 | "filetime", 1570 | "glob", 1571 | "globset", 1572 | "itertools", 1573 | "regex", 1574 | "seahash", 1575 | ] 1576 | 1577 | [[package]] 1578 | name = "ruff_diagnostics" 1579 | version = "0.0.0" 1580 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1581 | dependencies = [ 1582 | "anyhow", 1583 | "is-macro", 1584 | "log", 1585 | "ruff_text_size", 1586 | "serde", 1587 | ] 1588 | 1589 | [[package]] 1590 | name = "ruff_formatter" 1591 | version = "0.0.0" 1592 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1593 | dependencies = [ 1594 | "drop_bomb", 1595 | "ruff_cache", 1596 | "ruff_macros", 1597 | "ruff_text_size", 1598 | "rustc-hash", 1599 | "serde", 1600 | "static_assertions", 1601 | "tracing", 1602 | "unicode-width", 1603 | ] 1604 | 1605 | [[package]] 1606 | name = "ruff_index" 1607 | version = "0.0.0" 1608 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1609 | dependencies = [ 1610 | "ruff_macros", 1611 | ] 1612 | 1613 | [[package]] 1614 | name = "ruff_linter" 1615 | version = "0.4.10" 1616 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1617 | dependencies = [ 1618 | "aho-corasick", 1619 | "annotate-snippets 0.9.2", 1620 | "anyhow", 1621 | "bitflags 2.6.0", 1622 | "chrono", 1623 | "clap", 1624 | "colored", 1625 | "fern", 1626 | "glob", 1627 | "globset", 1628 | "imperative", 1629 | "is-macro", 1630 | "is-wsl", 1631 | "itertools", 1632 | "libcst", 1633 | "log", 1634 | "memchr", 1635 | "natord", 1636 | "once_cell", 1637 | "path-absolutize", 1638 | "pathdiff", 1639 | "pep440_rs 0.6.6", 1640 | "pyproject-toml", 1641 | "quick-junit", 1642 | "regex", 1643 | "ruff_cache", 1644 | "ruff_diagnostics", 1645 | "ruff_macros", 1646 | "ruff_notebook", 1647 | "ruff_python_ast", 1648 | "ruff_python_codegen", 1649 | "ruff_python_index", 1650 | "ruff_python_literal", 1651 | "ruff_python_parser", 1652 | "ruff_python_semantic", 1653 | "ruff_python_stdlib", 1654 | "ruff_python_trivia", 1655 | "ruff_source_file", 1656 | "ruff_text_size", 1657 | "rustc-hash", 1658 | "serde", 1659 | "serde_json", 1660 | "similar", 1661 | "smallvec", 1662 | "strum", 1663 | "strum_macros", 1664 | "thiserror", 1665 | "toml", 1666 | "typed-arena", 1667 | "unicode-width", 1668 | "unicode_names2", 1669 | "url", 1670 | ] 1671 | 1672 | [[package]] 1673 | name = "ruff_macros" 1674 | version = "0.0.0" 1675 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1676 | dependencies = [ 1677 | "itertools", 1678 | "proc-macro2", 1679 | "quote", 1680 | "ruff_python_trivia", 1681 | "syn 2.0.72", 1682 | ] 1683 | 1684 | [[package]] 1685 | name = "ruff_notebook" 1686 | version = "0.0.0" 1687 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1688 | dependencies = [ 1689 | "anyhow", 1690 | "itertools", 1691 | "once_cell", 1692 | "rand", 1693 | "ruff_diagnostics", 1694 | "ruff_source_file", 1695 | "ruff_text_size", 1696 | "serde", 1697 | "serde_json", 1698 | "serde_with", 1699 | "thiserror", 1700 | "uuid", 1701 | ] 1702 | 1703 | [[package]] 1704 | name = "ruff_python_ast" 1705 | version = "0.0.0" 1706 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1707 | dependencies = [ 1708 | "aho-corasick", 1709 | "bitflags 2.6.0", 1710 | "is-macro", 1711 | "itertools", 1712 | "once_cell", 1713 | "ruff_python_trivia", 1714 | "ruff_source_file", 1715 | "ruff_text_size", 1716 | "rustc-hash", 1717 | "serde", 1718 | ] 1719 | 1720 | [[package]] 1721 | name = "ruff_python_codegen" 1722 | version = "0.0.0" 1723 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1724 | dependencies = [ 1725 | "once_cell", 1726 | "ruff_python_ast", 1727 | "ruff_python_literal", 1728 | "ruff_python_parser", 1729 | "ruff_source_file", 1730 | "ruff_text_size", 1731 | ] 1732 | 1733 | [[package]] 1734 | name = "ruff_python_formatter" 1735 | version = "0.0.0" 1736 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1737 | dependencies = [ 1738 | "anyhow", 1739 | "clap", 1740 | "countme", 1741 | "itertools", 1742 | "memchr", 1743 | "once_cell", 1744 | "regex", 1745 | "ruff_cache", 1746 | "ruff_formatter", 1747 | "ruff_macros", 1748 | "ruff_python_ast", 1749 | "ruff_python_parser", 1750 | "ruff_python_trivia", 1751 | "ruff_source_file", 1752 | "ruff_text_size", 1753 | "rustc-hash", 1754 | "serde", 1755 | "smallvec", 1756 | "static_assertions", 1757 | "thiserror", 1758 | "tracing", 1759 | ] 1760 | 1761 | [[package]] 1762 | name = "ruff_python_index" 1763 | version = "0.0.0" 1764 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1765 | dependencies = [ 1766 | "ruff_python_ast", 1767 | "ruff_python_parser", 1768 | "ruff_python_trivia", 1769 | "ruff_source_file", 1770 | "ruff_text_size", 1771 | ] 1772 | 1773 | [[package]] 1774 | name = "ruff_python_literal" 1775 | version = "0.0.0" 1776 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1777 | dependencies = [ 1778 | "bitflags 2.6.0", 1779 | "itertools", 1780 | "ruff_python_ast", 1781 | "unic-ucd-category", 1782 | ] 1783 | 1784 | [[package]] 1785 | name = "ruff_python_parser" 1786 | version = "0.0.0" 1787 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1788 | dependencies = [ 1789 | "bitflags 2.6.0", 1790 | "bstr", 1791 | "memchr", 1792 | "ruff_python_ast", 1793 | "ruff_python_trivia", 1794 | "ruff_text_size", 1795 | "rustc-hash", 1796 | "static_assertions", 1797 | "unicode-ident", 1798 | "unicode-normalization", 1799 | "unicode_names2", 1800 | ] 1801 | 1802 | [[package]] 1803 | name = "ruff_python_semantic" 1804 | version = "0.0.0" 1805 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1806 | dependencies = [ 1807 | "bitflags 2.6.0", 1808 | "is-macro", 1809 | "ruff_index", 1810 | "ruff_python_ast", 1811 | "ruff_python_stdlib", 1812 | "ruff_source_file", 1813 | "ruff_text_size", 1814 | "rustc-hash", 1815 | ] 1816 | 1817 | [[package]] 1818 | name = "ruff_python_stdlib" 1819 | version = "0.0.0" 1820 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1821 | dependencies = [ 1822 | "unicode-ident", 1823 | ] 1824 | 1825 | [[package]] 1826 | name = "ruff_python_trivia" 1827 | version = "0.0.0" 1828 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1829 | dependencies = [ 1830 | "itertools", 1831 | "ruff_source_file", 1832 | "ruff_text_size", 1833 | "unicode-ident", 1834 | ] 1835 | 1836 | [[package]] 1837 | name = "ruff_server" 1838 | version = "0.2.2" 1839 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1840 | dependencies = [ 1841 | "anyhow", 1842 | "crossbeam", 1843 | "globset", 1844 | "jod-thread", 1845 | "libc", 1846 | "lsp-server", 1847 | "lsp-types", 1848 | "regex", 1849 | "ruff_diagnostics", 1850 | "ruff_formatter", 1851 | "ruff_linter", 1852 | "ruff_notebook", 1853 | "ruff_python_ast", 1854 | "ruff_python_codegen", 1855 | "ruff_python_formatter", 1856 | "ruff_python_index", 1857 | "ruff_python_parser", 1858 | "ruff_source_file", 1859 | "ruff_text_size", 1860 | "ruff_workspace", 1861 | "rustc-hash", 1862 | "serde", 1863 | "serde_json", 1864 | "shellexpand", 1865 | "tracing", 1866 | "tracing-subscriber", 1867 | "walkdir", 1868 | ] 1869 | 1870 | [[package]] 1871 | name = "ruff_source_file" 1872 | version = "0.0.0" 1873 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1874 | dependencies = [ 1875 | "memchr", 1876 | "once_cell", 1877 | "ruff_text_size", 1878 | "serde", 1879 | ] 1880 | 1881 | [[package]] 1882 | name = "ruff_text_size" 1883 | version = "0.0.0" 1884 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1885 | dependencies = [ 1886 | "serde", 1887 | ] 1888 | 1889 | [[package]] 1890 | name = "ruff_workspace" 1891 | version = "0.0.0" 1892 | source = "git+https://github.com/astral-sh/ruff.git?tag=v0.4.10#b54922fd7394c36cdc390fd21aaee99206ebc361" 1893 | dependencies = [ 1894 | "anyhow", 1895 | "colored", 1896 | "dirs 5.0.1", 1897 | "glob", 1898 | "globset", 1899 | "ignore", 1900 | "is-macro", 1901 | "itertools", 1902 | "log", 1903 | "matchit", 1904 | "path-absolutize", 1905 | "path-slash", 1906 | "pep440_rs 0.6.6", 1907 | "regex", 1908 | "ruff_cache", 1909 | "ruff_formatter", 1910 | "ruff_linter", 1911 | "ruff_macros", 1912 | "ruff_python_ast", 1913 | "ruff_python_formatter", 1914 | "ruff_source_file", 1915 | "rustc-hash", 1916 | "serde", 1917 | "shellexpand", 1918 | "strum", 1919 | "toml", 1920 | ] 1921 | 1922 | [[package]] 1923 | name = "rust-stemmers" 1924 | version = "1.2.0" 1925 | source = "registry+https://github.com/rust-lang/crates.io-index" 1926 | checksum = "e46a2036019fdb888131db7a4c847a1063a7493f971ed94ea82c67eada63ca54" 1927 | dependencies = [ 1928 | "serde", 1929 | "serde_derive", 1930 | ] 1931 | 1932 | [[package]] 1933 | name = "rustc-hash" 1934 | version = "1.1.0" 1935 | source = "registry+https://github.com/rust-lang/crates.io-index" 1936 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 1937 | 1938 | [[package]] 1939 | name = "rustix" 1940 | version = "0.38.34" 1941 | source = "registry+https://github.com/rust-lang/crates.io-index" 1942 | checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" 1943 | dependencies = [ 1944 | "bitflags 2.6.0", 1945 | "errno", 1946 | "libc", 1947 | "linux-raw-sys", 1948 | "windows-sys 0.52.0", 1949 | ] 1950 | 1951 | [[package]] 1952 | name = "rustversion" 1953 | version = "1.0.17" 1954 | source = "registry+https://github.com/rust-lang/crates.io-index" 1955 | checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" 1956 | 1957 | [[package]] 1958 | name = "ryu" 1959 | version = "1.0.18" 1960 | source = "registry+https://github.com/rust-lang/crates.io-index" 1961 | checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" 1962 | 1963 | [[package]] 1964 | name = "same-file" 1965 | version = "1.0.6" 1966 | source = "registry+https://github.com/rust-lang/crates.io-index" 1967 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 1968 | dependencies = [ 1969 | "winapi-util", 1970 | ] 1971 | 1972 | [[package]] 1973 | name = "scopeguard" 1974 | version = "1.2.0" 1975 | source = "registry+https://github.com/rust-lang/crates.io-index" 1976 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 1977 | 1978 | [[package]] 1979 | name = "seahash" 1980 | version = "4.1.0" 1981 | source = "registry+https://github.com/rust-lang/crates.io-index" 1982 | checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" 1983 | 1984 | [[package]] 1985 | name = "serde" 1986 | version = "1.0.204" 1987 | source = "registry+https://github.com/rust-lang/crates.io-index" 1988 | checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" 1989 | dependencies = [ 1990 | "serde_derive", 1991 | ] 1992 | 1993 | [[package]] 1994 | name = "serde_derive" 1995 | version = "1.0.204" 1996 | source = "registry+https://github.com/rust-lang/crates.io-index" 1997 | checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" 1998 | dependencies = [ 1999 | "proc-macro2", 2000 | "quote", 2001 | "syn 2.0.72", 2002 | ] 2003 | 2004 | [[package]] 2005 | name = "serde_json" 2006 | version = "1.0.122" 2007 | source = "registry+https://github.com/rust-lang/crates.io-index" 2008 | checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" 2009 | dependencies = [ 2010 | "itoa", 2011 | "memchr", 2012 | "ryu", 2013 | "serde", 2014 | ] 2015 | 2016 | [[package]] 2017 | name = "serde_repr" 2018 | version = "0.1.19" 2019 | source = "registry+https://github.com/rust-lang/crates.io-index" 2020 | checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" 2021 | dependencies = [ 2022 | "proc-macro2", 2023 | "quote", 2024 | "syn 2.0.72", 2025 | ] 2026 | 2027 | [[package]] 2028 | name = "serde_spanned" 2029 | version = "0.6.7" 2030 | source = "registry+https://github.com/rust-lang/crates.io-index" 2031 | checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" 2032 | dependencies = [ 2033 | "serde", 2034 | ] 2035 | 2036 | [[package]] 2037 | name = "serde_with" 2038 | version = "3.9.0" 2039 | source = "registry+https://github.com/rust-lang/crates.io-index" 2040 | checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" 2041 | dependencies = [ 2042 | "serde", 2043 | "serde_derive", 2044 | "serde_with_macros", 2045 | ] 2046 | 2047 | [[package]] 2048 | name = "serde_with_macros" 2049 | version = "3.9.0" 2050 | source = "registry+https://github.com/rust-lang/crates.io-index" 2051 | checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" 2052 | dependencies = [ 2053 | "darling", 2054 | "proc-macro2", 2055 | "quote", 2056 | "syn 2.0.72", 2057 | ] 2058 | 2059 | [[package]] 2060 | name = "sharded-slab" 2061 | version = "0.1.7" 2062 | source = "registry+https://github.com/rust-lang/crates.io-index" 2063 | checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" 2064 | dependencies = [ 2065 | "lazy_static", 2066 | ] 2067 | 2068 | [[package]] 2069 | name = "shellexpand" 2070 | version = "3.1.0" 2071 | source = "registry+https://github.com/rust-lang/crates.io-index" 2072 | checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" 2073 | dependencies = [ 2074 | "dirs 5.0.1", 2075 | ] 2076 | 2077 | [[package]] 2078 | name = "similar" 2079 | version = "2.6.0" 2080 | source = "registry+https://github.com/rust-lang/crates.io-index" 2081 | checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" 2082 | 2083 | [[package]] 2084 | name = "siphasher" 2085 | version = "0.3.11" 2086 | source = "registry+https://github.com/rust-lang/crates.io-index" 2087 | checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" 2088 | 2089 | [[package]] 2090 | name = "smallvec" 2091 | version = "1.13.2" 2092 | source = "registry+https://github.com/rust-lang/crates.io-index" 2093 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 2094 | 2095 | [[package]] 2096 | name = "static_assertions" 2097 | version = "1.1.0" 2098 | source = "registry+https://github.com/rust-lang/crates.io-index" 2099 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 2100 | 2101 | [[package]] 2102 | name = "strip-ansi-escapes" 2103 | version = "0.2.0" 2104 | source = "registry+https://github.com/rust-lang/crates.io-index" 2105 | checksum = "55ff8ef943b384c414f54aefa961dd2bd853add74ec75e7ac74cf91dba62bcfa" 2106 | dependencies = [ 2107 | "vte", 2108 | ] 2109 | 2110 | [[package]] 2111 | name = "strsim" 2112 | version = "0.11.1" 2113 | source = "registry+https://github.com/rust-lang/crates.io-index" 2114 | checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 2115 | 2116 | [[package]] 2117 | name = "strum" 2118 | version = "0.26.3" 2119 | source = "registry+https://github.com/rust-lang/crates.io-index" 2120 | checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" 2121 | dependencies = [ 2122 | "strum_macros", 2123 | ] 2124 | 2125 | [[package]] 2126 | name = "strum_macros" 2127 | version = "0.26.4" 2128 | source = "registry+https://github.com/rust-lang/crates.io-index" 2129 | checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" 2130 | dependencies = [ 2131 | "heck", 2132 | "proc-macro2", 2133 | "quote", 2134 | "rustversion", 2135 | "syn 2.0.72", 2136 | ] 2137 | 2138 | [[package]] 2139 | name = "syn" 2140 | version = "1.0.109" 2141 | source = "registry+https://github.com/rust-lang/crates.io-index" 2142 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 2143 | dependencies = [ 2144 | "proc-macro2", 2145 | "quote", 2146 | "unicode-ident", 2147 | ] 2148 | 2149 | [[package]] 2150 | name = "syn" 2151 | version = "2.0.72" 2152 | source = "registry+https://github.com/rust-lang/crates.io-index" 2153 | checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" 2154 | dependencies = [ 2155 | "proc-macro2", 2156 | "quote", 2157 | "unicode-ident", 2158 | ] 2159 | 2160 | [[package]] 2161 | name = "target-lexicon" 2162 | version = "0.12.16" 2163 | source = "registry+https://github.com/rust-lang/crates.io-index" 2164 | checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" 2165 | 2166 | [[package]] 2167 | name = "tempfile" 2168 | version = "3.11.0" 2169 | source = "registry+https://github.com/rust-lang/crates.io-index" 2170 | checksum = "b8fcd239983515c23a32fb82099f97d0b11b8c72f654ed659363a95c3dad7a53" 2171 | dependencies = [ 2172 | "cfg-if", 2173 | "fastrand", 2174 | "once_cell", 2175 | "rustix", 2176 | "windows-sys 0.52.0", 2177 | ] 2178 | 2179 | [[package]] 2180 | name = "terminal_size" 2181 | version = "0.3.0" 2182 | source = "registry+https://github.com/rust-lang/crates.io-index" 2183 | checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" 2184 | dependencies = [ 2185 | "rustix", 2186 | "windows-sys 0.48.0", 2187 | ] 2188 | 2189 | [[package]] 2190 | name = "terminfo" 2191 | version = "0.8.0" 2192 | source = "registry+https://github.com/rust-lang/crates.io-index" 2193 | checksum = "666cd3a6681775d22b200409aad3b089c5b99fb11ecdd8a204d9d62f8148498f" 2194 | dependencies = [ 2195 | "dirs 4.0.0", 2196 | "fnv", 2197 | "nom", 2198 | "phf", 2199 | "phf_codegen", 2200 | ] 2201 | 2202 | [[package]] 2203 | name = "thiserror" 2204 | version = "1.0.63" 2205 | source = "registry+https://github.com/rust-lang/crates.io-index" 2206 | checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" 2207 | dependencies = [ 2208 | "thiserror-impl", 2209 | ] 2210 | 2211 | [[package]] 2212 | name = "thiserror-impl" 2213 | version = "1.0.63" 2214 | source = "registry+https://github.com/rust-lang/crates.io-index" 2215 | checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" 2216 | dependencies = [ 2217 | "proc-macro2", 2218 | "quote", 2219 | "syn 2.0.72", 2220 | ] 2221 | 2222 | [[package]] 2223 | name = "thread_local" 2224 | version = "1.1.8" 2225 | source = "registry+https://github.com/rust-lang/crates.io-index" 2226 | checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" 2227 | dependencies = [ 2228 | "cfg-if", 2229 | "once_cell", 2230 | ] 2231 | 2232 | [[package]] 2233 | name = "tikv-jemalloc-sys" 2234 | version = "0.5.4+5.3.0-patched" 2235 | source = "registry+https://github.com/rust-lang/crates.io-index" 2236 | checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" 2237 | dependencies = [ 2238 | "cc", 2239 | "libc", 2240 | ] 2241 | 2242 | [[package]] 2243 | name = "tikv-jemallocator" 2244 | version = "0.5.4" 2245 | source = "registry+https://github.com/rust-lang/crates.io-index" 2246 | checksum = "965fe0c26be5c56c94e38ba547249074803efd52adfb66de62107d95aab3eaca" 2247 | dependencies = [ 2248 | "libc", 2249 | "tikv-jemalloc-sys", 2250 | ] 2251 | 2252 | [[package]] 2253 | name = "tinyvec" 2254 | version = "1.8.0" 2255 | source = "registry+https://github.com/rust-lang/crates.io-index" 2256 | checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" 2257 | dependencies = [ 2258 | "tinyvec_macros", 2259 | ] 2260 | 2261 | [[package]] 2262 | name = "tinyvec_macros" 2263 | version = "0.1.1" 2264 | source = "registry+https://github.com/rust-lang/crates.io-index" 2265 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 2266 | 2267 | [[package]] 2268 | name = "toml" 2269 | version = "0.8.19" 2270 | source = "registry+https://github.com/rust-lang/crates.io-index" 2271 | checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" 2272 | dependencies = [ 2273 | "serde", 2274 | "serde_spanned", 2275 | "toml_datetime", 2276 | "toml_edit", 2277 | ] 2278 | 2279 | [[package]] 2280 | name = "toml_datetime" 2281 | version = "0.6.8" 2282 | source = "registry+https://github.com/rust-lang/crates.io-index" 2283 | checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" 2284 | dependencies = [ 2285 | "serde", 2286 | ] 2287 | 2288 | [[package]] 2289 | name = "toml_edit" 2290 | version = "0.22.20" 2291 | source = "registry+https://github.com/rust-lang/crates.io-index" 2292 | checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" 2293 | dependencies = [ 2294 | "indexmap", 2295 | "serde", 2296 | "serde_spanned", 2297 | "toml_datetime", 2298 | "winnow", 2299 | ] 2300 | 2301 | [[package]] 2302 | name = "tracing" 2303 | version = "0.1.40" 2304 | source = "registry+https://github.com/rust-lang/crates.io-index" 2305 | checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" 2306 | dependencies = [ 2307 | "log", 2308 | "pin-project-lite", 2309 | "tracing-attributes", 2310 | "tracing-core", 2311 | ] 2312 | 2313 | [[package]] 2314 | name = "tracing-attributes" 2315 | version = "0.1.27" 2316 | source = "registry+https://github.com/rust-lang/crates.io-index" 2317 | checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" 2318 | dependencies = [ 2319 | "proc-macro2", 2320 | "quote", 2321 | "syn 2.0.72", 2322 | ] 2323 | 2324 | [[package]] 2325 | name = "tracing-core" 2326 | version = "0.1.32" 2327 | source = "registry+https://github.com/rust-lang/crates.io-index" 2328 | checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" 2329 | dependencies = [ 2330 | "once_cell", 2331 | "valuable", 2332 | ] 2333 | 2334 | [[package]] 2335 | name = "tracing-log" 2336 | version = "0.2.0" 2337 | source = "registry+https://github.com/rust-lang/crates.io-index" 2338 | checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" 2339 | dependencies = [ 2340 | "log", 2341 | "once_cell", 2342 | "tracing-core", 2343 | ] 2344 | 2345 | [[package]] 2346 | name = "tracing-subscriber" 2347 | version = "0.3.18" 2348 | source = "registry+https://github.com/rust-lang/crates.io-index" 2349 | checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" 2350 | dependencies = [ 2351 | "matchers", 2352 | "nu-ansi-term", 2353 | "once_cell", 2354 | "regex", 2355 | "sharded-slab", 2356 | "smallvec", 2357 | "thread_local", 2358 | "tracing", 2359 | "tracing-core", 2360 | "tracing-log", 2361 | ] 2362 | 2363 | [[package]] 2364 | name = "typed-arena" 2365 | version = "2.0.2" 2366 | source = "registry+https://github.com/rust-lang/crates.io-index" 2367 | checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" 2368 | 2369 | [[package]] 2370 | name = "unic-char-property" 2371 | version = "0.9.0" 2372 | source = "registry+https://github.com/rust-lang/crates.io-index" 2373 | checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" 2374 | dependencies = [ 2375 | "unic-char-range", 2376 | ] 2377 | 2378 | [[package]] 2379 | name = "unic-char-range" 2380 | version = "0.9.0" 2381 | source = "registry+https://github.com/rust-lang/crates.io-index" 2382 | checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" 2383 | 2384 | [[package]] 2385 | name = "unic-common" 2386 | version = "0.9.0" 2387 | source = "registry+https://github.com/rust-lang/crates.io-index" 2388 | checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" 2389 | 2390 | [[package]] 2391 | name = "unic-ucd-category" 2392 | version = "0.9.0" 2393 | source = "registry+https://github.com/rust-lang/crates.io-index" 2394 | checksum = "1b8d4591f5fcfe1bd4453baaf803c40e1b1e69ff8455c47620440b46efef91c0" 2395 | dependencies = [ 2396 | "matches", 2397 | "unic-char-property", 2398 | "unic-char-range", 2399 | "unic-ucd-version", 2400 | ] 2401 | 2402 | [[package]] 2403 | name = "unic-ucd-version" 2404 | version = "0.9.0" 2405 | source = "registry+https://github.com/rust-lang/crates.io-index" 2406 | checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" 2407 | dependencies = [ 2408 | "unic-common", 2409 | ] 2410 | 2411 | [[package]] 2412 | name = "unicode-bidi" 2413 | version = "0.3.15" 2414 | source = "registry+https://github.com/rust-lang/crates.io-index" 2415 | checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" 2416 | 2417 | [[package]] 2418 | name = "unicode-ident" 2419 | version = "1.0.12" 2420 | source = "registry+https://github.com/rust-lang/crates.io-index" 2421 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 2422 | 2423 | [[package]] 2424 | name = "unicode-normalization" 2425 | version = "0.1.23" 2426 | source = "registry+https://github.com/rust-lang/crates.io-index" 2427 | checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" 2428 | dependencies = [ 2429 | "tinyvec", 2430 | ] 2431 | 2432 | [[package]] 2433 | name = "unicode-width" 2434 | version = "0.1.13" 2435 | source = "registry+https://github.com/rust-lang/crates.io-index" 2436 | checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" 2437 | 2438 | [[package]] 2439 | name = "unicode_names2" 2440 | version = "1.2.2" 2441 | source = "registry+https://github.com/rust-lang/crates.io-index" 2442 | checksum = "addeebf294df7922a1164f729fb27ebbbcea99cc32b3bf08afab62757f707677" 2443 | dependencies = [ 2444 | "phf", 2445 | "unicode_names2_generator", 2446 | ] 2447 | 2448 | [[package]] 2449 | name = "unicode_names2_generator" 2450 | version = "1.2.2" 2451 | source = "registry+https://github.com/rust-lang/crates.io-index" 2452 | checksum = "f444b8bba042fe3c1251ffaca35c603f2dc2ccc08d595c65a8c4f76f3e8426c0" 2453 | dependencies = [ 2454 | "getopts", 2455 | "log", 2456 | "phf_codegen", 2457 | "rand", 2458 | ] 2459 | 2460 | [[package]] 2461 | name = "unindent" 2462 | version = "0.1.11" 2463 | source = "registry+https://github.com/rust-lang/crates.io-index" 2464 | checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c" 2465 | 2466 | [[package]] 2467 | name = "unscanny" 2468 | version = "0.1.0" 2469 | source = "registry+https://github.com/rust-lang/crates.io-index" 2470 | checksum = "e9df2af067a7953e9c3831320f35c1cc0600c30d44d9f7a12b01db1cd88d6b47" 2471 | 2472 | [[package]] 2473 | name = "url" 2474 | version = "2.5.2" 2475 | source = "registry+https://github.com/rust-lang/crates.io-index" 2476 | checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" 2477 | dependencies = [ 2478 | "form_urlencoded", 2479 | "idna", 2480 | "percent-encoding", 2481 | "serde", 2482 | ] 2483 | 2484 | [[package]] 2485 | name = "utf8parse" 2486 | version = "0.2.2" 2487 | source = "registry+https://github.com/rust-lang/crates.io-index" 2488 | checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 2489 | 2490 | [[package]] 2491 | name = "uuid" 2492 | version = "1.10.0" 2493 | source = "registry+https://github.com/rust-lang/crates.io-index" 2494 | checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" 2495 | dependencies = [ 2496 | "getrandom", 2497 | "rand", 2498 | "uuid-macro-internal", 2499 | "wasm-bindgen", 2500 | ] 2501 | 2502 | [[package]] 2503 | name = "uuid-macro-internal" 2504 | version = "1.10.0" 2505 | source = "registry+https://github.com/rust-lang/crates.io-index" 2506 | checksum = "ee1cd046f83ea2c4e920d6ee9f7c3537ef928d75dce5d84a87c2c5d6b3999a3a" 2507 | dependencies = [ 2508 | "proc-macro2", 2509 | "quote", 2510 | "syn 2.0.72", 2511 | ] 2512 | 2513 | [[package]] 2514 | name = "valuable" 2515 | version = "0.1.0" 2516 | source = "registry+https://github.com/rust-lang/crates.io-index" 2517 | checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" 2518 | 2519 | [[package]] 2520 | name = "vte" 2521 | version = "0.11.1" 2522 | source = "registry+https://github.com/rust-lang/crates.io-index" 2523 | checksum = "f5022b5fbf9407086c180e9557be968742d839e68346af7792b8592489732197" 2524 | dependencies = [ 2525 | "utf8parse", 2526 | "vte_generate_state_changes", 2527 | ] 2528 | 2529 | [[package]] 2530 | name = "vte_generate_state_changes" 2531 | version = "0.1.2" 2532 | source = "registry+https://github.com/rust-lang/crates.io-index" 2533 | checksum = "2e369bee1b05d510a7b4ed645f5faa90619e05437111783ea5848f28d97d3c2e" 2534 | dependencies = [ 2535 | "proc-macro2", 2536 | "quote", 2537 | ] 2538 | 2539 | [[package]] 2540 | name = "walkdir" 2541 | version = "2.5.0" 2542 | source = "registry+https://github.com/rust-lang/crates.io-index" 2543 | checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" 2544 | dependencies = [ 2545 | "same-file", 2546 | "winapi-util", 2547 | ] 2548 | 2549 | [[package]] 2550 | name = "wasi" 2551 | version = "0.11.0+wasi-snapshot-preview1" 2552 | source = "registry+https://github.com/rust-lang/crates.io-index" 2553 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2554 | 2555 | [[package]] 2556 | name = "wasm-bindgen" 2557 | version = "0.2.92" 2558 | source = "registry+https://github.com/rust-lang/crates.io-index" 2559 | checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" 2560 | dependencies = [ 2561 | "cfg-if", 2562 | "wasm-bindgen-macro", 2563 | ] 2564 | 2565 | [[package]] 2566 | name = "wasm-bindgen-backend" 2567 | version = "0.2.92" 2568 | source = "registry+https://github.com/rust-lang/crates.io-index" 2569 | checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" 2570 | dependencies = [ 2571 | "bumpalo", 2572 | "log", 2573 | "once_cell", 2574 | "proc-macro2", 2575 | "quote", 2576 | "syn 2.0.72", 2577 | "wasm-bindgen-shared", 2578 | ] 2579 | 2580 | [[package]] 2581 | name = "wasm-bindgen-macro" 2582 | version = "0.2.92" 2583 | source = "registry+https://github.com/rust-lang/crates.io-index" 2584 | checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" 2585 | dependencies = [ 2586 | "quote", 2587 | "wasm-bindgen-macro-support", 2588 | ] 2589 | 2590 | [[package]] 2591 | name = "wasm-bindgen-macro-support" 2592 | version = "0.2.92" 2593 | source = "registry+https://github.com/rust-lang/crates.io-index" 2594 | checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" 2595 | dependencies = [ 2596 | "proc-macro2", 2597 | "quote", 2598 | "syn 2.0.72", 2599 | "wasm-bindgen-backend", 2600 | "wasm-bindgen-shared", 2601 | ] 2602 | 2603 | [[package]] 2604 | name = "wasm-bindgen-shared" 2605 | version = "0.2.92" 2606 | source = "registry+https://github.com/rust-lang/crates.io-index" 2607 | checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" 2608 | 2609 | [[package]] 2610 | name = "which" 2611 | version = "6.0.2" 2612 | source = "registry+https://github.com/rust-lang/crates.io-index" 2613 | checksum = "3d9c5ed668ee1f17edb3b627225343d210006a90bb1e3745ce1f30b1fb115075" 2614 | dependencies = [ 2615 | "either", 2616 | "home", 2617 | "rustix", 2618 | "winsafe", 2619 | ] 2620 | 2621 | [[package]] 2622 | name = "wild" 2623 | version = "2.2.1" 2624 | source = "registry+https://github.com/rust-lang/crates.io-index" 2625 | checksum = "a3131afc8c575281e1e80f36ed6a092aa502c08b18ed7524e86fbbb12bb410e1" 2626 | dependencies = [ 2627 | "glob", 2628 | ] 2629 | 2630 | [[package]] 2631 | name = "winapi" 2632 | version = "0.3.9" 2633 | source = "registry+https://github.com/rust-lang/crates.io-index" 2634 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2635 | dependencies = [ 2636 | "winapi-i686-pc-windows-gnu", 2637 | "winapi-x86_64-pc-windows-gnu", 2638 | ] 2639 | 2640 | [[package]] 2641 | name = "winapi-i686-pc-windows-gnu" 2642 | version = "0.4.0" 2643 | source = "registry+https://github.com/rust-lang/crates.io-index" 2644 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2645 | 2646 | [[package]] 2647 | name = "winapi-util" 2648 | version = "0.1.9" 2649 | source = "registry+https://github.com/rust-lang/crates.io-index" 2650 | checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" 2651 | dependencies = [ 2652 | "windows-sys 0.59.0", 2653 | ] 2654 | 2655 | [[package]] 2656 | name = "winapi-x86_64-pc-windows-gnu" 2657 | version = "0.4.0" 2658 | source = "registry+https://github.com/rust-lang/crates.io-index" 2659 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2660 | 2661 | [[package]] 2662 | name = "windows-core" 2663 | version = "0.52.0" 2664 | source = "registry+https://github.com/rust-lang/crates.io-index" 2665 | checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" 2666 | dependencies = [ 2667 | "windows-targets 0.52.6", 2668 | ] 2669 | 2670 | [[package]] 2671 | name = "windows-sys" 2672 | version = "0.48.0" 2673 | source = "registry+https://github.com/rust-lang/crates.io-index" 2674 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 2675 | dependencies = [ 2676 | "windows-targets 0.48.5", 2677 | ] 2678 | 2679 | [[package]] 2680 | name = "windows-sys" 2681 | version = "0.52.0" 2682 | source = "registry+https://github.com/rust-lang/crates.io-index" 2683 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 2684 | dependencies = [ 2685 | "windows-targets 0.52.6", 2686 | ] 2687 | 2688 | [[package]] 2689 | name = "windows-sys" 2690 | version = "0.59.0" 2691 | source = "registry+https://github.com/rust-lang/crates.io-index" 2692 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 2693 | dependencies = [ 2694 | "windows-targets 0.52.6", 2695 | ] 2696 | 2697 | [[package]] 2698 | name = "windows-targets" 2699 | version = "0.48.5" 2700 | source = "registry+https://github.com/rust-lang/crates.io-index" 2701 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 2702 | dependencies = [ 2703 | "windows_aarch64_gnullvm 0.48.5", 2704 | "windows_aarch64_msvc 0.48.5", 2705 | "windows_i686_gnu 0.48.5", 2706 | "windows_i686_msvc 0.48.5", 2707 | "windows_x86_64_gnu 0.48.5", 2708 | "windows_x86_64_gnullvm 0.48.5", 2709 | "windows_x86_64_msvc 0.48.5", 2710 | ] 2711 | 2712 | [[package]] 2713 | name = "windows-targets" 2714 | version = "0.52.6" 2715 | source = "registry+https://github.com/rust-lang/crates.io-index" 2716 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 2717 | dependencies = [ 2718 | "windows_aarch64_gnullvm 0.52.6", 2719 | "windows_aarch64_msvc 0.52.6", 2720 | "windows_i686_gnu 0.52.6", 2721 | "windows_i686_gnullvm", 2722 | "windows_i686_msvc 0.52.6", 2723 | "windows_x86_64_gnu 0.52.6", 2724 | "windows_x86_64_gnullvm 0.52.6", 2725 | "windows_x86_64_msvc 0.52.6", 2726 | ] 2727 | 2728 | [[package]] 2729 | name = "windows_aarch64_gnullvm" 2730 | version = "0.48.5" 2731 | source = "registry+https://github.com/rust-lang/crates.io-index" 2732 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 2733 | 2734 | [[package]] 2735 | name = "windows_aarch64_gnullvm" 2736 | version = "0.52.6" 2737 | source = "registry+https://github.com/rust-lang/crates.io-index" 2738 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 2739 | 2740 | [[package]] 2741 | name = "windows_aarch64_msvc" 2742 | version = "0.48.5" 2743 | source = "registry+https://github.com/rust-lang/crates.io-index" 2744 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 2745 | 2746 | [[package]] 2747 | name = "windows_aarch64_msvc" 2748 | version = "0.52.6" 2749 | source = "registry+https://github.com/rust-lang/crates.io-index" 2750 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 2751 | 2752 | [[package]] 2753 | name = "windows_i686_gnu" 2754 | version = "0.48.5" 2755 | source = "registry+https://github.com/rust-lang/crates.io-index" 2756 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 2757 | 2758 | [[package]] 2759 | name = "windows_i686_gnu" 2760 | version = "0.52.6" 2761 | source = "registry+https://github.com/rust-lang/crates.io-index" 2762 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 2763 | 2764 | [[package]] 2765 | name = "windows_i686_gnullvm" 2766 | version = "0.52.6" 2767 | source = "registry+https://github.com/rust-lang/crates.io-index" 2768 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 2769 | 2770 | [[package]] 2771 | name = "windows_i686_msvc" 2772 | version = "0.48.5" 2773 | source = "registry+https://github.com/rust-lang/crates.io-index" 2774 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 2775 | 2776 | [[package]] 2777 | name = "windows_i686_msvc" 2778 | version = "0.52.6" 2779 | source = "registry+https://github.com/rust-lang/crates.io-index" 2780 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 2781 | 2782 | [[package]] 2783 | name = "windows_x86_64_gnu" 2784 | version = "0.48.5" 2785 | source = "registry+https://github.com/rust-lang/crates.io-index" 2786 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 2787 | 2788 | [[package]] 2789 | name = "windows_x86_64_gnu" 2790 | version = "0.52.6" 2791 | source = "registry+https://github.com/rust-lang/crates.io-index" 2792 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 2793 | 2794 | [[package]] 2795 | name = "windows_x86_64_gnullvm" 2796 | version = "0.48.5" 2797 | source = "registry+https://github.com/rust-lang/crates.io-index" 2798 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 2799 | 2800 | [[package]] 2801 | name = "windows_x86_64_gnullvm" 2802 | version = "0.52.6" 2803 | source = "registry+https://github.com/rust-lang/crates.io-index" 2804 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 2805 | 2806 | [[package]] 2807 | name = "windows_x86_64_msvc" 2808 | version = "0.48.5" 2809 | source = "registry+https://github.com/rust-lang/crates.io-index" 2810 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 2811 | 2812 | [[package]] 2813 | name = "windows_x86_64_msvc" 2814 | version = "0.52.6" 2815 | source = "registry+https://github.com/rust-lang/crates.io-index" 2816 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 2817 | 2818 | [[package]] 2819 | name = "winnow" 2820 | version = "0.6.18" 2821 | source = "registry+https://github.com/rust-lang/crates.io-index" 2822 | checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" 2823 | dependencies = [ 2824 | "memchr", 2825 | ] 2826 | 2827 | [[package]] 2828 | name = "winsafe" 2829 | version = "0.0.19" 2830 | source = "registry+https://github.com/rust-lang/crates.io-index" 2831 | checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" 2832 | 2833 | [[package]] 2834 | name = "yansi-term" 2835 | version = "0.1.2" 2836 | source = "registry+https://github.com/rust-lang/crates.io-index" 2837 | checksum = "fe5c30ade05e61656247b2e334a031dfd0cc466fadef865bdcdea8d537951bf1" 2838 | dependencies = [ 2839 | "winapi", 2840 | ] 2841 | 2842 | [[package]] 2843 | name = "zerocopy" 2844 | version = "0.7.35" 2845 | source = "registry+https://github.com/rust-lang/crates.io-index" 2846 | checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" 2847 | dependencies = [ 2848 | "byteorder", 2849 | "zerocopy-derive", 2850 | ] 2851 | 2852 | [[package]] 2853 | name = "zerocopy-derive" 2854 | version = "0.7.35" 2855 | source = "registry+https://github.com/rust-lang/crates.io-index" 2856 | checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" 2857 | dependencies = [ 2858 | "proc-macro2", 2859 | "quote", 2860 | "syn 2.0.72", 2861 | ] 2862 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "ruff-api" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | [lib] 8 | name = "ruff_api" 9 | crate-type = ["cdylib"] 10 | 11 | [dependencies] 12 | pyo3 = "0.19.0" 13 | glob = "0.3.1" 14 | rustc-hash = "1.1.0" 15 | ruff = { git = "https://github.com/astral-sh/ruff.git", tag = "v0.4.10" } 16 | ruff_formatter = { git = "https://github.com/astral-sh/ruff.git", tag = "v0.4.10" } 17 | ruff_linter = { git = "https://github.com/astral-sh/ruff.git", tag = "v0.4.10" } 18 | ruff_python_ast = { git = "https://github.com/astral-sh/ruff.git", tag = "v0.4.10" } 19 | ruff_python_formatter = { git = "https://github.com/astral-sh/ruff.git", tag = "v0.4.10" } 20 | ruff_workspace = { git = "https://github.com/astral-sh/ruff.git", tag = "v0.4.10" } 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Amethyst Reese 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. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ruff-api 2 | 3 | Experimental Python API for Ruff 4 | 5 | [![version](https://img.shields.io/pypi/v/ruff-api.svg)](https://pypi.org/project/ruff-api) 6 | [![license](https://img.shields.io/pypi/l/ruff-api.svg)](https://github.com/amyreese/ruff-api/blob/main/LICENSE) 7 | 8 | 9 | NOTE: This is project is highly experimental and the API is likely to change. 10 | Pin your dependencies accordingly. 11 | 12 | 13 | Install 14 | ------- 15 | 16 | ```shell-session 17 | $ pip install ruff-api 18 | ``` 19 | 20 | 21 | Usage 22 | ----- 23 | 24 | ```py 25 | import ruff_api 26 | ``` 27 | 28 | Format the contents of a file in memory: 29 | 30 | ```py 31 | code = ruff_api.format_string(filename, code) 32 | ``` 33 | 34 | Sort imports in memory: 35 | 36 | ```py 37 | code = ruff_api.isort_string(filename, code) 38 | ``` 39 | 40 | 41 | License 42 | ------- 43 | 44 | ruff-api is copyright Amethyst Reese, and licensed under the MIT license. 45 | -------------------------------------------------------------------------------- /makefile: -------------------------------------------------------------------------------- 1 | SRCS:=ruff_api 2 | EXTRAS:=dev 3 | 4 | ifeq ($(OS),Windows_NT) 5 | ACTIVATE:=.venv/Scripts/activate 6 | else 7 | ACTIVATE:=.venv/bin/activate 8 | endif 9 | 10 | UV:=$(shell uv --version) 11 | ifdef UV 12 | VENV:=uv venv 13 | PIP:=uv pip 14 | else 15 | VENV:=python -m venv 16 | PIP:=python -m pip 17 | endif 18 | 19 | .venv: 20 | $(VENV) .venv 21 | 22 | venv: .venv 23 | source $(ACTIVATE) && make install 24 | echo 'run `source $(ACTIVATE)` to use virtualenv' 25 | 26 | install: 27 | $(PIP) install -Ue .[$(EXTRAS)] 28 | 29 | version: 30 | python -m scripts.ruff_version 31 | 32 | test: 33 | python -m pytest --verbose 34 | python -m mypy -p ruff_api 35 | 36 | lint: 37 | cargo clippy 38 | python -m flake8 ruff_api 39 | python -m ufmt check ruff_api 40 | python scripts/ruff_version.py 41 | python scripts/validate_formatting.py 42 | 43 | format: 44 | python -m ufmt format ruff_api 45 | 46 | release: test lint 47 | @echo "\nPush tags to github and let CI handle it!\n" 48 | @exit 1 49 | 50 | clean: 51 | rm -rf .mypy_cache build dist html *.egg-info ruff_api/*.so 52 | 53 | distclean: clean 54 | rm -rf .venv 55 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["maturin>=1.4,<2.0"] 3 | build-backend = "maturin" 4 | 5 | [project] 6 | name = "ruff-api" 7 | description = "Experimental API for Ruff" 8 | readme = "README.md" 9 | authors = [ 10 | {name="Amethyst Reese", email="amethyst@n7.gg"}, 11 | ] 12 | license = {file="LICENSE"} 13 | dynamic = ["version"] 14 | classifiers = [ 15 | "Development Status :: 3 - Alpha", 16 | "License :: OSI Approved :: MIT License", 17 | "Programming Language :: Rust", 18 | "Programming Language :: Python :: Implementation :: CPython", 19 | "Programming Language :: Python :: Implementation :: PyPy", 20 | ] 21 | requires-python = ">=3.8" 22 | dependencies = [] 23 | 24 | [project.optional-dependencies] 25 | dev = [ 26 | "attribution==1.8.0", 27 | "flake8==7.1.1", 28 | "maturin==1.7.4", 29 | "mypy==1.13.0", 30 | "pytest==8.3.3", 31 | "ufmt==2.7.3", 32 | "usort==1.0.8.post1", 33 | ] 34 | 35 | [project.urls] 36 | Home = "https://github.com/amyreese/ruff-api" 37 | 38 | [tool.maturin] 39 | features = ["pyo3/extension-module"] 40 | module-name = "ruff_api._rust" 41 | 42 | [tool.attribution] 43 | name = "ruff-api" 44 | package = "ruff_api" 45 | cargo_packages = ["ruff-api"] 46 | version_file = true 47 | ignored_authors = ["dependabot[bot]"] 48 | signed_tags = true 49 | 50 | [tool.mypy] 51 | strict = true 52 | 53 | [tool.pytest.ini_options] 54 | python_files = "tests/*.py" 55 | 56 | [tool.ufmt] 57 | formatter = "ruff-api" 58 | sorter = "ruff-api" 59 | -------------------------------------------------------------------------------- /ruff_api/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright Amethyst Reese 2 | # Licensed under the MIT license 3 | 4 | """ 5 | Experimental Python API for Ruff 6 | """ 7 | 8 | __author__ = "Amethyst Reese" 9 | 10 | from .__ruff_version__ import ruff_version 11 | from .__version__ import __version__ 12 | from ._rust import FormatOptions, SortOptions, format_string, isort_string 13 | from .errors import FormatError, ParseError, PrintError, RuffError 14 | 15 | __all__ = ( 16 | "__author__", 17 | "__version__", 18 | "format_string", 19 | "FormatError", 20 | "FormatOptions", 21 | "isort_string", 22 | "ParseError", 23 | "PrintError", 24 | "SortOptions", 25 | "ruff_version", 26 | "RuffError", 27 | ) 28 | -------------------------------------------------------------------------------- /ruff_api/__ruff_version__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Automatically generated by scripts/ruff_version.py 3 | 4 | Run `make version` after updating Cargo.lock to regenerate. 5 | """ 6 | 7 | ruff_version = "0.4.10" 8 | -------------------------------------------------------------------------------- /ruff_api/__version__.py: -------------------------------------------------------------------------------- 1 | """ 2 | This file is automatically generated by attribution. 3 | 4 | Do not edit manually. Get more info at https://attribution.omnilib.dev 5 | """ 6 | 7 | __version__ = "0.1.0" 8 | -------------------------------------------------------------------------------- /ruff_api/_rust.pyi: -------------------------------------------------------------------------------- 1 | from typing import List 2 | 3 | class FormatOptions: 4 | def __init__( 5 | self, 6 | target_version: str | None = None, 7 | line_width: int | None = None, 8 | preview: bool = False, 9 | ): ... 10 | 11 | def format_string( 12 | path: str, source: str, options: FormatOptions | None = None 13 | ) -> str: ... 14 | 15 | class SortOptions: 16 | def __init__( 17 | self, 18 | first_party_modules: List[str] | None = None, 19 | standard_library_modules: List[str] | None = None, 20 | *, 21 | # match default values from upstream ruff 22 | case_sensitive: bool = False, 23 | combine_as_imports: bool = False, 24 | detect_same_package: bool = True, 25 | order_by_type: bool = True, 26 | ): ... 27 | 28 | def isort_string( 29 | path: str, source: str, options: SortOptions | None = None, root: str | None = None 30 | ) -> str: ... 31 | -------------------------------------------------------------------------------- /ruff_api/errors.py: -------------------------------------------------------------------------------- 1 | class RuffError(Exception): ... 2 | 3 | 4 | class FormatError(RuffError): ... 5 | 6 | 7 | class ParseError(RuffError): ... 8 | 9 | 10 | class PrintError(RuffError): ... 11 | -------------------------------------------------------------------------------- /ruff_api/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amyreese/ruff-api/8bba8a88b78c57a43e6431d13754581d50a3fc3d/ruff_api/py.typed -------------------------------------------------------------------------------- /ruff_api/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright Amethyst Reese 2 | # Licensed under the MIT license 3 | 4 | from .smoke import SmokeTest 5 | -------------------------------------------------------------------------------- /ruff_api/tests/__main__.py: -------------------------------------------------------------------------------- 1 | # Copyright Amethyst Reese 2 | # Licensed under the MIT license 3 | 4 | import unittest 5 | 6 | if __name__ == "__main__": 7 | unittest.main("ruff_api.tests", verbosity=2) 8 | -------------------------------------------------------------------------------- /ruff_api/tests/smoke.py: -------------------------------------------------------------------------------- 1 | # Copyright Amethyst Reese 2 | # Licensed under the MIT license 3 | 4 | import multiprocessing 5 | from unittest import TestCase, expectedFailure 6 | 7 | import ruff_api 8 | 9 | CODE_UNFORMATTED = """ 10 | import sys 11 | def foo(): 12 | "test function" 13 | print("something", 14 | file=sys.stderr) 15 | foo() 16 | """ 17 | 18 | CODE_FORMATTED = """\ 19 | import sys 20 | 21 | 22 | def foo(): 23 | "test function" 24 | print("something", file=sys.stderr) 25 | 26 | 27 | foo() 28 | """ 29 | 30 | CODE_FORMATTED_LL20 = """\ 31 | import sys 32 | 33 | 34 | def foo(): 35 | "test function" 36 | print( 37 | "something", 38 | file=sys.stderr, 39 | ) 40 | 41 | 42 | foo() 43 | """ 44 | 45 | CODE_UNSORTED_IMPORTS = """\ 46 | import sys, CUSTOMMOD 47 | from firstparty import a,c,b 48 | from sysmod import x,a,T 49 | import __strict__ 50 | import somecustom 51 | import __static__ 52 | import __future__ 53 | 54 | def main(): pass 55 | """ 56 | 57 | CODE_SORTED_IMPORTS = """\ 58 | import __future__ 59 | 60 | import __static__ 61 | import __strict__ 62 | 63 | import sys 64 | 65 | import CUSTOMMOD 66 | import somecustom 67 | from firstparty import a, b, c 68 | from sysmod import T, a, x 69 | 70 | 71 | def main(): pass 72 | """ 73 | 74 | CODE_SORTED_IMPORTS_CUSTOM = """\ 75 | import __future__ 76 | 77 | import __static__ 78 | import __strict__ 79 | 80 | import sys 81 | from sysmod import T, a, x 82 | 83 | import CUSTOMMOD 84 | import somecustom 85 | 86 | from firstparty import a, b, c 87 | 88 | 89 | def main(): pass 90 | """ 91 | 92 | CODE_SORTED_IMPORTS_WITH_FLAGS = """\ 93 | import __future__ 94 | 95 | import __static__ 96 | import __strict__ 97 | 98 | import sys 99 | 100 | import CUSTOMMOD 101 | import somecustom 102 | from firstparty import a, b, c 103 | from sysmod import a, T, x 104 | 105 | 106 | def main(): pass 107 | """ 108 | 109 | CODE_INVALID = """\ 110 | print "hello world!" 111 | """ 112 | 113 | 114 | class SmokeTest(TestCase): 115 | def test_format(self) -> None: 116 | self.assertEqual( 117 | CODE_FORMATTED, ruff_api.format_string("hello.py", CODE_UNFORMATTED) 118 | ) 119 | 120 | def test_format_basic_options(self) -> None: 121 | options = ruff_api.FormatOptions(line_width=20) 122 | self.assertEqual( 123 | CODE_FORMATTED_LL20, 124 | ruff_api.format_string("hello.py", CODE_UNFORMATTED, options), 125 | ) 126 | 127 | def test_format_parse_error(self) -> None: 128 | with self.subTest("bare"): 129 | with self.assertRaises(ruff_api.ParseError): 130 | ruff_api.format_string("invalid.py", CODE_INVALID) 131 | 132 | with self.subTest("pickled"): 133 | with multiprocessing.Pool(1) as pool: 134 | with self.assertRaises(ruff_api.ParseError): 135 | pool.apply(ruff_api.format_string, ("invalid.py", CODE_INVALID)) 136 | 137 | def test_isort(self) -> None: 138 | self.assertEqual( 139 | CODE_SORTED_IMPORTS, 140 | ruff_api.isort_string("hello.py", CODE_UNSORTED_IMPORTS), 141 | ) 142 | 143 | def test_isort_options(self) -> None: 144 | # missing sysmod 145 | options = ruff_api.SortOptions(["firstparty"], []) 146 | self.assertNotEqual( 147 | CODE_SORTED_IMPORTS, 148 | ruff_api.isort_string("hello.py", CODE_UNSORTED_IMPORTS, options), 149 | ) 150 | 151 | # missing firstparty 152 | options = ruff_api.SortOptions([], ["sysmod"]) 153 | self.assertNotEqual( 154 | CODE_SORTED_IMPORTS, 155 | ruff_api.isort_string("hello.py", CODE_UNSORTED_IMPORTS, options), 156 | ) 157 | 158 | options = ruff_api.SortOptions( 159 | ["firstparty"], 160 | ["sysmod"], 161 | ) 162 | self.assertEqual( 163 | CODE_SORTED_IMPORTS_CUSTOM, 164 | ruff_api.isort_string("hello.py", CODE_UNSORTED_IMPORTS, options), 165 | ) 166 | 167 | options = ruff_api.SortOptions( 168 | case_sensitive=False, 169 | order_by_type=False, 170 | ) 171 | self.assertEqual( 172 | CODE_SORTED_IMPORTS_WITH_FLAGS, 173 | ruff_api.isort_string("hello.py", CODE_UNSORTED_IMPORTS, options), 174 | ) 175 | 176 | def test_isort_root(self) -> None: 177 | self.assertEqual( 178 | CODE_SORTED_IMPORTS, 179 | ruff_api.isort_string("hello.py", CODE_UNSORTED_IMPORTS, root="/home/ruff"), 180 | ) 181 | 182 | @expectedFailure 183 | def test_isort_parse_error(self) -> None: 184 | with self.assertRaises(ruff_api.RuffError): 185 | # TODO: should ruff be raising a parse error here? 186 | ruff_api.isort_string("invalid.py", CODE_INVALID) 187 | -------------------------------------------------------------------------------- /scripts/ruff_version.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | from pathlib import Path 5 | from textwrap import dedent 6 | 7 | try: 8 | import tomllib 9 | except ImportError: 10 | import tomli as tomllib 11 | 12 | try: 13 | from ruff_api.__ruff_version__ import ruff_version 14 | except ImportError: 15 | ruff_version = "0" 16 | 17 | if __name__ == "__main__": 18 | version_file = Path(__file__).parent.parent / "ruff_api" / "__ruff_version__.py" 19 | version_tpl = dedent( 20 | '''\ 21 | """ 22 | Automatically generated by scripts/ruff_version.py 23 | 24 | Run `make version` after updating Cargo.lock to regenerate. 25 | """ 26 | 27 | ruff_version = "{version}" 28 | ''' 29 | ) 30 | 31 | cargo_lock = Path(__file__).parent.parent / "Cargo.lock" 32 | cargo_data = tomllib.loads(cargo_lock.read_text()) 33 | 34 | print(f"current {ruff_version = !r}") 35 | for package_data in cargo_data.get("package", []): 36 | package_name = package_data.get("name", "") 37 | if package_name == "ruff": 38 | active_version = package_data.get("version", "0") 39 | 40 | if active_version != ruff_version: 41 | version_file.write_text(version_tpl.format(version=active_version)) 42 | print(f"🚩 ruff is actually {active_version!r}") 43 | sys.exit(1) 44 | 45 | sys.exit(0) 46 | 47 | print("🚩 ruff version detection failed") 48 | sys.exit(3) 49 | -------------------------------------------------------------------------------- /scripts/validate_formatting.py: -------------------------------------------------------------------------------- 1 | # Copyright Amethyst Reese 2 | # Licensed under the MIT license 3 | 4 | """ 5 | Validate project formatting using ruff_api directly 6 | """ 7 | 8 | import sys 9 | from difflib import unified_diff 10 | from itertools import chain 11 | from pathlib import Path 12 | 13 | from ruff_api import format_string, isort_string 14 | 15 | ROOT = Path(__file__).parent.parent.resolve() 16 | PROJECT_DIR = ROOT / "ruff_api" 17 | SCRIPTS_DIR = ROOT / "scripts" 18 | 19 | 20 | def diff(original: str, modified: str) -> str: 21 | a = original.splitlines() 22 | b = modified.splitlines() 23 | d = unified_diff(a, b, "original", "modified", n=2, lineterm="") 24 | return "\n".join(d) 25 | 26 | 27 | def validate(path: Path) -> int: 28 | original = path.read_text("utf-8") 29 | filename = path.relative_to(ROOT).as_posix() 30 | 31 | exit_code = 0 32 | if (modified := format_string(filename, original)) != original: 33 | print(f"ruff format {filename}:") 34 | print(diff(original, modified)) 35 | exit_code = 1 36 | 37 | if (modified := isort_string(filename, original)) != original: 38 | print(f"ruff isort {filename}:") 39 | print(diff(original, modified)) 40 | exit_code = 1 41 | 42 | return exit_code 43 | 44 | 45 | def main(): 46 | exit_code = 0 47 | for file_path in chain( 48 | SCRIPTS_DIR.glob("**/*.py"), 49 | PROJECT_DIR.glob("**/*.py"), 50 | ): 51 | exit_code |= validate(file_path) 52 | 53 | print("error" if exit_code else "ok") 54 | sys.exit(exit_code) 55 | 56 | 57 | if __name__ == "__main__": 58 | main() 59 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | use pyo3::prelude::*; 2 | use ruff_formatter::LineWidth; 3 | use ruff_linter::linter::lint_fix; 4 | use ruff_linter::registry::Rule; 5 | use ruff_linter::rules::isort::{self, categorize::KnownModules, ImportSection, ImportType}; 6 | use ruff_linter::settings::{flags, types::UnsafeFixes, LinterSettings}; 7 | use ruff_linter::source_kind::SourceKind; 8 | use ruff_python_ast::PySourceType; 9 | use ruff_python_formatter::{self, PreviewMode, PyFormatOptions, PythonVersion}; 10 | use rustc_hash::FxHashMap; 11 | 12 | use glob::Pattern; 13 | use std::path::Path; 14 | use std::env; 15 | use std::path::PathBuf; 16 | 17 | pyo3::import_exception!(ruff_api.errors, FormatError); 18 | pyo3::import_exception!(ruff_api.errors, ParseError); 19 | pyo3::import_exception!(ruff_api.errors, PrintError); 20 | 21 | // handle converting from ruff's native errors to exported exceptions 22 | fn convert_error(error: &ruff_python_formatter::FormatModuleError) -> PyErr { 23 | match error { 24 | ruff_python_formatter::FormatModuleError::FormatError(e) => { 25 | FormatError::new_err(e.to_string()) 26 | } 27 | ruff_python_formatter::FormatModuleError::ParseError(e) => { 28 | ParseError::new_err(e.to_string()) 29 | } 30 | ruff_python_formatter::FormatModuleError::PrintError(e) => { 31 | PrintError::new_err(e.to_string()) 32 | } 33 | } 34 | } 35 | 36 | // -- Formatting -- 37 | 38 | #[pyclass(get_all)] 39 | struct FormatOptions { 40 | target_version: String, 41 | line_width: u16, 42 | preview: bool, 43 | } 44 | 45 | #[pymethods] 46 | impl FormatOptions { 47 | #[new] 48 | #[pyo3(signature = (target_version=None, line_width=None, preview=None))] 49 | fn new(target_version: Option, line_width: Option, preview: Option) -> Self { 50 | Self { 51 | target_version: target_version 52 | .unwrap_or(String::from("default")) 53 | .to_lowercase(), 54 | line_width: line_width.unwrap_or(88), 55 | preview: preview.unwrap_or(false), 56 | } 57 | } 58 | } 59 | 60 | impl FormatOptions { 61 | fn to_format_options(&self, path: &Path) -> PyFormatOptions { 62 | PyFormatOptions::from_source_type(PySourceType::from(path)) 63 | .with_target_version(match self.target_version.as_str() { 64 | "py37" => PythonVersion::Py37, 65 | "py38" => PythonVersion::Py38, 66 | "py39" => PythonVersion::Py39, 67 | "py310" => PythonVersion::Py310, 68 | "py311" => PythonVersion::Py311, 69 | "py312" => PythonVersion::Py312, 70 | _ => PythonVersion::default(), 71 | }) 72 | .with_line_width(LineWidth::try_from(self.line_width).unwrap()) 73 | .with_preview(match self.preview { 74 | true => PreviewMode::Enabled, 75 | false => PreviewMode::Disabled, 76 | }) 77 | } 78 | } 79 | 80 | /// Formats a string of code with the given options 81 | #[pyfunction] 82 | #[pyo3(signature = (path, source, options=None))] 83 | fn format_string( 84 | path: String, 85 | source: String, 86 | options: Option<&FormatOptions>, 87 | ) -> PyResult { 88 | let path: &Path = Path::new(&path); 89 | let format_options: PyFormatOptions = match options { 90 | None => PyFormatOptions::default(), 91 | Some(options) => options.to_format_options(path), 92 | }; 93 | match ruff_python_formatter::format_module_source(source.as_str(), format_options) { 94 | Ok(fm) => Ok(fm.into_code()), 95 | Err(e) => Err(convert_error(&e)), 96 | } 97 | } 98 | 99 | // -- Import Sorting -- 100 | 101 | #[pyclass(get_all)] 102 | #[derive(Clone, Debug)] 103 | struct SortOptions { 104 | first_party_modules: Vec, 105 | standard_library_modules: Vec, 106 | case_sensitive: bool, 107 | combine_as_imports: bool, 108 | detect_same_package: bool, 109 | order_by_type: bool, 110 | } 111 | 112 | #[pymethods] 113 | impl SortOptions { 114 | #[new] 115 | #[pyo3(signature = ( 116 | first_party_modules=None, 117 | standard_library_modules=None, 118 | case_sensitive=None, 119 | combine_as_imports=None, 120 | detect_same_package=None, 121 | order_by_type=None, 122 | ))] 123 | fn new( 124 | first_party_modules: Option>, 125 | standard_library_modules: Option>, 126 | case_sensitive: Option, 127 | combine_as_imports: Option, 128 | detect_same_package: Option, 129 | order_by_type: Option, 130 | ) -> Self { 131 | Self { 132 | first_party_modules: first_party_modules.unwrap_or_default(), 133 | standard_library_modules: standard_library_modules.unwrap_or_default(), 134 | // match default values from upstream ruff 135 | case_sensitive: case_sensitive.unwrap_or(false), 136 | combine_as_imports: combine_as_imports.unwrap_or(false), 137 | detect_same_package: detect_same_package.unwrap_or(true), 138 | order_by_type: order_by_type.unwrap_or(true), 139 | } 140 | } 141 | } 142 | 143 | impl Default for SortOptions { 144 | fn default() -> Self { 145 | Self { 146 | first_party_modules: vec![], 147 | standard_library_modules: vec![], 148 | // match default values from upstream ruff 149 | case_sensitive: false, 150 | combine_as_imports: false, 151 | detect_same_package: true, 152 | order_by_type: true, 153 | } 154 | } 155 | } 156 | 157 | #[pyfunction] 158 | #[pyo3(signature = (path, source, options=None, root=None))] 159 | fn isort_string( 160 | path: String, 161 | source: String, 162 | options: Option<&SortOptions>, 163 | root: Option, 164 | ) -> PyResult { 165 | let ipath: &Path = Path::new(&path); 166 | 167 | let options: SortOptions = match options { 168 | None => SortOptions::default(), 169 | Some(options) => options.clone(), 170 | }; 171 | 172 | let root_path = match root { 173 | None => env::current_dir()?, 174 | Some(value) => PathBuf::from(value), 175 | }; 176 | 177 | let first_party_modules_pattern = options 178 | .first_party_modules 179 | .iter() 180 | .map(|s| Pattern::new(s).expect("Invalid pattern")) 181 | .collect(); 182 | let standard_lib_modules_pattern = options 183 | .standard_library_modules 184 | .iter() 185 | .map(|s| Pattern::new(s).expect("Invalid pattern")) 186 | .collect(); 187 | 188 | 189 | let linter_settings: LinterSettings = LinterSettings { 190 | src: vec![root_path], 191 | isort: isort::settings::Settings { 192 | case_sensitive: options.case_sensitive, 193 | combine_as_imports: options.combine_as_imports, 194 | detect_same_package: options.detect_same_package, 195 | order_by_type: options.order_by_type, 196 | 197 | known_modules: KnownModules::new( 198 | first_party_modules_pattern, // first-party 199 | vec![], // third-party 200 | vec![], // local 201 | standard_lib_modules_pattern, // standard-lib 202 | FxHashMap::from_iter([( 203 | "cinder-top-of-file".to_string(), 204 | vec![ 205 | Pattern::new("__strict__").unwrap(), 206 | Pattern::new("__static__").unwrap(), 207 | ], 208 | )]), 209 | ), 210 | section_order: vec![ 211 | ImportSection::Known(ImportType::Future), 212 | ImportSection::UserDefined("cinder-top-of-file".to_string()), 213 | ImportSection::Known(ImportType::StandardLibrary), 214 | ImportSection::Known(ImportType::ThirdParty), 215 | ImportSection::Known(ImportType::FirstParty), 216 | ImportSection::Known(ImportType::LocalFolder), 217 | ], 218 | ..Default::default() 219 | }, 220 | ..LinterSettings::for_rules(vec![Rule::UnsortedImports]) 221 | }; 222 | 223 | let source_kind = match SourceKind::from_source_code(source, PySourceType::Python) { 224 | Ok(source_kind) => source_kind, 225 | Err(err) => { 226 | return Ok(err.to_string()); 227 | } 228 | } 229 | .unwrap(); 230 | 231 | let result = lint_fix( 232 | ipath, 233 | None, 234 | flags::Noqa::Enabled, 235 | UnsafeFixes::Disabled, 236 | &linter_settings, 237 | &source_kind, 238 | PySourceType::Python, 239 | ); 240 | 241 | return match result { 242 | Ok(diag) => Ok(diag.transformed.as_python().unwrap().to_string()), 243 | Err(error) => Err(PrintError::new_err(error.to_string())), 244 | }; 245 | } 246 | 247 | // -- Python Module Initializer -- 248 | 249 | /// Experimental Python API for Ruff 250 | #[pymodule] 251 | #[pyo3(name = "_rust")] 252 | fn ruff_api(_py: Python, m: &PyModule) -> PyResult<()> { 253 | m.add_function(wrap_pyfunction!(format_string, m)?)?; 254 | m.add_class::()?; 255 | m.add_function(wrap_pyfunction!(isort_string, m)?)?; 256 | m.add_class::()?; 257 | Ok(()) 258 | } 259 | --------------------------------------------------------------------------------