Skip to content

Commit e9cb838

Browse files
AlexWaygoodsharkdp
andauthored
Bump version to 0.0.1-alpha.19 (#1050)
Co-authored-by: David Peter <[email protected]>
1 parent f2242aa commit e9cb838

File tree

7 files changed

+184
-65
lines changed

7 files changed

+184
-65
lines changed

CHANGELOG.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,60 @@
11
# Changelog
22

3+
## 0.0.1-alpha.19
4+
5+
### Bug fixes
6+
7+
- Fix false-positive diagnostics if a function parameter is annotated with `type[P]` where `P` is a protocol class ([#19947](https://github.com/astral-sh/ruff/pull/19947))
8+
- Fix ANSI colors in terminal output on old Windows terminals ([#19984](https://github.com/astral-sh/ruff/pull/19984))
9+
- Fix protocol interface inference for protocols in stub files with `ClassVar` members and "subprotocols" that extend other protocols ([#19950](https://github.com/astral-sh/ruff/pull/19950))
10+
- Fix inference of equality comparisons between enum members ([#19666](https://github.com/astral-sh/ruff/pull/19666))
11+
- Remove incorrect type narrowing for `if type(x) is C[int]` ([#19926](https://github.com/astral-sh/ruff/pull/19926))
12+
- Improve detection of `TypeError`s resulting from protocol classes illegally inheriting from non-protocol classes ([#19941](https://github.com/astral-sh/ruff/pull/19941)). We previously detected this error, but only when the protocol class illegally inherited from a non-generic class or an unspecialized generic class. We now also detect it when the protocol class inherits from a specialized generic class.
13+
- Fix incorrectly precise type inference in some situations involving nested scopes ([#19908](https://github.com/astral-sh/ruff/pull/19908))
14+
- Fix unpacking a type alias with a precise tuple spec ([#19981](https://github.com/astral-sh/ruff/pull/19981))
15+
16+
### `NamedTuple` semantics improvements
17+
18+
- Synthesize read-only properties for all declared members on `NamedTuple` classes ([#19899](https://github.com/astral-sh/ruff/pull/19899))
19+
- Allow any instance of a `NamedTuple` class to be passed to a function parameter annotated with `typing.NamedTuple` ([#19915](https://github.com/astral-sh/ruff/pull/19915))
20+
- Detect `NamedTuple` classes where fields without default values illegally follow fields with default values ([#19945](https://github.com/astral-sh/ruff/pull/19945)). This causes `TypeError` to be raised at runtime.
21+
- Detect illegal multiple inheritance with `NamedTuple` ([#19943](https://github.com/astral-sh/ruff/pull/19943)). This causes `TypeError` to be raised at runtime.
22+
23+
### Other typing and semantics improvements
24+
25+
- Add support for stubs packages with `partial` in their `py.typed` files ([#19931](https://github.com/astral-sh/ruff/pull/19931))
26+
- Look for `site-packages` directories in `<sys.prefix>/lib64/` as well as `<sys.prefix>/lib/` on non-Windows systems ([#19978](https://github.com/astral-sh/ruff/pull/19978)). This change fixes a number of `unresolved-import` false-positive diagnostics reported by Poetry users.
27+
- Add diagnostics for invalid `await` expressions ([#19711](https://github.com/astral-sh/ruff/pull/19711))
28+
- Add `else`-branch narrowing for `if type(a) is A` when `A` is `@final` ([#19925](https://github.com/astral-sh/ruff/pull/19925))
29+
- Improve solving of typevars with defaults, and `typing.Self` ([#19786](https://github.com/astral-sh/ruff/pull/19786))
30+
- Support the `kw_only` parameter for `dataclasses.dataclass()` and `dataclasses.field()` ([#19677](https://github.com/astral-sh/ruff/pull/19677))
31+
- Sync vendored typeshed stubs ([#19923](https://github.com/astral-sh/ruff/pull/19923)). [Typeshed diff](https://github.com/python/typeshed/compare/3f08a4ed10b321c378107c236a06a33584869a9b...893b9a760deb3be64d13c748318e95a752230961).
32+
33+
### Server improvements
34+
35+
- Improve goto/hover for definitions ([#19976](https://github.com/astral-sh/ruff/pull/19976))
36+
37+
### Performance improvements
38+
39+
- Short-circuit a server [inlay hints request](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_inlayHint) if all settings under `ty.inlayHints` are disabled ([#19963](https://github.com/astral-sh/ruff/pull/19963))
40+
- Speedup server tracing checks ([#19965](https://github.com/astral-sh/ruff/pull/19965))
41+
- Add caching to logic for inferring whether a class is a `NamedTuple`, a dataclass or a `TypedDict` ([#19912](https://github.com/astral-sh/ruff/pull/19912))
42+
- Speedup project file discovery ([#19913](https://github.com/astral-sh/ruff/pull/19913))
43+
44+
### Contributors
45+
46+
- [@dcreager](https://github.com/dcreager)
47+
- [@MichaReiser](https://github.com/MichaReiser)
48+
- [@sharkdp](https://github.com/sharkdp)
49+
- [@github-actions](https://github.com/github-actions)
50+
- [@mtshiba](https://github.com/mtshiba)
51+
- [@theammir](https://github.com/theammir)
52+
- [@AlexWaygood](https://github.com/AlexWaygood)
53+
- [@thejchap](https://github.com/thejchap)
54+
- [@Gankra](https://github.com/Gankra)
55+
- [@MatthewMckee4](https://github.com/MatthewMckee4)
56+
- [@carljm](https://github.com/carljm)
57+
358
## 0.0.1-alpha.18
459

560
### Bug fixes

dist-workspace.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[workspace]
22
members = ["cargo:./ruff"]
33
packages = ["ty"]
4-
version = "0.0.1-alpha.18"
4+
version = "0.0.1-alpha.19"
55

66
# Config for 'dist'
77
[dist]

docs/reference/configuration.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)