Metadata-Version: 2.4
Name: ty-extended
Version: 0.84.4
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: pydantic-monty-runtime>=1.0.0,<2 ; (python_full_version >= '3.10' and platform_machine == 'AMD64' and sys_platform == 'win32' and extra == 'monty-workers') or (python_full_version >= '3.10' and platform_machine == 'x86' and sys_platform == 'win32' and extra == 'monty-workers') or (python_full_version >= '3.10' and platform_machine == 'aarch64' and sys_platform == 'linux' and extra == 'monty-workers') or (python_full_version >= '3.10' and platform_machine == 'ppc64le' and sys_platform == 'linux' and extra == 'monty-workers') or (python_full_version >= '3.10' and platform_machine == 's390x' and sys_platform == 'linux' and extra == 'monty-workers') or (python_full_version >= '3.10' and platform_machine == 'arm64' and sys_platform == 'darwin' and extra == 'monty-workers') or (python_full_version >= '3.10' and platform_machine == 'x86_64' and sys_platform == 'darwin' and extra == 'monty-workers') or (python_full_version >= '3.10' and platform_machine == 'x86_64' and sys_platform == 'linux' and extra == 'monty-workers') or (python_full_version >= '3.10' and platform_machine == 'x86_64' and sys_platform == 'win32' and extra == 'monty-workers')
Provides-Extra: monty-workers
License-File: LICENSE
Summary: A ty fork with semantic plugin support.
Keywords: ty,typing,analysis,check,plugins
Home-Page: https://github.com/regularkevvv/ty-extended/
Author-email: Kevin Castro <hola@kev.pe>
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/regularkevvv/ty-extended/blob/main/CHANGELOG.md
Project-URL: Releases, https://github.com/regularkevvv/ty-extended/releases
Project-URL: Repository, https://github.com/regularkevvv/ty-extended

# ty-extended

[![PyPI](https://img.shields.io/pypi/v/ty-extended.svg)](https://pypi.org/project/ty-extended/)

A fork of [Astral's ty](https://github.com/astral-sh/ty) with support for semantic plugins.
It keeps the `ty` command and language server.

## Getting started

Run with [uvx](https://docs.astral.sh/uv/guides/tools/#running-tools):

```shell
uvx --from ty-extended ty check
```

Or add it to your project:

```shell
uv add --dev ty-extended
uv run ty check
```

## Plugins

```mermaid
flowchart LR
    subgraph host["ty-extended"]
        checker["ty semantic checker"] -->|claimed hook| router["Plugin router"]
        router -->|validated patch| checker
    end

    project["Python project"] --> checker
    config["ty.toml + plugin manifest"] --> router
    router -->|JSON request| wasm["WASM plugin<br/>inside Wasmtime"]
    wasm -->|declarative patch| router
    router -->|JSON request| monty["Python plugin inside Monty<br/>embedded by default, optional worker"]
    monty -->|declarative patch| router
    checker --> output["Types + diagnostics"]
```

- **Rust** plugins compile to WebAssembly and run in Wasmtime, using
    [`ty_plugin_sdk`](https://crates.io/crates/ty_plugin_sdk).
- **Python** plugins run in Monty, using the bundled `ty.plugin_sdk`. No compilation is needed.

Monty runs in-process by default, with no external runtime dependency. Separate
[worker processes](https://github.com/regularkevvv/ty-extended/blob/v0.84.4/docs/plugin-runtime.md#monty-worker-processes) are opt-in through the
`monty-workers` extra and project configuration.

Enable installed plugins in `ty.toml`:

```toml
[plugins]
auto-discover = true
```

## Existing plugins

- [`django-ty`](https://github.com/regularkevvv/django-ty): Django ORM type support
    ([PyPI](https://pypi.org/project/django-ty/)).

## Documentation

- [Installation](https://github.com/regularkevvv/ty-extended/blob/v0.84.4/docs/installation.md) and [editor setup](https://github.com/regularkevvv/ty-extended/blob/v0.84.4/docs/editors.md)
- [Plugin authoring](https://github.com/regularkevvv/ty-extended/blob/v0.84.4/docs/plugin-authoring.md) and [runtime configuration](https://github.com/regularkevvv/ty-extended/blob/v0.84.4/docs/plugin-runtime.md)
- [FAQ](https://github.com/regularkevvv/ty-extended/blob/v0.84.4/docs/faq.md) and [changelog](https://github.com/regularkevvv/ty-extended/blob/v0.84.4/CHANGELOG.md)
- [Upstream ty documentation](https://docs.astral.sh/ty/) for checker and typing features

Report fork or plugin issues in the [issue tracker](https://github.com/regularkevvv/ty-extended/issues).

## Contributing

Rust implementation changes belong in [ruff-extended](https://github.com/regularkevvv/ruff-extended),
which is pinned by the `ruff` submodule. See [CONTRIBUTING.md](https://github.com/regularkevvv/ty-extended/blob/v0.84.4/CONTRIBUTING.md).

## Version policy

Versions track the upstream ty base: `ty-extended 0.84.4` builds on `ty 0.0.84`, with fork-only
releases incrementing the patch. SDK and protocol crates are versioned independently; breaking
changes may occur between their pre-1.0 releases.

## License

MIT ([LICENSE](https://github.com/regularkevvv/ty-extended/blob/v0.84.4/LICENSE)).

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in
ty by you, as defined in the MIT license, shall be licensed as above, without any additional terms
or conditions.

