mirror of
https://github.com/astral-sh/ruff.git
synced 2026-11-22 01:58:04 +08:00
## Summary
For `rows = [0, {"key": 1}]`, ty records a definition for
`rows[1]["key"]`. It also builds the path `rows[0]` before discovering
that `0` has no keys to record. Check the element’s syntax first so that
only dictionary, list, and tuple literals need a path. On a flat table
of strings, this skips formatting every index and copying the parent
path for every element.
A cold check of all 193 files in Unidecode’s package used **6.54–8.17%
fewer instructions** in two opposite-order Cachegrind pairs. Two
consecutive baseline runs differed by 1.05%. Both binaries reported the
same diagnostic. [Unidecode
source](https://github.com/avian2/unidecode/tree/158ec2c7e7b5d4bc7894cb2a99e050cdf3229c48/unidecode)
On PyTorch, one baseline control printed the members of a union in a
different order. Repeating the complete control pair gave identical
output. The original control spread (0.19%) exceeded both measured
increases (0.11–0.12%).
| Project | [Base
instructions](https://github.com/astral-sh/ruff/commit/a866aff503fd777156c1ae4eae318a3795fa09ec)
| [PR
instructions](https://github.com/astral-sh/ruff/commit/c6fd3f2cab391e076742ef752702e1c4673f751c)
| Change | Paired range |
| --- | ---: | ---: | ---: | ---: |
|
[Black](https://github.com/psf/black/tree/55996d1fb8342725c8a19b6023cd9439c3c1d6f7)
(inconclusive) | 3,172,160,776 | 3,170,240,095 | -0.06% | -0.10% to
-0.02% |
|
[discord.py](https://github.com/Rapptz/discord.py/tree/65232c38702be5844cf2ce865a4777eb1928b5d0)
| 8,250,818,298.5 | 8,225,247,728.5 | -0.31% | -0.31% to -0.31% |
| [Home
Assistant](https://github.com/home-assistant/core/tree/c19ae285ede74cd64c3045a3a4aa43290c224f1b)
| 159,249,067,362 | 159,193,688,472 | -0.03% | -0.04% to -0.03% |
|
[isort](https://github.com/pycqa/isort/tree/a514c71ed86c2216d0040c7d60e302ed76a4f7ab)
(inconclusive) | 1,861,707,996 | 1,861,177,660.5 | -0.03% | -0.08% to
+0.03% |
|
[Jinja](https://github.com/pallets/jinja/tree/5ef70112a1ff19c05324ff889dd30405b1002044)
(inconclusive) | 1,943,539,308.5 | 1,942,720,756.5 | -0.04% | -0.15% to
+0.06% |
|
[pandas](https://github.com/pandas-dev/pandas/tree/a0225b65720018f4654390bb16d254daa6ee5e54)
(inconclusive) | 28,825,500,104 | 28,856,491,440 | +0.11% | +0.07% to
+0.14% |
|
[pandas-stubs](https://github.com/pandas-dev/pandas-stubs/tree/8dd6d91b1c05b26e30f7ddbe3dc3d4042a92bdd6)
(inconclusive) | 2,970,202,966.5 | 2,972,995,026.5 | +0.09% | -0.04% to
+0.23% |
|
[Prefect](https://github.com/PrefectHQ/prefect/tree/a9452ac21852755311913cb27887b083b5007c03)
(inconclusive) | 4,958,416,686.5 | 4,954,070,603 | -0.09% | -0.13% to
-0.05% |
|
[PyTorch](https://github.com/pytorch/pytorch/tree/ab92945cea42e47ae398aead69af0872d340ea0f)
| 96,603,826,117.5 | 96,714,696,665.5 | +0.11% | +0.11% to +0.12% |
|
[HTTPX](https://github.com/encode/httpx/tree/b5addb64f0161ff6bfe94c124ef76f6a1fba5254)
| 1,682,008,175 | 1,679,819,466.5 | -0.13% | -0.14% to -0.12% |
|
[NumPy](https://github.com/numpy/numpy/tree/f9f1772ce010001208475f751d19253469788410)
(inconclusive) | 8,496,526,775 | 8,481,607,010.5 | -0.18% | -0.24% to
-0.11% |
|
[FastAPI](https://github.com/fastapi/fastapi/tree/7a0a3f0b286c6c865cf4398ea0e957a87b8bffa4)
(inconclusive) | 3,007,906,882 | 3,003,576,346 | -0.14% | -0.27% to
-0.02% |
|
[SQLAlchemy](https://github.com/sqlalchemy/sqlalchemy/tree/10f4d1e2d706a7722ca78e79ce05b00333a7aa5b)
(inconclusive) | 21,522,897,412 | 21,529,244,287 | +0.03% | 0.00% to
+0.05% |
|
[Rich](https://github.com/Textualize/rich/tree/9d8f9a372cc5916fd4781fec207ced7ddac2f08f)
(inconclusive) | 2,718,804,490 | 2,722,362,464 | +0.13% | +0.06% to
+0.20% |
|
[Django](https://github.com/django/django/tree/b501b8493f31cf8cba31211d59b3b78642b8cb02)
(inconclusive) | 13,899,963,771 | 13,902,323,738.5 | +0.02% | -0.05% to
+0.09% |
|
[SymPy](https://github.com/sympy/sympy/tree/85d3998a4517ffbc8a9709b8efa769bb417c174a)
(inconclusive) | 46,192,323,434.5 | 46,177,341,041.5 | -0.03% | -0.13%
to +0.07% |
| [OpenAI Python
SDK](https://github.com/openai/openai-python/tree/f6e8480f9a5b2a4d02b17a1da54a1e57964bc312)
(inconclusive) | 16,017,319,604.5 | 16,003,370,503 | -0.09% | -0.10% to
-0.07% |
|
[pytest](https://github.com/pytest-dev/pytest/tree/8b005ed7f972987033ec34dc1e68b0635fb8142b)
(inconclusive) | 8,830,285,931.5 | 8,813,189,358 | -0.19% | -0.39% to
+0.01% |
|
[aiohttp](https://github.com/aio-libs/aiohttp/tree/fe099491d275ef2c21bf683e024e34d51ac05d43)
(inconclusive) | 4,177,921,653 | 4,174,284,592.5 | -0.09% | -0.16% to
-0.01% |
|
[Ansible](https://github.com/ansible/ansible/tree/b4b2b1e82a535d27f902a71fc8396c3af138fca2)
(inconclusive) | 14,443,698,045.5 | 14,446,129,316 | +0.02% | -0.07% to
+0.10% |
|
[botocore](https://github.com/boto/botocore/tree/e250abbe956da791c16086575e6ddb1f2da81a78)
| 3,027,084,274.5 | 3,024,016,234.5 | -0.10% | -0.12% to -0.09% |
|
[Celery](https://github.com/celery/celery/tree/9c2f238334331db43f15956f131235fd3bb70fd1)
(inconclusive) | 4,822,637,832.5 | 4,821,292,659.5 | -0.03% | -0.10% to
+0.05% |
|
[Dask](https://github.com/dask/dask/tree/249a51a1db4261791b93b4ce04e67341729939c3)
| 34,979,213,499.5 | 34,940,077,750 | -0.11% | -0.16% to -0.06% |
|
[NetworkX](https://github.com/networkx/networkx/tree/6855cd586982cc2e4710b8eb87251ccf56674bf1)
(inconclusive) | 15,759,365,367 | 15,744,090,808.5 | -0.10% | -0.13% to
-0.06% |
|
[Pydantic](https://github.com/pydantic/pydantic/tree/560f0f96a37d6913afdfddb2de22030ef08e68c3)
(inconclusive) | 13,069,015,873 | 13,068,311,414.5 | -0.01% | -0.03% to
+0.02% |
|
[scikit-learn](https://github.com/scikit-learn/scikit-learn/tree/ee56c8b5d809dc7b970a140ed501269b63c69cf8)
(inconclusive) | 66,892,036,444 | 66,883,934,003.5 | -0.01% | -0.01% to
-0.01% |
|
[Scrapy](https://github.com/scrapy/scrapy/tree/e63a574c767d7a9438c21db158f605f1c44c6e6a)
(inconclusive) | 8,982,420,016 | 8,970,547,795.5 | -0.13% | -0.22% to
-0.05% |
|
[Transformers](https://github.com/huggingface/transformers/tree/3a134bc37f7c22c801b618e289b0255425f22647)
(inconclusive) | 102,145,126,013.5 | 102,181,893,436 | +0.04% | +0.02%
to +0.05% |
ty_python_core
This crate is an internal component of Ruff. The Rust API exposed here is unstable and will have frequent breaking changes.
This version (0.0.23) is a component of Ruff 0.17.6. The source can be found here.
See Ruff's crate versioning policy for details on versioning.