pycode-kg 0.19.2__tar.gz → 0.19.3__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.
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/PKG-INFO +4 -4
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/README.md +1 -1
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/pyproject.toml +18 -11
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/__init__.py +1 -1
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/graph.py +5 -3
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/snapshots.py +1 -1
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/viz3d.py +40 -40
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/LICENSE +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/.DS_Store +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/__main__.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/analysis/__init__.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/analysis/bridge.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/analysis/centrality.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/analysis/framework_detector.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/analysis/hybrid_rank.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/app.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/architecture.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/build_pycodekg_lancedb.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/build_pycodekg_sqlite.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/__init__.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/cmd_analyze.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/cmd_architecture.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/cmd_bridges.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/cmd_build.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/cmd_build_full.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/cmd_centrality.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/cmd_explain.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/cmd_framework_nodes.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/cmd_hooks.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/cmd_init.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/cmd_mcp.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/cmd_model.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/cmd_query.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/cmd_snapshot.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/cmd_viz.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/main.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/cli/options.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/config.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/explain.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/index.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/kg.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/layout3d.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/mcp_server.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/module/__init__.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/module/base.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/module/extractor.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/module/types.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/pycodekg.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/pycodekg_query.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/pycodekg_snippet_packer.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/pycodekg_thorough_analysis.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/pycodekg_viz.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/pycodekg_viz3d.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/ranking/__init__.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/ranking/cli_rank.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/ranking/coderank.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/sql/004_add_centrality_table.sql +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/store.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/utils.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/visitor.py +0 -0
- {pycode_kg-0.19.2 → pycode_kg-0.19.3}/src/pycode_kg/viz3d_timeline.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pycode-kg
|
|
3
|
-
Version: 0.19.
|
|
3
|
+
Version: 0.19.3
|
|
4
4
|
Summary: A tool to build a searchable knowledge graph from Python repositories
|
|
5
5
|
License-Expression: Elastic-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -31,8 +31,6 @@ Requires-Dist: kgmodule-utils[semantic] (>=0.3.1)
|
|
|
31
31
|
Requires-Dist: markdown (>=3.6) ; extra == "all"
|
|
32
32
|
Requires-Dist: markdown (>=3.6) ; extra == "viz3d"
|
|
33
33
|
Requires-Dist: mcp (>=1.0.0)
|
|
34
|
-
Requires-Dist: mypy (>=1.10.0) ; extra == "all"
|
|
35
|
-
Requires-Dist: mypy (>=1.10.0) ; extra == "dev"
|
|
36
34
|
Requires-Dist: numpy (>=1.24.0)
|
|
37
35
|
Requires-Dist: pandas (>=2.0.0)
|
|
38
36
|
Requires-Dist: param (>=2.0.0) ; extra == "all"
|
|
@@ -66,6 +64,8 @@ Requires-Dist: torch (>=2.5.1)
|
|
|
66
64
|
Requires-Dist: trame-vtk (>=2.0.0) ; extra == "all"
|
|
67
65
|
Requires-Dist: trame-vtk (>=2.0.0) ; extra == "viz3d"
|
|
68
66
|
Requires-Dist: transformers (>=4.40.0,<4.57)
|
|
67
|
+
Requires-Dist: ty (>=0.0.41) ; extra == "all"
|
|
68
|
+
Requires-Dist: ty (>=0.0.41) ; extra == "dev"
|
|
69
69
|
Project-URL: Homepage, https://github.com/Flux-Frontiers/pycode_kg
|
|
70
70
|
Project-URL: Repository, https://github.com/Flux-Frontiers/pycode_kg
|
|
71
71
|
Description-Content-Type: text/markdown
|
|
@@ -77,7 +77,7 @@ Description-Content-Type: text/markdown
|
|
|
77
77
|
|
|
78
78
|
[](https://www.python.org/)
|
|
79
79
|
[](https://www.elastic.co/licensing/elastic-license)
|
|
80
|
-
[](https://github.com/Flux-Frontiers/pycode_kg/releases)
|
|
81
81
|
[](https://github.com/Flux-Frontiers/pycode_kg/actions/workflows/ci.yml)
|
|
82
82
|
[](https://python-poetry.org/)
|
|
83
83
|
[](https://zenodo.org/badge/latestdoi/1202379010)
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
[](https://www.python.org/)
|
|
7
7
|
[](https://www.elastic.co/licensing/elastic-license)
|
|
8
|
-
[](https://github.com/Flux-Frontiers/pycode_kg/releases)
|
|
9
9
|
[](https://github.com/Flux-Frontiers/pycode_kg/actions/workflows/ci.yml)
|
|
10
10
|
[](https://python-poetry.org/)
|
|
11
11
|
[](https://zenodo.org/badge/latestdoi/1202379010)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
#
|
|
8
8
|
# Quick install (pip)
|
|
9
9
|
# -------------------
|
|
10
|
-
# pip install -e ".[dev]" core + dev tools (pytest, ruff,
|
|
10
|
+
# pip install -e ".[dev]" core + dev tools (pytest, ruff, ty, etc.)
|
|
11
11
|
# pip install -e ".[viz]" core + Streamlit/Plotly/PyVis visualizer
|
|
12
12
|
# pip install -e ".[viz3d]" core + PyVista 3D visualizer
|
|
13
13
|
# pip install -e ".[kgdeps]" core + KG integrations (doc-kg, agent-kg)
|
|
@@ -48,7 +48,7 @@ packages = [{ include = "pycode_kg", from = "src" }]
|
|
|
48
48
|
|
|
49
49
|
[tool.poetry.group.dev.dependencies]
|
|
50
50
|
detect-secrets = ">=1.5.0"
|
|
51
|
-
|
|
51
|
+
ty = "^0.0.41"
|
|
52
52
|
pdoc = ">=14.0.0"
|
|
53
53
|
pre-commit = ">=4.5.1"
|
|
54
54
|
pylint = ">=4.0.5"
|
|
@@ -61,7 +61,7 @@ ruff = ">=0.4.0"
|
|
|
61
61
|
# ---------------------------------------------------------------------------
|
|
62
62
|
[project]
|
|
63
63
|
name = "pycode-kg"
|
|
64
|
-
version = "0.19.
|
|
64
|
+
version = "0.19.3"
|
|
65
65
|
description = "A tool to build a searchable knowledge graph from Python repositories"
|
|
66
66
|
readme = "README.md"
|
|
67
67
|
license = "Elastic-2.0"
|
|
@@ -95,7 +95,7 @@ dependencies = [
|
|
|
95
95
|
[project.optional-dependencies]
|
|
96
96
|
dev = [
|
|
97
97
|
"detect-secrets>=1.5.0",
|
|
98
|
-
"
|
|
98
|
+
"ty>=0.0.41",
|
|
99
99
|
"pdoc>=14.0.0",
|
|
100
100
|
"pre-commit>=4.5.1",
|
|
101
101
|
"pylint>=4.0.5",
|
|
@@ -126,7 +126,6 @@ kgdeps = [
|
|
|
126
126
|
all = [
|
|
127
127
|
"detect-secrets>=1.5.0",
|
|
128
128
|
"markdown>=3.6",
|
|
129
|
-
"mypy>=1.10.0",
|
|
130
129
|
"param>=2.0.0",
|
|
131
130
|
"pdoc>=14.0.0",
|
|
132
131
|
"plotly>=5.14.0",
|
|
@@ -141,6 +140,7 @@ all = [
|
|
|
141
140
|
"ruff>=0.4.0",
|
|
142
141
|
"streamlit>=1.35.0",
|
|
143
142
|
"trame-vtk>=2.0.0",
|
|
143
|
+
"ty>=0.0.41",
|
|
144
144
|
]
|
|
145
145
|
|
|
146
146
|
[project.urls]
|
|
@@ -177,12 +177,19 @@ target-version = "py312"
|
|
|
177
177
|
select = ["E", "F", "W", "I", "UP"]
|
|
178
178
|
ignore = ["E501"]
|
|
179
179
|
|
|
180
|
-
[tool.
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
180
|
+
[tool.ty.environment]
|
|
181
|
+
python-version = "3.12"
|
|
182
|
+
root = ["src"]
|
|
183
|
+
|
|
184
|
+
[tool.ty.rules]
|
|
185
|
+
# Be lenient about third-party stubs (mirrors mypy's ignore_missing_imports).
|
|
186
|
+
unresolved-import = "ignore"
|
|
187
|
+
# viz3d.py carries `# ty: ignore` suppressions for param/PyQt5/pyvista false
|
|
188
|
+
# positives. Those libraries live in the optional viz/viz3d extras, so in the
|
|
189
|
+
# lean CI install the imports are Unknown, the errors don't fire, and the
|
|
190
|
+
# ignores look "unused". Don't fail the build on that — the suppressions are
|
|
191
|
+
# still honored locally where the extras (and the errors) are present.
|
|
192
|
+
unused-ignore-comment = "ignore"
|
|
186
193
|
|
|
187
194
|
[tool.pytest.ini_options]
|
|
188
195
|
testpaths = ["tests"]
|
|
@@ -32,7 +32,7 @@ KGModule SDK (build new domain KGs)::
|
|
|
32
32
|
from pycode_kg import KGModule, KGExtractor, PyCodeKGExtractor, NodeSpec, EdgeSpec
|
|
33
33
|
"""
|
|
34
34
|
|
|
35
|
-
__version__ = "0.19.
|
|
35
|
+
__version__ = "0.19.3"
|
|
36
36
|
__author__ = "Eric G. Suchanek, PhD"
|
|
37
37
|
|
|
38
38
|
# Low-level primitives (locked v0 contract)
|
|
@@ -78,14 +78,16 @@ class CodeGraph:
|
|
|
78
78
|
"""Extracted nodes (calls :meth:`extract` if needed)."""
|
|
79
79
|
if self._nodes is None:
|
|
80
80
|
self.extract()
|
|
81
|
-
|
|
81
|
+
assert self._nodes is not None
|
|
82
|
+
return self._nodes
|
|
82
83
|
|
|
83
84
|
@property
|
|
84
85
|
def edges(self) -> list[Edge]:
|
|
85
86
|
"""Extracted edges (calls :meth:`extract` if needed)."""
|
|
86
87
|
if self._edges is None:
|
|
87
88
|
self.extract()
|
|
88
|
-
|
|
89
|
+
assert self._edges is not None
|
|
90
|
+
return self._edges
|
|
89
91
|
|
|
90
92
|
def result(self) -> tuple[list[Node], list[Edge]]:
|
|
91
93
|
"""Return the extracted nodes and edges as a tuple.
|
|
@@ -120,6 +122,6 @@ class CodeGraph:
|
|
|
120
122
|
if extracted:
|
|
121
123
|
return (
|
|
122
124
|
f"CodeGraph(repo_root={self.repo_root!r}, "
|
|
123
|
-
f"nodes={len(self._nodes)}, edges={len(self._edges)})" #
|
|
125
|
+
f"nodes={len(self._nodes)}, edges={len(self._edges)})" # ty: ignore[invalid-argument-type]
|
|
124
126
|
)
|
|
125
127
|
return f"CodeGraph(repo_root={self.repo_root!r}, not yet extracted)"
|
|
@@ -284,7 +284,7 @@ class SnapshotManager(_BaseSnapshotManager):
|
|
|
284
284
|
# capture — backwards-compat wrapper
|
|
285
285
|
# ------------------------------------------------------------------
|
|
286
286
|
|
|
287
|
-
def capture( #
|
|
287
|
+
def capture( # ty: ignore[invalid-method-override]
|
|
288
288
|
self,
|
|
289
289
|
version: str | None = None,
|
|
290
290
|
branch: str | None = None,
|
|
@@ -228,7 +228,7 @@ def _remove_highlight_actors(plotter: pv.Plotter) -> None:
|
|
|
228
228
|
"""Remove any leftover pink highlight or outline actors from the plotter."""
|
|
229
229
|
for name in list(plotter.actors.keys()):
|
|
230
230
|
if "highlight" in name.lower() or "bounds" in name.lower() or "outline" in name.lower():
|
|
231
|
-
plotter.remove_actor(name, reset_camera=False) #
|
|
231
|
+
plotter.remove_actor(name, reset_camera=False) # ty: ignore[invalid-argument-type]
|
|
232
232
|
|
|
233
233
|
|
|
234
234
|
# ---------------------------------------------------------------------------
|
|
@@ -256,7 +256,7 @@ class DocstringPopup(QDialog):
|
|
|
256
256
|
self.setWindowTitle(title)
|
|
257
257
|
self.setMinimumSize(600, 400)
|
|
258
258
|
self.on_close_callback = on_close_callback
|
|
259
|
-
self.setWindowModality(Qt.NonModal) #
|
|
259
|
+
self.setWindowModality(Qt.NonModal) # ty: ignore[unresolved-attribute]
|
|
260
260
|
|
|
261
261
|
if parent:
|
|
262
262
|
geo = parent.screen().geometry()
|
|
@@ -269,10 +269,10 @@ class DocstringPopup(QDialog):
|
|
|
269
269
|
layout.addWidget(browser)
|
|
270
270
|
|
|
271
271
|
close_btn = QPushButton("Close", self)
|
|
272
|
-
close_btn.clicked.connect(self.close) #
|
|
272
|
+
close_btn.clicked.connect(self.close) # ty: ignore[invalid-argument-type]
|
|
273
273
|
layout.addWidget(close_btn)
|
|
274
274
|
|
|
275
|
-
def closeEvent(self, event):
|
|
275
|
+
def closeEvent(self, event): # ty: ignore[invalid-method-override]
|
|
276
276
|
"""Trigger the close callback if set."""
|
|
277
277
|
if self.on_close_callback:
|
|
278
278
|
self.on_close_callback()
|
|
@@ -311,9 +311,9 @@ def create_kg_visualization(
|
|
|
311
311
|
|
|
312
312
|
plotter.clear_actors()
|
|
313
313
|
plotter.enable_anti_aliasing("msaa")
|
|
314
|
-
plotter.enable_terrain_style() #
|
|
315
|
-
plotter.set_background("white", top="lightblue") #
|
|
316
|
-
plotter.add_axes( #
|
|
314
|
+
plotter.enable_terrain_style() # ty: ignore[missing-argument]
|
|
315
|
+
plotter.set_background("white", top="lightblue") # ty: ignore[invalid-argument-type]
|
|
316
|
+
plotter.add_axes( # ty: ignore[missing-argument]
|
|
317
317
|
interactive=False,
|
|
318
318
|
viewport=(0.75, 0.75, 1.0, 1.0),
|
|
319
319
|
)
|
|
@@ -457,7 +457,7 @@ def create_kg_visualization(
|
|
|
457
457
|
)
|
|
458
458
|
|
|
459
459
|
# -- Ground plane: auto-sized to scene bounds, added after all meshes
|
|
460
|
-
plotter.add_floor( #
|
|
460
|
+
plotter.add_floor( # ty: ignore[missing-argument]
|
|
461
461
|
face="-z",
|
|
462
462
|
color="lightgray",
|
|
463
463
|
opacity=0.85,
|
|
@@ -485,10 +485,10 @@ def create_kg_visualization(
|
|
|
485
485
|
f"Faces: {total_faces}"
|
|
486
486
|
)
|
|
487
487
|
|
|
488
|
-
plotter.reset_camera() #
|
|
488
|
+
plotter.reset_camera() # ty: ignore[missing-argument]
|
|
489
489
|
# Front-elevated perspective: mostly looking along +Y, tilted ~25° down,
|
|
490
490
|
# with a slight rightward rotation so the scene reads with depth.
|
|
491
|
-
plotter.view_vector((0.0, 1.0, 0.35), viewup=(0, 0, 1)) #
|
|
491
|
+
plotter.view_vector((0.0, 1.0, 0.35), viewup=(0, 0, 1)) # ty: ignore[invalid-argument-type]
|
|
492
492
|
plotter.camera.zoom(1.6)
|
|
493
493
|
plotter.render()
|
|
494
494
|
|
|
@@ -512,40 +512,40 @@ class KGVisualizer(param.Parameterized):
|
|
|
512
512
|
watched parameters trigger graph reload or UI updates automatically.
|
|
513
513
|
"""
|
|
514
514
|
|
|
515
|
-
db_path: str = param.String(default=DEFAULT_DB, doc="SQLite database path")
|
|
516
|
-
layout_name: str = param.Selector(
|
|
515
|
+
db_path: str = param.String(default=DEFAULT_DB, doc="SQLite database path") # ty: ignore[invalid-assignment]
|
|
516
|
+
layout_name: str = param.Selector( # ty: ignore[invalid-assignment]
|
|
517
517
|
objects=["allium", "funnel"], default="allium", doc="3-D layout strategy"
|
|
518
518
|
)
|
|
519
|
-
save_path: str = param.String(default=DEFAULT_SAVE, doc="Save path stem")
|
|
520
|
-
save_format: str = param.Selector(
|
|
519
|
+
save_path: str = param.String(default=DEFAULT_SAVE, doc="Save path stem") # ty: ignore[invalid-assignment]
|
|
520
|
+
save_format: str = param.Selector( # ty: ignore[invalid-assignment]
|
|
521
521
|
objects=["html", "png", "jpg"], default="html", doc="Export format"
|
|
522
522
|
)
|
|
523
523
|
|
|
524
524
|
# Node kind visibility
|
|
525
|
-
show_methods: bool = param.Boolean(default=True, doc="Render method nodes")
|
|
526
|
-
show_symbols: bool = param.Boolean(default=False, doc="Render symbol stub nodes")
|
|
525
|
+
show_methods: bool = param.Boolean(default=True, doc="Render method nodes") # ty: ignore[invalid-assignment]
|
|
526
|
+
show_symbols: bool = param.Boolean(default=False, doc="Render symbol stub nodes") # ty: ignore[invalid-assignment]
|
|
527
527
|
# Edge visibility
|
|
528
|
-
show_calls: bool = param.Boolean(default=True, doc="Render CALLS edges")
|
|
529
|
-
show_imports: bool = param.Boolean(default=True, doc="Render IMPORTS edges")
|
|
530
|
-
show_inherits: bool = param.Boolean(default=True, doc="Render INHERITS edges")
|
|
531
|
-
show_contains: bool = param.Boolean(default=True, doc="Render CONTAINS edges")
|
|
528
|
+
show_calls: bool = param.Boolean(default=True, doc="Render CALLS edges") # ty: ignore[invalid-assignment]
|
|
529
|
+
show_imports: bool = param.Boolean(default=True, doc="Render IMPORTS edges") # ty: ignore[invalid-assignment]
|
|
530
|
+
show_inherits: bool = param.Boolean(default=True, doc="Render INHERITS edges") # ty: ignore[invalid-assignment]
|
|
531
|
+
show_contains: bool = param.Boolean(default=True, doc="Render CONTAINS edges") # ty: ignore[invalid-assignment]
|
|
532
532
|
# Layout spacing (funnel only)
|
|
533
|
-
node_spacing: float = param.Number(default=2.0, bounds=(0.5, 10.0), doc="Funnel node spacing")
|
|
533
|
+
node_spacing: float = param.Number(default=2.0, bounds=(0.5, 10.0), doc="Funnel node spacing") # ty: ignore[invalid-assignment]
|
|
534
534
|
|
|
535
535
|
# Status / title
|
|
536
|
-
status: str = param.String(default="Ready", doc="Status bar text")
|
|
537
|
-
window_title: str = param.String(default=f"PyCodeKG 3D v{__version__}", doc="Window title")
|
|
536
|
+
status: str = param.String(default="Ready", doc="Status bar text") # ty: ignore[invalid-assignment]
|
|
537
|
+
window_title: str = param.String(default=f"PyCodeKG 3D v{__version__}", doc="Window title") # ty: ignore[invalid-assignment]
|
|
538
538
|
|
|
539
539
|
# Stats
|
|
540
|
-
num_modules: int = param.Integer(default=0)
|
|
541
|
-
num_classes: int = param.Integer(default=0)
|
|
542
|
-
num_functions: int = param.Integer(default=0)
|
|
543
|
-
num_methods: int = param.Integer(default=0)
|
|
544
|
-
num_faces: int = param.Integer(default=0)
|
|
540
|
+
num_modules: int = param.Integer(default=0) # ty: ignore[invalid-assignment]
|
|
541
|
+
num_classes: int = param.Integer(default=0) # ty: ignore[invalid-assignment]
|
|
542
|
+
num_functions: int = param.Integer(default=0) # ty: ignore[invalid-assignment]
|
|
543
|
+
num_methods: int = param.Integer(default=0) # ty: ignore[invalid-assignment]
|
|
544
|
+
num_faces: int = param.Integer(default=0) # ty: ignore[invalid-assignment]
|
|
545
545
|
|
|
546
546
|
# Module selector data
|
|
547
|
-
available_modules: list[str] = param.List(default=[], doc="Available module names")
|
|
548
|
-
selected_modules: list[str] = param.ListSelector(
|
|
547
|
+
available_modules: list[str] = param.List(default=[], doc="Available module names") # ty: ignore[invalid-assignment]
|
|
548
|
+
selected_modules: list[str] = param.ListSelector( # ty: ignore[invalid-assignment]
|
|
549
549
|
default=[], objects=[], doc="Selected module names"
|
|
550
550
|
)
|
|
551
551
|
|
|
@@ -563,7 +563,7 @@ class KGVisualizer(param.Parameterized):
|
|
|
563
563
|
self.actor_to_node: dict[str, dict] = {}
|
|
564
564
|
self._load_graph()
|
|
565
565
|
|
|
566
|
-
@param.depends("db_path", watch=True)
|
|
566
|
+
@param.depends("db_path", watch=True) # ty: ignore[invalid-argument-type]
|
|
567
567
|
def _load_graph(self) -> None:
|
|
568
568
|
"""Reload nodes and edges from the SQLite database."""
|
|
569
569
|
from pycode_kg.layout3d import LayoutEdge, LayoutNode
|
|
@@ -717,7 +717,7 @@ class MainWindow(QMainWindow):
|
|
|
717
717
|
|
|
718
718
|
self.vtk_plotter: QtInteractor = QtInteractor(self)
|
|
719
719
|
self.visualizer: KGVisualizer = KGVisualizer(
|
|
720
|
-
plotter=self.vtk_plotter,
|
|
720
|
+
plotter=self.vtk_plotter, # ty: ignore[invalid-argument-type]
|
|
721
721
|
db_path=db_path,
|
|
722
722
|
save_path=save_path,
|
|
723
723
|
)
|
|
@@ -957,7 +957,7 @@ class MainWindow(QMainWindow):
|
|
|
957
957
|
btn_row.addWidget(self.reset_settings_button)
|
|
958
958
|
|
|
959
959
|
self.status_display = QLabel("Ready")
|
|
960
|
-
self.status_display.setTextInteractionFlags(Qt.TextBrowserInteraction) #
|
|
960
|
+
self.status_display.setTextInteractionFlags(Qt.TextBrowserInteraction) # ty: ignore[unresolved-attribute]
|
|
961
961
|
self.status_display.setStyleSheet(
|
|
962
962
|
"font-weight:bold; font-size:13px; background-color:white; color:black;"
|
|
963
963
|
)
|
|
@@ -1004,22 +1004,22 @@ class MainWindow(QMainWindow):
|
|
|
1004
1004
|
self.module_selector.itemSelectionChanged.connect(self.update_selected_modules)
|
|
1005
1005
|
|
|
1006
1006
|
self.cb_methods.stateChanged.connect(
|
|
1007
|
-
lambda s: setattr(self.visualizer, "show_methods", s == Qt.Checked) #
|
|
1007
|
+
lambda s: setattr(self.visualizer, "show_methods", s == Qt.Checked) # ty: ignore[unresolved-attribute]
|
|
1008
1008
|
)
|
|
1009
1009
|
self.cb_symbols.stateChanged.connect(
|
|
1010
|
-
lambda s: setattr(self.visualizer, "show_symbols", s == Qt.Checked) #
|
|
1010
|
+
lambda s: setattr(self.visualizer, "show_symbols", s == Qt.Checked) # ty: ignore[unresolved-attribute]
|
|
1011
1011
|
)
|
|
1012
1012
|
self.cb_contains.stateChanged.connect(
|
|
1013
|
-
lambda s: setattr(self.visualizer, "show_contains", s == Qt.Checked) #
|
|
1013
|
+
lambda s: setattr(self.visualizer, "show_contains", s == Qt.Checked) # ty: ignore[unresolved-attribute]
|
|
1014
1014
|
)
|
|
1015
1015
|
self.cb_calls.stateChanged.connect(
|
|
1016
|
-
lambda s: setattr(self.visualizer, "show_calls", s == Qt.Checked) #
|
|
1016
|
+
lambda s: setattr(self.visualizer, "show_calls", s == Qt.Checked) # ty: ignore[unresolved-attribute]
|
|
1017
1017
|
)
|
|
1018
1018
|
self.cb_imports.stateChanged.connect(
|
|
1019
|
-
lambda s: setattr(self.visualizer, "show_imports", s == Qt.Checked) #
|
|
1019
|
+
lambda s: setattr(self.visualizer, "show_imports", s == Qt.Checked) # ty: ignore[unresolved-attribute]
|
|
1020
1020
|
)
|
|
1021
1021
|
self.cb_inherits.stateChanged.connect(
|
|
1022
|
-
lambda s: setattr(self.visualizer, "show_inherits", s == Qt.Checked) #
|
|
1022
|
+
lambda s: setattr(self.visualizer, "show_inherits", s == Qt.Checked) # ty: ignore[unresolved-attribute]
|
|
1023
1023
|
)
|
|
1024
1024
|
|
|
1025
1025
|
self.visualize_button.clicked.connect(self.on_visualize_clicked)
|
|
@@ -1345,7 +1345,7 @@ class MainWindow(QMainWindow):
|
|
|
1345
1345
|
pass
|
|
1346
1346
|
gc.collect()
|
|
1347
1347
|
|
|
1348
|
-
def closeEvent(self, event) -> None:
|
|
1348
|
+
def closeEvent(self, event) -> None: # ty: ignore[invalid-method-override]
|
|
1349
1349
|
"""Handle window close with cleanup."""
|
|
1350
1350
|
with warnings.catch_warnings():
|
|
1351
1351
|
warnings.simplefilter("ignore")
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|