Compare commits
1 Commits
main
...
renovate/p
| Author | SHA1 | Date |
|---|---|---|
|
|
fa8a717c67 |
|
|
@ -9,7 +9,7 @@ exclude: |
|
|||
|
||||
repos:
|
||||
- repo: https://github.com/astral-sh/uv-pre-commit
|
||||
rev: 0.9.13
|
||||
rev: 0.9.18
|
||||
hooks:
|
||||
- id: uv-lock
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ repos:
|
|||
- id: check-merge-conflict
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.14.7
|
||||
rev: v0.14.10
|
||||
hooks:
|
||||
- id: ruff-format
|
||||
- id: ruff
|
||||
|
|
@ -42,7 +42,7 @@ repos:
|
|||
- mdformat-footnote==0.1.2
|
||||
|
||||
- repo: https://github.com/igorshubovych/markdownlint-cli
|
||||
rev: v0.46.0
|
||||
rev: v0.47.0
|
||||
hooks:
|
||||
- id: markdownlint-fix
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ repos:
|
|||
|
||||
# Prettier
|
||||
- repo: https://github.com/rbubley/mirrors-prettier
|
||||
rev: v3.7.3
|
||||
rev: v3.7.4
|
||||
hooks:
|
||||
- id: prettier
|
||||
types: [yaml]
|
||||
|
|
@ -61,12 +61,12 @@ repos:
|
|||
# zizmor detects security vulnerabilities in GitHub Actions workflows.
|
||||
# Additional configuration for the tool is found in `.github/zizmor.yml`
|
||||
- repo: https://github.com/zizmorcore/zizmor-pre-commit
|
||||
rev: v1.18.0
|
||||
rev: v1.19.0
|
||||
hooks:
|
||||
- id: zizmor
|
||||
|
||||
- repo: https://github.com/python-jsonschema/check-jsonschema
|
||||
rev: 0.35.0
|
||||
rev: 0.36.0
|
||||
hooks:
|
||||
- id: check-github-workflows
|
||||
|
||||
|
|
@ -88,4 +88,4 @@ repos:
|
|||
# actionlint has a shellcheck integration which extracts shell scripts in `run:` steps from GitHub Actions
|
||||
# and checks these with shellcheck. This is arguably its most useful feature,
|
||||
# but the integration only works if shellcheck is installed
|
||||
- "github.com/wasilibs/go-shellcheck/cmd/shellcheck@v0.11.1"
|
||||
- "github.com/wasilibs/go-shellcheck/cmd/shellcheck@v0.10.0"
|
||||
|
|
|
|||
39
CHANGELOG.md
39
CHANGELOG.md
|
|
@ -1,44 +1,5 @@
|
|||
# Changelog
|
||||
|
||||
## 0.0.8
|
||||
|
||||
Released on 2025-12-29.
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- Rename `non-subscriptable` rule to `not-subscriptable` ([#22193](https://github.com/astral-sh/ruff/pull/22193))
|
||||
|
||||
### Core type checking
|
||||
|
||||
- Promote float and complex when promoting literals ([#22215](https://github.com/astral-sh/ruff/pull/22215))
|
||||
- Callable type of a type object is not function-like ([#22226](https://github.com/astral-sh/ruff/pull/22226))
|
||||
- Fix and simplify callable type materializations ([#22213](https://github.com/astral-sh/ruff/pull/22213))
|
||||
|
||||
### LSP server
|
||||
|
||||
- Add option to disable syntax errors ([#22217](https://github.com/astral-sh/ruff/pull/22217))
|
||||
- Fix completion in decorators with missing declaration ([#22177](https://github.com/astral-sh/ruff/pull/22177))
|
||||
- Better completions context detection when typing in decorator positions ([#22224](https://github.com/astral-sh/ruff/pull/22224))
|
||||
- Limit the returned completions to reduce lag ([#22240](https://github.com/astral-sh/ruff/pull/22240))
|
||||
|
||||
### Diagnostics
|
||||
|
||||
- Improve wording of `unsupported-base` sub-diagnostic ([#22194](https://github.com/astral-sh/ruff/pull/22194))
|
||||
- Preserve the invalid assignment diagnostic message when implicitly shadowing a definition ([#22219](https://github.com/astral-sh/ruff/pull/22219))
|
||||
|
||||
### Other changes
|
||||
|
||||
- Update docker image to use alpine 3.23 and trixie ([#2217](https://github.com/astral-sh/ty/pull/2217))
|
||||
|
||||
### Contributors
|
||||
|
||||
- [@RasmusNygren](https://github.com/RasmusNygren)
|
||||
- [@samypr100](https://github.com/samypr100)
|
||||
- [@silamon](https://github.com/silamon)
|
||||
- [@carljm](https://github.com/carljm)
|
||||
- [@MichaReiser](https://github.com/MichaReiser)
|
||||
- [@MatthewMckee4](https://github.com/MatthewMckee4)
|
||||
|
||||
## 0.0.7
|
||||
|
||||
Released on 2025-12-24.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[workspace]
|
||||
members = ["cargo:./ruff"]
|
||||
packages = ["ty"]
|
||||
version = "0.0.8"
|
||||
version = "0.0.7"
|
||||
|
||||
# Config for 'dist'
|
||||
[dist]
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ ty includes a standalone installer.
|
|||
Request a specific version by including it in the URL:
|
||||
|
||||
```console
|
||||
$ curl -LsSf https://astral.sh/ty/0.0.8/install.sh | sh
|
||||
$ curl -LsSf https://astral.sh/ty/0.0.7/install.sh | sh
|
||||
```
|
||||
|
||||
=== "Windows"
|
||||
|
|
@ -87,7 +87,7 @@ ty includes a standalone installer.
|
|||
Request a specific version by including it in the URL:
|
||||
|
||||
```pwsh-session
|
||||
PS> powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/ty/0.0.8/install.ps1 | iex"
|
||||
PS> powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/ty/0.0.7/install.ps1 | iex"
|
||||
```
|
||||
|
||||
!!! tip
|
||||
|
|
@ -149,7 +149,7 @@ COPY --from=ghcr.io/astral-sh/ty:latest /ty /bin/
|
|||
The following tags are available:
|
||||
|
||||
- `ghcr.io/astral-sh/ty:latest`
|
||||
- `ghcr.io/astral-sh/ty:{major}.{minor}.{patch}`, e.g., `ghcr.io/astral-sh/ty:0.0.8`
|
||||
- `ghcr.io/astral-sh/ty:{major}.{minor}.{patch}`, e.g., `ghcr.io/astral-sh/ty:0.0.7`
|
||||
- `ghcr.io/astral-sh/ty:{major}.{minor}`, e.g., `ghcr.io/astral-sh/ty:0.0` (the latest patch
|
||||
version)
|
||||
|
||||
|
|
|
|||
|
|
@ -256,64 +256,6 @@ like code completion, hover, go to definition, etc.
|
|||
|
||||
______________________________________________________________________
|
||||
|
||||
## `showSyntaxErrors`
|
||||
|
||||
Whether to show syntax error diagnostics.
|
||||
|
||||
This is useful when using ty with other language servers, allowing the user to refer to syntax errors
|
||||
from only one source.
|
||||
|
||||
**Default value**: `true`
|
||||
|
||||
**Type**: `bool`
|
||||
|
||||
**Example usage**:
|
||||
|
||||
=== "VS Code"
|
||||
|
||||
```json
|
||||
{
|
||||
"ty.showSyntaxErrors": false
|
||||
}
|
||||
```
|
||||
|
||||
=== "Neovim"
|
||||
|
||||
```lua
|
||||
require('lspconfig').ty.setup({
|
||||
settings = {
|
||||
ty = {
|
||||
showSyntaxErrors = false,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- For Neovim 0.11.0 and later:
|
||||
vim.lsp.config('ty', {
|
||||
settings = {
|
||||
ty = {
|
||||
showSyntaxErrors = false,
|
||||
},
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
=== "Zed"
|
||||
|
||||
```json
|
||||
{
|
||||
"lsp": {
|
||||
"ty": {
|
||||
"settings": {
|
||||
"showSyntaxErrors": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
______________________________________________________________________
|
||||
|
||||
## `inlayHints`
|
||||
|
||||
These settings control the inline hints that ty provides in an editor.
|
||||
|
|
|
|||
|
|
@ -2005,6 +2005,30 @@ def func(x: bool): ...
|
|||
func("string") # error: [no-matching-overload]
|
||||
```
|
||||
|
||||
## `non-subscriptable`
|
||||
|
||||
<small>
|
||||
Default level: <a href="../../rules#rule-levels" title="This lint has a default level of 'error'."><code>error</code></a> ·
|
||||
Added in <a href="https://github.com/astral-sh/ty/releases/tag/0.0.1-alpha.1">0.0.1-alpha.1</a> ·
|
||||
<a href="https://github.com/astral-sh/ty/issues?q=sort%3Aupdated-desc%20is%3Aissue%20is%3Aopen%20non-subscriptable" target="_blank">Related issues</a> ·
|
||||
<a href="https://github.com/astral-sh/ruff/blob/main/crates%2Fty_python_semantic%2Fsrc%2Ftypes%2Fdiagnostic.rs#L1453" target="_blank">View source</a>
|
||||
</small>
|
||||
|
||||
|
||||
**What it does**
|
||||
|
||||
Checks for subscripting objects that do not support subscripting.
|
||||
|
||||
**Why is this bad?**
|
||||
|
||||
Subscripting an object that does not support it will raise a `TypeError` at runtime.
|
||||
|
||||
**Examples**
|
||||
|
||||
```python
|
||||
4[1] # TypeError: 'int' object is not subscriptable
|
||||
```
|
||||
|
||||
## `not-iterable`
|
||||
|
||||
<small>
|
||||
|
|
@ -2031,30 +2055,6 @@ for i in 34: # TypeError: 'int' object is not iterable
|
|||
pass
|
||||
```
|
||||
|
||||
## `not-subscriptable`
|
||||
|
||||
<small>
|
||||
Default level: <a href="../../rules#rule-levels" title="This lint has a default level of 'error'."><code>error</code></a> ·
|
||||
Added in <a href="https://github.com/astral-sh/ty/releases/tag/0.0.1-alpha.1">0.0.1-alpha.1</a> ·
|
||||
<a href="https://github.com/astral-sh/ty/issues?q=sort%3Aupdated-desc%20is%3Aissue%20is%3Aopen%20not-subscriptable" target="_blank">Related issues</a> ·
|
||||
<a href="https://github.com/astral-sh/ruff/blob/main/crates%2Fty_python_semantic%2Fsrc%2Ftypes%2Fdiagnostic.rs#L1453" target="_blank">View source</a>
|
||||
</small>
|
||||
|
||||
|
||||
**What it does**
|
||||
|
||||
Checks for subscripting objects that do not support subscripting.
|
||||
|
||||
**Why is this bad?**
|
||||
|
||||
Subscripting an object that does not support it will raise a `TypeError` at runtime.
|
||||
|
||||
**Examples**
|
||||
|
||||
```python
|
||||
4[1] # TypeError: 'int' object is not subscriptable
|
||||
```
|
||||
|
||||
## `override-of-final-method`
|
||||
|
||||
<small>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[project]
|
||||
name = "ty"
|
||||
version = "0.0.8"
|
||||
version = "0.0.7"
|
||||
requires-python = ">=3.8"
|
||||
dependencies = []
|
||||
description = "An extremely fast Python type checker, written in Rust."
|
||||
|
|
|
|||
2
ruff
2
ruff
|
|
@ -1 +1 @@
|
|||
Subproject commit e71fd9c0408dbedff0c80b6855c5612c82091f59
|
||||
Subproject commit f9afcc400ce56b1cc0dd1f20f3910afb0bb37d44
|
||||
|
|
@ -165,7 +165,7 @@ def main() -> None:
|
|||
|
||||
if expected_ruff_revision != actual_ruff_revision:
|
||||
print(
|
||||
f"The ruff submodule is at {actual_ruff_revision} but main expects {expected_ruff_revision}"
|
||||
f"The ruff submodule is at {expected_ruff_revision} but main expects {actual_ruff_revision}"
|
||||
)
|
||||
match input(
|
||||
"How do you want to proceed (u=reset submodule, n=abort, y=continue)? "
|
||||
|
|
|
|||
Loading…
Reference in New Issue