8000 Consolidate analysis_level enums in __init__.py and remove ABCs. · codellm-devkit/python-sdk@87c2422 · GitHub
[go: up one dir, main page]

Skip to content

Commit 87c2422

Browse files
committed
Consolidate analysis_level enums in __init__.py and remove ABCs.
Signed-off-by: Rahul Krishna <i.m.ralk@gmail.com>
1 parent 1b6f835 commit 87c2422

File tree

9 files changed

+11
-293
lines changed

9 files changed

+11
-293
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ venv: ## Create a Python virtual environment
1919
install: ## Install Python dependencies in virtual environment
2020
$(info Installing dependencies...)
2121
poetry config virtualenvs.in-project true
22-
poetry install
22+
poetry install --all-extras
2323

2424
.PHONY: lint
2525
lint: ## Run the linter

cldk/analysis/__init__.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@
1818
Analysis package
1919
"""
2020

21+
from enum import Enum
2122

22-
from .call_graph import CallGraph
23-
from .program_dependence_graph import ProgramDependenceGraph
24-
from .system_dependence_graph import SystemDependenceGraph
25-
from .symbol_table import SymbolTable
26-
from .analysis_level import AnalysisLevel
2723

28-
__all__ = ["CallGraph", "ProgramDependenceGraph", "SystemDependenceGraph", "SymbolTable", "AnalysisLevel"]
24+
class AnalysisLevel(str, Enum):
25+
"""Analysis levels"""
26+
27+
symbol_table = "symbol table"
28+
call_graph = "call graph"
29+
program_dependency_graph = "program dependency graph"
30+
system_dependency_graph = "system dependency graph"

cldk/analysis/analysis_level.py

Lines changed: 0 additions & 30 deletions
This file was deleted.

cldk/analysis/call_graph.py

Lines changed: 0 additions & 89 deletions
This file was deleted.

cldk/analysis/java/java_analysis.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@
2424

2525
from tree_sitter import Tree
2626

27-
from cldk.analysis import SymbolTable, CallGraph
2827
from cldk.analysis.commons.treesitter import TreesitterJava
2928
from cldk.models.java import JCallable
3029
from cldk.models.java import JApplication
3130
from cldk.models.java.models import JCRUDOperation, JCompilationUnit, JMethodDetail, JType, JField
3231
from cldk.analysis.java.codeanalyzer import JCodeanalyzer
3332

3433

35-
class JavaAnalysis(SymbolTable, CallGraph):
34+
class JavaAnalysis:
3635

3736
def __init__(
3837
self,

cldk/analysis/program_dependence_graph.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

cldk/analysis/python/python_analysis.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@
2121
from pathlib import Path
2222
from typing import List
2323

24-
from cldk.analysis import SymbolTable
2524
from cldk.analysis.commons.treesitter import TreesitterPython
2625
from cldk.models.python.models import PyMethod, PyImport, PyModule, PyClass
2726

2827

29-
class PythonAnalysis(SymbolTable):
28+
class PythonAnalysis:
3029
"""Python Analysis Class"""
3130

3231
def __init__(

cldk/analysis/symbol_table.py

Lines changed: 0 additions & 111 deletions
This file was deleted.

cldk/analysis/system_dependence_graph.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0