Metadata-Version: 2.4
Name: tyedit
Version: 0.0.4
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development :: Quality Assurance
Summary: Automated refactorings for Python projects, powered by ty: rename and move symbols, modules, and packages across a codebase.
Keywords: refactoring,rename,python,ty,typing
Home-Page: https://github.com/mdrachuk/ruffedit
Author-email: Misha Drachuk <m@drach.uk>
License-Expression: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/mdrachuk/ruffedit

# tyedit

Automated refactorings for Python projects, powered by
[ty](https://github.com/astral-sh/ty) — from the
[ruffedit](https://github.com/mdrachuk/ruffedit) fork.

This package installs a single `tyedit` binary, so it coexists with the
upstream [`ty`](https://pypi.org/project/ty/) and
[`ruff`](https://pypi.org/project/ruff/) packages rather than replacing them.
`tyedit <args>` behaves like ty's `edit` subcommand from the fork:

- `tyedit rename` renames a symbol, module, or package and updates all references.
- `tyedit move` moves a module-level function, class, or variable to another module, or moves
    a module or package to another package.

## Usage

```shell
uvx tyedit rename mypkg.models.User Account            # Rename a symbol and update its references.
uvx tyedit move mypkg.utils.parse_config mypkg.config  # Move a function, class, or variable.
uvx tyedit rename mypkg.utils helpers                  # Rename a module (and its file on disk).
uvx tyedit move mypkg.utils otherpkg                   # Move a module into another package.
```

Targets can be a dotted path (as above) or a `path/to/file.py:LINE:COLUMN`
location (1-based). Pass `--dry-run` to show the changes without applying
them, and see `tyedit help rename` and `tyedit help move` for all options.

Type checking is not included — install [`ty`](https://pypi.org/project/ty/)
alongside for that.

