Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: bundled with original

Aurora LSP

LSP integration for Aurora - code intelligence, dead code detection, and impact analysis.

Built on multilspy (Microsoft) with custom layers for import filtering and code analysis.

Features

  • Find Usages (excluding imports) - Distinguish actual code usage from import statements
  • Dead Code Detection - Find functions/classes with 0 usages
  • Linting - Get errors, warnings, hints via LSP diagnostics
  • Call Hierarchy - Find callers of a function (where supported)

Supported Languages

Language LSP Server Import Filtering Call Hierarchy
Python Pyright Limited
TypeScript tsserver
JavaScript tsserver
Rust rust-analyzer
Go gopls
Java Eclipse JDT
Ruby Solargraph Limited
C# OmniSharp
Dart Dart Analysis
Kotlin kotlin-lsp Limited

Installation

pip install aurora-lsp

Usage

Basic Usage

from aurora_lsp import AuroraLSP

# Initialize with workspace path
lsp = AuroraLSP("/path/to/project")

# Find usages of a symbol (excluding imports)
result = lsp.find_usages("src/main.py", line=10, col=5)
print(f"Found {result['total_usages']} usages ({result['total_imports']} imports filtered)")

# Get usage summary with impact assessment
summary = lsp.get_usage_summary("src/main.py", line=10, col=5, symbol_name="MyClass")
print(f"Impact: {summary['impact']} ({summary['files_affected']} files affected)")

# Find dead code
dead = lsp.find_dead_code()
for item in dead:
    print(f"Unused: {item['name']} ({item['kind']}) in {item['file']}:{item['line']}")

# Lint a directory
diags = lsp.lint("src/")
print(f"{diags['total_errors']} errors, {diags['total_warnings']} warnings")

# Find callers of a function
callers = lsp.get_callers("src/utils.py", line=25, col=0)
for caller in callers:
    print(f"Called by: {caller['name']} in {caller['file']}")

# Clean up
lsp.close()

Context Manager

from aurora_lsp import AuroraLSP

with AuroraLSP("/path/to/project") as lsp:
    dead = lsp.find_dead_code()
    print(f"Found {len(dead)} dead code items")
# Server connections closed automatically

Convenience Functions

from aurora_lsp import find_usages, find_dead_code, lint

# One-off operations (creates temporary LSP instance)
result = find_usages("src/main.py", line=10, col=5)
dead = find_dead_code("src/")
diags = lint("src/")

API Reference

AuroraLSP

Main facade class providing synchronous API.

find_usages(file_path, line, col, include_imports=False) -> dict

Find usages of a symbol.

Returns:

  • usages: List of usage locations with context
  • imports: List of import locations
  • total_usages: Count of actual usages
  • total_imports: Count of import statements

get_usage_summary(file_path, line, col, symbol_name=None) -> dict

Get comprehensive usage summary.

Returns:

  • symbol: Symbol name
  • total_usages: Usage count
  • total_imports: Import count
  • impact: 'low' (<3), 'medium' (3-10), 'high' (>10)
  • files_affected: Number of files with usages
  • usages_by_file: Usages grouped by file

find_dead_code(path=None, include_private=False) -> list[dict]

Find functions/classes with 0 usages.

Returns: List of items with:

  • file: File path
  • line: Line number
  • name: Symbol name
  • kind: 'function', 'class', or 'method'
  • imports: Number of times imported but never used

lint(path=None, severity_filter=None) -> dict

Get linting diagnostics.

Returns:

  • errors: List of errors
  • warnings: List of warnings
  • hints: List of hints
  • total_errors, total_warnings, total_hints: Counts

get_callers(file_path, line, col) -> list[dict]

Find functions that call this symbol.

Returns: List of items with:

  • file: File path
  • line: Line number
  • name: Function name

Architecture

┌─────────────────────────────────────────┐
│  AuroraLSP (facade.py)                  │  High-level sync API
├─────────────────────────────────────────┤
│  CodeAnalyzer (analysis.py)             │  Dead code, usage summary
│  DiagnosticsFormatter (diagnostics.py)  │  Linting
│  ImportFilter (filters.py)              │  Import vs usage
├─────────────────────────────────────────┤
│  AuroraLSPClient (client.py)            │  Async LSP operations
├─────────────────────────────────────────┤
│  multilspy (Microsoft)                  │  LSP server management
└─────────────────────────────────────────┘

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/

# Type checking
mypy src/

License

MIT

Release files for aurora-lsp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aurora-lsp 0.1.0
File Size Uploaded
aurora_lsp-0.1.0.tar.gz 31.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aurora-lsp 0.1.0
File Interpreter ABI Platform
aurora_lsp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 48.5 kB

Release files / aurora_lsp-0.1.0.tar.gz

Download URL aurora_lsp-0.1.0.tar.gz
Size 31.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6071ef4bc798348cf7f03316875485bafa7da6ffb00e174eb132e0b4ed224302
BLAKE2b-256 checksum
How to use checksums
4c1ad1d706cf74252975b281f3a1cece07d260b029e2c6eb590ec1a28bda3ca7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / aurora_lsp-0.1.0-py3-none-any.whl

Download URL aurora_lsp-0.1.0-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0300610e9537b5b307d7f249266ed7ee50edcf521d1759d188afc0ea630b686
BLAKE2b-256 checksum
How to use checksums
498ddbf5eb89d49f26f76eaf78870d45885b0aeeefbd1dbc48ce8cc38f6459e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page