code-intelligence 1.1.0__py3-none-win_amd64.whl → 1.2.0__py3-none-win_amd64.whl
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_intelligence/__init__.py +2 -9
- code_intelligence/_code_intelligence.dll +0 -0
- code_intelligence/symdb.py +16 -0
- {code_intelligence-1.1.0.dist-info → code_intelligence-1.2.0.dist-info}/METADATA +1 -1
- code_intelligence-1.2.0.dist-info/RECORD +6 -0
- code_intelligence-1.1.0.dist-info/RECORD +0 -6
- {code_intelligence-1.1.0.dist-info → code_intelligence-1.2.0.dist-info}/WHEEL +0 -0
code_intelligence/__init__.py
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Code Intelligence Library
|
|
3
|
-
|
|
4
|
-
A lightweight, fast Tree-sitter based code intelligence library.
|
|
5
|
-
Provides symbol database functionality for code analysis.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
1
|
from .symdb import (
|
|
9
2
|
Language,
|
|
10
3
|
SymbolType,
|
|
@@ -14,10 +7,10 @@ from .symdb import (
|
|
|
14
7
|
LazySymbolDatabase,
|
|
15
8
|
)
|
|
16
9
|
|
|
17
|
-
# Backward compatibility alias
|
|
10
|
+
# Backward compatibility alias
|
|
18
11
|
SymbolDatabase = ImmideateSymbolDatabase
|
|
19
12
|
|
|
20
|
-
__version__ = "1.
|
|
13
|
+
__version__ = "1.2.0"
|
|
21
14
|
__version_info__ = tuple(int(i) for i in __version__.split('.'))
|
|
22
15
|
|
|
23
16
|
__all__ = [
|
|
Binary file
|
code_intelligence/symdb.py
CHANGED
|
@@ -189,6 +189,9 @@ _lib.symbol_array_free.restype = None
|
|
|
189
189
|
_lib.ci_flush_coverage.argtypes = []
|
|
190
190
|
_lib.ci_flush_coverage.restype = None
|
|
191
191
|
|
|
192
|
+
_lib.symbol_db_clear.argtypes = [ctypes.c_void_p, ctypes.c_int]
|
|
193
|
+
_lib.symbol_db_clear.restype = None
|
|
194
|
+
|
|
192
195
|
def _flush_coverage():
|
|
193
196
|
try:
|
|
194
197
|
_lib.ci_flush_coverage()
|
|
@@ -341,6 +344,19 @@ class _BaseSymbolDatabase:
|
|
|
341
344
|
_lib.symbol_db_destroy(self._handle)
|
|
342
345
|
self._handle = None
|
|
343
346
|
|
|
347
|
+
def clear(self, *, reuse_memory: bool = True):
|
|
348
|
+
"""Reset the database state while keeping the same Python object.
|
|
349
|
+
|
|
350
|
+
Frees the current native database state and reinitializes it. Any
|
|
351
|
+
previously scanned files, symbols, and project root are discarded.
|
|
352
|
+
|
|
353
|
+
Args:
|
|
354
|
+
reuse_memory: If True (default), keep allocated arena memory for reuse.
|
|
355
|
+
If False, free all memory and start fresh.
|
|
356
|
+
"""
|
|
357
|
+
if self._handle:
|
|
358
|
+
_lib.symbol_db_clear(self._handle, ctypes.c_int(1 if reuse_memory else 0))
|
|
359
|
+
|
|
344
360
|
def set_project_root(self, path: Path_Like):
|
|
345
361
|
_lib.symbol_db_set_project_root(self._handle, os.fsencode(path))
|
|
346
362
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
code_intelligence-1.2.0.dist-info/METADATA,sha256=hKTZsfBd4PDEY2n4goorqCM_HwqJ8figLIksMS0xueE,100
|
|
2
|
+
code_intelligence-1.2.0.dist-info/RECORD,,
|
|
3
|
+
code_intelligence-1.2.0.dist-info/WHEEL,sha256=aD7J6E7Slys9i0J65v6Ehfi0DHYa5rImRhUDp62Iwh0,98
|
|
4
|
+
code_intelligence/__init__.py,sha256=gruQfSmjho6PUbWU7ZW7OZP2KZ1fsvx5Z-9vAwfnM1g,475
|
|
5
|
+
code_intelligence/_code_intelligence.dll,sha256=LNP8bT3rTDsLKrG-1OHbTIdJN7-VNd3MRi0PI2HzHIQ,6474240
|
|
6
|
+
code_intelligence/symdb.py,sha256=r8fkV4YeKKM4Tajr82L389g7Mv4ftMt_K_I7y8LxEZs,15850
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
code_intelligence-1.1.0.dist-info/METADATA,sha256=46s-pcLbZcw6z4i8hq5uw-naESHKn0_af7mqDR7-9V0,100
|
|
2
|
-
code_intelligence-1.1.0.dist-info/RECORD,,
|
|
3
|
-
code_intelligence-1.1.0.dist-info/WHEEL,sha256=aD7J6E7Slys9i0J65v6Ehfi0DHYa5rImRhUDp62Iwh0,98
|
|
4
|
-
code_intelligence/__init__.py,sha256=P8L8zacW4zhJsh7Y8OWqRzuFICzv7Ao2qZdyyoHHvSo,671
|
|
5
|
-
code_intelligence/_code_intelligence.dll,sha256=G3mOir53ppOKlFxY921nai6povpMcUbncb5o743Ufc0,6473728
|
|
6
|
-
code_intelligence/symdb.py,sha256=0Gfj1e2Huh6de_iMlz7Jf2gRt9HVjIqJJk4Bhigf4QU,15158
|
|
File without changes
|