Bump version to 0.0.1-alpha.21 (#1205)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Micha Reiser
2025-09-19 08:42:23 +02:00
committed by GitHub
parent fa31d374be
commit ef52a1940d
8 changed files with 91 additions and 6 deletions
+82
View File
@@ -1,5 +1,87 @@
# Changelog
## 0.0.1-alpha.21
### Bug fixes
- Fix inference of constructor calls to generic classes that have explicitly annotated `self` parameters in their `__init__` methods ([#20325](https://github.com/astral-sh/ruff/pull/20325))
- Fix a stack overflow when computing completions for recursive types ([#20354](https://github.com/astral-sh/ruff/pull/20354))
- Fix panic in `BoundMethodType::into_callable_type()` ([#20369](https://github.com/astral-sh/ruff/pull/20369))
- Fix stack overflows in binary comparison inference ([#20446](https://github.com/astral-sh/ruff/pull/20446))
- Fix many "too many cycle iterations" panics concerning recursive type aliases and/or recursive generics ([#20359](https://github.com/astral-sh/ruff/pull/20359))
- Fix stack overflow involving subtype checks for recursive type aliases ([#20259](https://github.com/astral-sh/ruff/pull/20259))
- Fix panic when inferring the type of an infinitely-nested-tuple implicit instance attribute ([#20333](https://github.com/astral-sh/ruff/pull/20333))
### Server
- Add autocomplete suggestions for unimported symbols ([#20207](https://github.com/astral-sh/ruff/pull/20207), [#20439](https://github.com/astral-sh/ruff/pull/20439))
- Include generated `NamedTuple` methods such as `_make`, `_asdict` and `_replace` in autocomplete suggestions ([#20356](https://github.com/astral-sh/ruff/pull/20356))
### Configuration
- Automatically add `python/` to `environment.root` if a `python/` folder exists in the root of a repository ([#20263](https://github.com/astral-sh/ruff/pull/20263))
### CLI
- Add GitHub output format ([#20358](https://github.com/astral-sh/ruff/pull/20358))
- Add GitLab output format ([#20155](https://github.com/astral-sh/ruff/pull/20155))
### Typing semantics and features
- Add support for generic [PEP-695 type aliases](https://peps.python.org/pep-0695/#generic-type-alias) ([#20219](https://github.com/astral-sh/ruff/pull/20219))
- Allow annotation expressions to be `ast::Attribute` nodes ([#20413](https://github.com/astral-sh/ruff/pull/20413))
- Allow protocols to participate in nominal subtyping as well as structural subtyping ([#20314](https://github.com/astral-sh/ruff/pull/20314))
- Attribute access on top/bottom materializations ([#20221](https://github.com/astral-sh/ruff/pull/20221))
- Bind `Self` type variables to the method, not the class ([#20366](https://github.com/astral-sh/ruff/pull/20366))
- Ensure various special-cased bound methods are understood as assignable to `Callable` ([#20330](https://github.com/astral-sh/ruff/pull/20330))
- Ensure various special-cased builtin functions are understood as assignable to `Callable` ([#20331](https://github.com/astral-sh/ruff/pull/20331))
- Fall back to `object` for attribute access on synthesized protocols ([#20286](https://github.com/astral-sh/ruff/pull/20286))
- Fix signature of `NamedTupleLike._make` ([#20302](https://github.com/astral-sh/ruff/pull/20302))
- Fix subtyping/assignability of function- and class-literal types to callback protocols ([#20363](https://github.com/astral-sh/ruff/pull/20363))
- Implement the legacy PEP-484 convention for indicating positional-only parameters ([#20248](https://github.com/astral-sh/ruff/pull/20248))
- Infer more precise types for collection literals ([#20360](https://github.com/astral-sh/ruff/pull/20360))
- Make `TypeIs` invariant in its type argument ([#20428](https://github.com/astral-sh/ruff/pull/20428))
- Narrow specialized generics using `isinstance()` ([#20256](https://github.com/astral-sh/ruff/pull/20256))
- Proper assignability/subtyping checks for protocols with method members ([#20165](https://github.com/astral-sh/ruff/pull/20165))
- Reduce false positives for `ParamSpec`s and `TypeVarTuple`s ([#20239](https://github.com/astral-sh/ruff/pull/20239))
- Overload evaluation: retry parameter matching for argument type expansion ([#20153](https://github.com/astral-sh/ruff/pull/20153))
- Simplify unions of enum literals and subtypes thereof ([#20324](https://github.com/astral-sh/ruff/pull/20324))
- Support "legacy" `typing.Self` in combination with [PEP-695](https://peps.python.org/pep-0695) generic contexts ([#20304](https://github.com/astral-sh/ruff/pull/20304))
- Treat `Hashable`, and similar protocols, equivalently to `object` for subtyping/assignability ([#20284](https://github.com/astral-sh/ruff/pull/20284))
- Treat `__new__` as a static method ([#20212](https://github.com/astral-sh/ruff/pull/20212))
- `TypedDict`: Add support for `typing.ReadOnly` ([#20241](https://github.com/astral-sh/ruff/pull/20241))
- Detect syntax errors stemming from `yield from` expressions inside async functions ([#20051](https://github.com/astral-sh/ruff/pull/20051))
- `"foo".startswith` is not an instance of `types.MethodWrapperType` ([#20317](https://github.com/astral-sh/ruff/pull/20317))
- Eliminate definitely-impossible types from union in equality narrowing ([#20164](https://github.com/astral-sh/ruff/pull/20164))
- Infer more precise types for the `name` and `value` properties on enum members ([#20311](https://github.com/astral-sh/ruff/pull/20311))
- Initial support for `slots=True` in dataclasses ([#20278](https://github.com/astral-sh/ruff/pull/20278))
- Improve type narrowing in situations involving nested functions ([#19932](https://github.com/astral-sh/ruff/pull/19932))
- Support type aliases in binary comparison inference ([#20445](https://github.com/astral-sh/ruff/pull/20445))
- Sync vendored typeshed stubs ([#20394](https://github.com/astral-sh/ruff/pull/20394)). [Typeshed diff](https://github.com/python/typeshed/compare/2480d7e7c74493a024eaf254c5d2c6f452c80ee2...47dbbd6c914a5190d54bc5bd498d1e6633d97db2)
### Diagnostics
- Improve specialization-error diagnostics ([#20326](https://github.com/astral-sh/ruff/pull/20326))
### Contributors
- [@thejchap](https://github.com/thejchap)
- [@AlexWaygood](https://github.com/AlexWaygood)
- [@mtshiba](https://github.com/mtshiba)
- [@JelleZijlstra](https://github.com/JelleZijlstra)
- [@ibraheemdev](https://github.com/ibraheemdev)
- [@TaKO8Ki](https://github.com/TaKO8Ki)
- [@Glyphack](https://github.com/Glyphack)
- [@ericmarkmartin](https://github.com/ericmarkmartin)
- [@Renkai](https://github.com/Renkai)
- [@sharkdp](https://github.com/sharkdp)
- [@11happy](https://github.com/11happy)
- [@BurntSushi](https://github.com/BurntSushi)
- [@carljm](https://github.com/carljm)
- [@dhruvmanila](https://github.com/dhruvmanila)
- [@github-actions](https://github.com/github-actions)
- [@ntBre](https://github.com/ntBre)
## 0.0.1-alpha.20
### Bug fixes
+1
View File
@@ -8,4 +8,5 @@ extend-ignore-re = [
# Line ignore with trailing "spellchecker:disable-line"
"(?Rm)^.*#\\s*spellchecker:disable-line$",
"LICENSEs",
"ntBre"
]
+1 -1
View File
@@ -1,7 +1,7 @@
[workspace]
members = ["cargo:./ruff"]
packages = ["ty"]
version = "0.0.1-alpha.20"
version = "0.0.1-alpha.21"
# Config for 'dist'
[dist]
+3 -1
View File
@@ -60,8 +60,10 @@ over all configuration files.</p>
</dd><dt id="ty-check--output-format"><a href="#ty-check--output-format"><code>--output-format</code></a> <i>output-format</i></dt><dd><p>The format to use for printing diagnostic messages</p>
<p>Possible values:</p>
<ul>
<li><code>full</code>: Print diagnostics verbosely, with context and helpful hints [default]</li>
<li><code>full</code>: Print diagnostics verbosely, with context and helpful hints (default)</li>
<li><code>concise</code>: Print diagnostics concisely, one per line</li>
<li><code>gitlab</code>: Print diagnostics in the JSON format expected by GitLab Code Quality reports</li>
<li><code>github</code>: Print diagnostics in the format used by GitHub Actions workflow error annotations</li>
</ul></dd><dt id="ty-check--project"><a href="#ty-check--project"><code>--project</code></a> <i>project</i></dt><dd><p>Run the command within the given project directory.</p>
<p>All <code>pyproject.toml</code> files will be discovered by walking up the directory tree from the given project directory, as will the project's virtual environment (<code>.venv</code>) unless the <code>venv-path</code> option is set.</p>
<p>Other command-line arguments (such as relative paths) will be resolved relative to the current working directory.</p>
+1 -1
View File
@@ -144,7 +144,7 @@ If left unspecified, ty will try to detect common project layouts and initialize
* if a `./<project-name>/<project-name>` directory exists, include `.` and `./<project-name>` in the first party search path
* otherwise, default to `.` (flat layout)
Besides, if a `./tests` directory exists and is not a package (i.e. it does not contain an `__init__.py` file),
Besides, if a `./python` or `./tests` directory exists and is not a package (i.e. it does not contain an `__init__.py` or `__init__.pyi` file),
it will also be included in the first party search path.
**Default value**: `null`
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "ty"
version = "0.0.1a20"
version = "0.0.1a21"
requires-python = ">=3.8"
dependencies = []
description = "An extremely fast Python type checker, written in Rust."
+1 -1
Submodule ruff updated: 4e97b97a76...0b60584b7e
Generated
+1 -1
View File
@@ -762,7 +762,7 @@ wheels = [
[[package]]
name = "ty"
version = "0.0.1a20"
version = "0.0.1a21"
source = { editable = "." }
[package.dev-dependencies]