code-analyser 1.3.0__tar.gz → 1.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {code_analyser-1.3.0 → code_analyser-1.4.0}/PKG-INFO +1 -1
- {code_analyser-1.3.0 → code_analyser-1.4.0}/pyproject.toml +1 -1
- code_analyser-1.4.0/src/code_analyser/__init__.py +21 -0
- code_analyser-1.4.0/tests/test_public_api.py +29 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/uv.lock +2 -2
- code_analyser-1.3.0/src/code_analyser/__init__.py +0 -10
- {code_analyser-1.3.0 → code_analyser-1.4.0}/.dockerignore +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/.env.example +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/.gitignore +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/LICENSE +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/README.md +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/docs/superpowers/plans/2026-05-06-code-analyser-rewrite.md +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/docs/superpowers/specs/2026-05-05-code-analyser-design.md +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/examples/basic_usage.md +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/src/code_analyser/api.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/src/code_analyser/cli.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/src/code_analyser/core/__init__.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/src/code_analyser/core/css_.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/src/code_analyser/core/html_.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/src/code_analyser/core/javascript_.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/src/code_analyser/core/notebook_.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/src/code_analyser/core/python_.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/src/code_analyser/core/sql_.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/src/code_analyser/core/typescript_.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/src/code_analyser/detect.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/src/code_analyser/embedding.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/src/code_analyser/llm.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/src/code_analyser/manifest.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/src/code_analyser/models.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/src/code_analyser/pipeline.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/src/code_analyser/settings.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/__init__.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/api/__init__.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/api/test_api.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/cli/__init__.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/cli/test_cli.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/conftest.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/integration/__init__.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/integration/test_full_pipeline.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/integration/test_pipeline.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/test_embedding.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/test_invariants.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/unit/__init__.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/unit/test_css_.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/unit/test_detect.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/unit/test_html_.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/unit/test_javascript_.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/unit/test_llm.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/unit/test_models.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/unit/test_notebook_.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/unit/test_python_.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/unit/test_scaffold.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/unit/test_sql_.py +0 -0
- {code_analyser-1.3.0 → code_analyser-1.4.0}/tests/unit/test_typescript_.py +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from importlib.metadata import version as _v
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
from .manifest import MANIFEST
|
|
5
|
+
from .models import CodeAnalysis
|
|
6
|
+
from .pipeline import CodeAnalyser
|
|
7
|
+
|
|
8
|
+
__version__ = _v("code-analyser")
|
|
9
|
+
del _v
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def analyse(path: str | Path, *, llm: bool = False) -> CodeAnalysis:
|
|
13
|
+
"""Analyse ``path`` and return a :class:`CodeAnalysis`.
|
|
14
|
+
|
|
15
|
+
Module-level convenience for the family's canonical call shape — equivalent
|
|
16
|
+
to ``CodeAnalyser().analyse(path)``.
|
|
17
|
+
"""
|
|
18
|
+
return CodeAnalyser().analyse(Path(path), llm=llm)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
__all__ = ["CodeAnalyser", "CodeAnalysis", "analyse", "MANIFEST", "__version__"]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""The canonical public surface every family analyser exposes.
|
|
2
|
+
|
|
3
|
+
See lens-analysers/CONVENTIONS.md: each `-analyser` engine exports its
|
|
4
|
+
`<Name>Analyser` class, the `<Name>Analysis` result model, a module-level
|
|
5
|
+
`analyse()` convenience function, `MANIFEST`, and `__version__`.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import code_analyser
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def test_canonical_surface_importable():
|
|
14
|
+
from code_analyser import ( # noqa: F401
|
|
15
|
+
MANIFEST,
|
|
16
|
+
CodeAnalyser,
|
|
17
|
+
CodeAnalysis,
|
|
18
|
+
analyse,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
assert callable(analyse)
|
|
22
|
+
assert callable(CodeAnalyser)
|
|
23
|
+
assert MANIFEST["name"] == "code-analyser"
|
|
24
|
+
assert isinstance(code_analyser.__version__, str)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def test_surface_in_dunder_all():
|
|
28
|
+
for name in ("CodeAnalyser", "CodeAnalysis", "analyse", "MANIFEST", "__version__"):
|
|
29
|
+
assert name in code_analyser.__all__
|
|
@@ -81,7 +81,7 @@ wheels = [
|
|
|
81
81
|
|
|
82
82
|
[[package]]
|
|
83
83
|
name = "code-analyser"
|
|
84
|
-
version = "1.
|
|
84
|
+
version = "1.3.0"
|
|
85
85
|
source = { editable = "." }
|
|
86
86
|
dependencies = [
|
|
87
87
|
{ name = "esprima" },
|
|
@@ -335,7 +335,7 @@ name = "exceptiongroup"
|
|
|
335
335
|
version = "1.3.0"
|
|
336
336
|
source = { registry = "https://pypi.org/simple" }
|
|
337
337
|
dependencies = [
|
|
338
|
-
{ name = "typing-extensions", marker = "python_full_version < '3.
|
|
338
|
+
{ name = "typing-extensions", marker = "python_full_version < '3.11'" },
|
|
339
339
|
]
|
|
340
340
|
sdist = { url = "https://files.pythonhosted.org/packages/0b/9f/a65090624ecf468cdca03533906e7c69ed7588582240cfe7cc9e770b50eb/exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88", size = 29749, upload-time = "2025-05-10T17:42:51.123Z" }
|
|
341
341
|
wheels = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|