Bump version to 0.0.1-alpha.10 (#651)
Some checks failed
CI / python package (push) Has been cancelled
CI / pre-commit (push) Has been cancelled
CI / Check generated files unedited (push) Has been cancelled

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Carl Meyer 2025-06-13 13:19:49 -07:00 committed by GitHub
parent 56d44b6df9
commit 15bae14c22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 104 additions and 7 deletions

View file

@ -1,5 +1,39 @@
# Changelog
## 0.0.1-alpha.10
### Server
- Improve support for `object.<CURSOR>` completions ([#18629](https://github.com/astral-sh/ruff/pull/18629))
### Configuration
- Add file inclusion and exclusion ([#18498](https://github.com/astral-sh/ruff/pull/18498))
- Infer the Python version from `--python=<system installation>` on Unix ([#18550](https://github.com/astral-sh/ruff/pull/18550))
### Bug fixes
- Delay computation of 'unbound' visibility for implicit instance attributes ([#18669](https://github.com/astral-sh/ruff/pull/18669)).
This fixes a significant performance regression in version 0.0.1-alpha.9.
### Typing semantics and features
- Support the `del` statement; model implicit deletion of except handler names ([#18593](https://github.com/astral-sh/ruff/pull/18593))
### Release
- Include ruff/ directory in release source tarballs ([#617](https://github.com/astral-sh/ty/pull/617))
### Contributors
- [@AlexWaygood](https://github.com/AlexWaygood)
- [@BurntSushi](https://github.com/BurntSushi)
- [@Gankra](https://github.com/Gankra)
- [@mtshiba](https://github.com/mtshiba)
- [@sharkdp](https://github.com/sharkdp)
- [@dhruvmanila](https://github.com/dhruvmanila)
- [@MichaReiser](https://github.com/MichaReiser)
## 0.0.1-alpha.9
### Typing semantics and features

View file

@ -1,7 +1,7 @@
[workspace]
members = ["cargo:./ruff"]
packages = ["ty"]
version = "0.0.1-alpha.9"
version = "0.0.1-alpha.10"
# Config for 'dist'
[dist]

4
docs/reference/cli.md generated
View file

@ -51,6 +51,8 @@ over all configuration files.</p>
<p>While ty configuration can be included in a <code>pyproject.toml</code> file, it is not allowed in this context.</p>
<p>May also be set with the <code>TY_CONFIG_FILE</code> environment variable.</p></dd><dt id="ty-check--error"><a href="#ty-check--error"><code>--error</code></a> <i>rule</i></dt><dd><p>Treat the given rule as having severity 'error'. Can be specified multiple times.</p>
</dd><dt id="ty-check--error-on-warning"><a href="#ty-check--error-on-warning"><code>--error-on-warning</code></a></dt><dd><p>Use exit code 1 if there are any warning-level diagnostics</p>
</dd><dt id="ty-check--exclude"><a href="#ty-check--exclude"><code>--exclude</code></a> <i>exclude</i></dt><dd><p>Glob patterns for files to exclude from type checking.</p>
<p>Uses gitignore-style syntax to exclude files and directories from type checking. Supports patterns like <code>tests/</code>, <code>*.tmp</code>, <code>**/__pycache__/**</code>.</p>
</dd><dt id="ty-check--exit-zero"><a href="#ty-check--exit-zero"><code>--exit-zero</code></a></dt><dd><p>Always use exit code 0, even when there are error-level diagnostics</p>
</dd><dt id="ty-check--extra-search-path"><a href="#ty-check--extra-search-path"><code>--extra-search-path</code></a> <i>path</i></dt><dd><p>Additional path to use as a module-resolution source (can be passed multiple times)</p>
</dd><dt id="ty-check--help"><a href="#ty-check--help"><code>--help</code></a>, <code>-h</code></dt><dd><p>Print help (see a summary with '-h')</p>
@ -72,7 +74,7 @@ over all configuration files.</p>
<p>This is used to specialize the type of <code>sys.platform</code> and will affect the visibility of platform-specific functions and attributes. If the value is set to <code>all</code>, no assumptions are made about the target platform. If unspecified, the current system's platform will be used.</p>
</dd><dt id="ty-check--python-version"><a href="#ty-check--python-version"><code>--python-version</code></a>, <code>--target-version</code> <i>version</i></dt><dd><p>Python version to assume when resolving types.</p>
<p>The Python version affects allowed syntax, type definitions of the standard library, and type definitions of first- and third-party modules that are conditional on the Python version.</p>
<p>By default, the Python version is inferred as the lower bound of the project's <code>requires-python</code> field from the <code>pyproject.toml</code>, if available. Otherwise, if a virtual environment has been configured or detected and a Python version can be inferred from the virtual environment's metadata, that version will be used. If neither of these applies, ty will fall back to the latest stable Python version supported by ty (currently 3.13).</p>
<p>If a version is not specified on the command line or in a configuration file, ty will try the following techniques in order of preference to determine a value: 1. Check for the <code>project.requires-python</code> setting in a <code>pyproject.toml</code> file and use the minimum version from the specified range 2. Check for an activated or configured Python environment and attempt to infer the Python version of that environment 3. Fall back to the latest stable Python version supported by ty (currently Python 3.13)</p>
<p>Possible values:</p>
<ul>
<li><code>3.7</code></li>

View file

@ -111,8 +111,8 @@ If a version is not specified, ty will try the following techniques in order of
to determine a value:
1. Check for the `project.requires-python` setting in a `pyproject.toml` file
and use the minimum version from the specified range
2. Check for an activated or configured virtual environment
and use the Python version of that environment
2. Check for an activated or configured Python environment
and attempt to infer the Python version of that environment
3. Fall back to the default value (see below)
For some language features, ty can also understand conditionals based on comparisons
@ -153,6 +153,67 @@ typeshed = "/path/to/custom/typeshed"
## `src`
#### `exclude`
A list of file and directory patterns to exclude from type checking.
Patterns follow a syntax similar to `.gitignore`:
- `./src/` matches only a directory
- `./src` matches both files and directories
- `src` matches files or directories named `src` anywhere in the tree (e.g. `./src` or `./tests/src`)
- `*` matches any (possibly empty) sequence of characters (except `/`).
- `**` matches zero or more path components.
This sequence **must** form a single path component, so both `**a` and `b**` are invalid and will result in an error.
A sequence of more than two consecutive `*` characters is also invalid.
- `?` matches any single character except `/`
- `[abc]` matches any character inside the brackets. Character sequences can also specify ranges of characters, as ordered by Unicode,
so e.g. `[0-9]` specifies any character between `0` and `9` inclusive. An unclosed bracket is invalid.
- `!pattern` negates a pattern (undoes the exclusion of files that would otherwise be excluded)
By default, the following directories are excluded:
- `.bzr`
- `.direnv`
- `.eggs`
- `.git`
- `.git-rewrite`
- `.hg`
- `.mypy_cache`
- `.nox`
- `.pants.d`
- `.pytype`
- `.ruff_cache`
- `.svn`
- `.tox`
- `.venv`
- `__pypackages__`
- `_build`
- `buck-out`
- `dist`
- `node_modules`
- `venv`
You can override any default exclude by using a negated pattern. For example,
to re-include `dist` use `exclude = ["!dist"]`
**Default value**: `null`
**Type**: `list[str]`
**Example usage** (`pyproject.toml`):
```toml
[tool.ty.src]
exclude = [
"generated",
"*.proto",
"tests/fixtures/**",
"!tests/fixtures/important.py" # Include this one file
]
```
---
#### `respect-ignore-files`
Whether to automatically exclude files that are ignored by `.ignore`,

View file

@ -1,6 +1,6 @@
[project]
name = "ty"
version = "0.0.1a9"
version = "0.0.1a10"
requires-python = ">=3.8"
dependencies = []
description = "An extremely fast Python type checker, written in Rust."

2
ruff

@ -1 +1 @@
Subproject commit 3aae1cd59b6490c72af055d28add6cc2f983e545
Subproject commit 89d915a1e34144051815dfcbe60ec2cdeb29909e

2
uv.lock generated
View file

@ -762,7 +762,7 @@ wheels = [
[[package]]
name = "ty"
version = "0.0.1a9"
version = "0.0.1a10"
source = { editable = "." }
[package.dev-dependencies]