A static reference-finder for Python functions using Pyright and the Language Server Protocol.
Project description
Reffinder
Reffinder is a static reference-finder for Python functions using Pyright and the Language Server Protocol (LSP). It recursively traces references to functions and builds a dependency tree.
⚠️ Disclaimer
This project is currently a proof of concept.
It may contain bugs, edge case limitations, or incomplete features.
Contributions and feedback are welcome.
🚀 Getting Started
🔧 Install
pip install reffinder
📌 Usage
reffinder path/to/file.py <line_number> <definition_character>
Notes:
- line_number is 0-based (e.g. if your IDE shows line 1, use 0)
- definition_character is the character offset of the function name's first letter
Example:
def example(...):
01234 <- character positions
To find references to example, run:
reffinder my_module.py 0 4
🛠 Development
📋 Prerequisites
⚙️ Dev Setup
poetry install
🧪 Build
poetry build
To install the built wheel locally:
pip install dist/reffinder-*.whl --force-reinstall
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reffinder-0.1.0.tar.gz.
File metadata
- Download URL: reffinder-0.1.0.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.9.18 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cac3e317c01cc044dbbb1b1e3a7023ad9f9cbe86e0e3a05446fc45a89363be8
|
|
| MD5 |
0dd334ee44ba75a1ae12f31569f02735
|
|
| BLAKE2b-256 |
01bae2c1f2bc255f44f9a38515068c1a0f80e3e6b57977c65e7c5627b274184d
|
File details
Details for the file reffinder-0.1.0-py3-none-any.whl.
File metadata
- Download URL: reffinder-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.9.18 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95347bc24513597b2db58a540606324f5f21cb9ba9c608086f6a91fc995188a5
|
|
| MD5 |
24ab563ffe6d85d2aa30688c6518999d
|
|
| BLAKE2b-256 |
3856676be9ad5796e05e0ef28ec5ed51657ff0427038c1e525a0613f371b3d71
|