rename-refs

Solid

`$codemap-py:rename-refs`: rename Python names; skip non-Python/unbuilt/local/grep/split/pkg-dir.

AI & Automation 25 stars 4 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 81/100

Stars 20%
47
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Rename Refs Renames a Python symbol or module atomically. Coverage: - Definition site (`def`/`class` line) - `__all__` re-exports in `__init__.py` files - Import call sites across all callers (`fn-rdeps` + symbol line-range narrowing) - Sphinx docstring cross-refs across `.py` and `.rst` - Optional `@deprecated` alias via pyDeprecate (`--deprecate`; requires `pyDeprecate` installed) - Optional hard-delete when the caller graph is exhaustive and callers = 0 **Subcommands**: - `symbol <old_qname> <new_qname>` — function, class, or method. qname = bare (`MyClass`) or qualified (`MyClass.method`) — matched against `qualified_name`, which is symbol-local; the module-qualified form (`module::symbol`) is not accepted by `find-symbol` and returns zero matches. `<module>::<qualified_name>` is composed later, in Step 2, for the `fn-rdeps` call only. - `module <old_module_path> <new_module_path>` — dotted path (`mypackage.old_name`). Renames the file and every import line. **Flags**: - `--dry-run` — print sites that would change; no edits - `--deprecate[=<decorator>]` — symbol only: keep the old name as a pyDeprecate `@deprecated` wrapper → new name; requires `pyDeprecate` - `--since <ver>` / `--removed-in <ver>` — passed to the deprecation decorator; default `"?"` - `--remove-if-no-callers` — symbol only: delete the definition when the caller graph is exhaustive and callers = 0 `--deprecate` and `--remove-if-no-callers` are incompatible (one aliases, the other deletes) — rejec...

Details

Author
Borda
Repository
Borda/AI-Rig
Created
5 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category