codegraphcontext 0.3.5__py3-none-any.whl → 0.3.7__py3-none-any.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.
@@ -296,6 +296,12 @@ def run_command(command, console, shell=False, check=True, input_text=None):
296
296
  Returns the completed process object on success, None on failure.
297
297
  """
298
298
  cmd_str = command if isinstance(command, str) else ' '.join(command)
299
+
300
+ # Mask passwords from being printed out
301
+ if "set-initial-password" in cmd_str:
302
+ import re
303
+ cmd_str = re.sub(r'(set-initial-password\s+)(\S+)', r'\g<1>********', cmd_str)
304
+
299
305
  console.print(f"[cyan]$ {cmd_str}[/cyan]")
300
306
  try:
301
307
  process = subprocess.run(
@@ -539,7 +539,9 @@ class CodeFinder:
539
539
 
540
540
  with self.driver.session() as session:
541
541
  repo_filter = "AND func.path STARTS WITH $repo_path" if repo_path else ""
542
- result = session.run(f"""
542
+ decorator_filter = "AND ALL(decorator_name IN $exclude_decorated_with WHERE NOT decorator_name IN func.decorators)" if exclude_decorated_with else ""
543
+
544
+ query = f"""
543
545
  MATCH (func:Function)
544
546
  WHERE func.is_dependency = false {repo_filter}
545
547
  AND NOT func.name IN ['main', 'setup', 'run']
@@ -550,7 +552,7 @@ class CodeFinder:
550
552
  AND NOT toLower(func.name) CONTAINS 'application'
551
553
  AND NOT toLower(func.name) CONTAINS 'entry'
552
554
  AND NOT toLower(func.name) CONTAINS 'entrypoint'
553
- AND ALL(decorator_name IN $exclude_decorated_with WHERE NOT decorator_name IN func.decorators)
555
+ {decorator_filter}
554
556
  WITH func
555
557
  OPTIONAL MATCH (caller:Function)-[:CALLS]->(func)
556
558
  WHERE caller.is_dependency = false
@@ -566,7 +568,15 @@ class CodeFinder:
566
568
  file.name as file_name
567
569
  ORDER BY func.path, func.line_number
568
570
  LIMIT 50
569
- """, exclude_decorated_with=exclude_decorated_with, repo_path=repo_path)
571
+ """
572
+
573
+ params = {}
574
+ if repo_path:
575
+ params["repo_path"] = repo_path
576
+ if exclude_decorated_with:
577
+ params["exclude_decorated_with"] = exclude_decorated_with
578
+
579
+ result = session.run(query, **params)
570
580
 
571
581
  return {
572
582
  "potentially_unused_functions": result.data(),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codegraphcontext
3
- Version: 0.3.5
3
+ Version: 0.3.7
4
4
  Summary: An MCP server that indexes local code into a graph database to provide context to AI assistants.
5
5
  Author-email: Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
6
6
  License: MIT License
@@ -41,7 +41,7 @@ Requires-Dist: watchdog>=3.0.0
41
41
  Requires-Dist: stdlibs>=2023.11.18
42
42
  Requires-Dist: typer[all]>=0.9.0
43
43
  Requires-Dist: rich>=13.7.0
44
- Requires-Dist: inquirerpy>=0.3.5
44
+ Requires-Dist: inquirerpy>=0.3.4
45
45
  Requires-Dist: python-dotenv>=1.0.0
46
46
  Requires-Dist: tree-sitter>=0.21.0
47
47
  Requires-Dist: tree-sitter-language-pack>=0.6.0
@@ -162,7 +162,7 @@ A powerful **MCP server** and **CLI toolkit** that indexes local code into a gra
162
162
  ---
163
163
 
164
164
  ## Project Details
165
- - **Version:** 0.3.5
165
+ - **Version:** 0.3.7
166
166
  - **Authors:** Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
167
167
  - **License:** MIT License (See [LICENSE](LICENSE) for details)
168
168
  - **Website:** [CodeGraphContext](http://codegraphcontext.vercel.app/)
@@ -249,7 +249,7 @@ _If you’re using CodeGraphContext in your project, feel free to open a PR and
249
249
  - `stdlibs>=2023.11.18`
250
250
  - `typer[all]>=0.9.0`
251
251
  - `rich>=13.7.0`
252
- - `inquirerpy>=0.3.5`
252
+ - `inquirerpy>=0.3.7`
253
253
  - `python-dotenv>=1.0.0`
254
254
  - `tree-sitter>=0.21.0`
255
255
  - `tree-sitter-language-pack>=0.6.0`
@@ -9,7 +9,7 @@ codegraphcontext/cli/config_manager.py,sha256=MK7GMGZ4hd8-ZOShXBd_KDtNqHQ3ngdbef
9
9
  codegraphcontext/cli/main.py,sha256=89jWaO8Gr3nRdLQtfwF434wpU77d5bJwt016f_lLnGg,86486
10
10
  codegraphcontext/cli/registry_commands.py,sha256=30rJm4SeS0n1jax4JVuhuv4zYLzyMmlHcCSnsDDhgc8,19964
11
11
  codegraphcontext/cli/setup_macos.py,sha256=Xjlv_9jk9qv8Gh7stpH1pvlalzC0Fg176y7jc5G1zh0,3575
12
- codegraphcontext/cli/setup_wizard.py,sha256=yVXKqvAtUM0UC4tUreiS6C5utJbBO5Et2MiPUPWit9s,41393
12
+ codegraphcontext/cli/setup_wizard.py,sha256=UptvbVfHPudIkoO8idWpEuomweIBsXEm9yNw21PXFvc,41598
13
13
  codegraphcontext/cli/visualizer.py,sha256=YgqXA-o1l3qRABat_s-wT0gTM_rmHmOhpUtxS7Rhcfk,1861
14
14
  codegraphcontext/core/__init__.py,sha256=r-dC2b8hn5e4ZBVfWnCcBYMTQVcayxG5-eA5Do6uSM4,7278
15
15
  codegraphcontext/core/bundle_registry.py,sha256=kLvTLEl99QwfyAw8a7-4hqconLCtS64G9ECPVdfVBsM,7476
@@ -23,7 +23,7 @@ codegraphcontext/core/jobs.py,sha256=d6v_IERdEcDlIsz3CW3p0QMp3N-6dgQICs3FZRPgPgU
23
23
  codegraphcontext/core/watcher.py,sha256=42AWDv7LUE5v_HlY_Rvvlk8deDdlUBvM3hI-DMDWAOk,9813
24
24
  codegraphcontext/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  codegraphcontext/tools/advanced_language_query_tool.py,sha256=APtC-KSkXXSrVLwiw3kgi6Q-xaqXl6skLWHPyuNh358,3670
26
- codegraphcontext/tools/code_finder.py,sha256=2wd05dMrPW8xZDBUixS4BaipNbrE4rttqSD6JYEeQM4,55552
26
+ codegraphcontext/tools/code_finder.py,sha256=KNIpAejABX31eEIomTxv8OsInPTXq-xn7hGtmPHwoXY,55860
27
27
  codegraphcontext/tools/graph_builder.py,sha256=FaEeXQP5gdDclrXKjhWiwbmWXBEPadmqdeHZ2bWLK5A,81339
28
28
  codegraphcontext/tools/package_resolver.py,sha256=KtbdMReTezszjdsqYniL-Xb-QUsrAJWtf1NSiyIPkLI,18704
29
29
  codegraphcontext/tools/scip_indexer.py,sha256=gxe5-f090wonHEWYDT1CV6b3SpSTQtwng6A1SfPX_LA,19970
@@ -72,9 +72,9 @@ codegraphcontext/utils/debug_log.py,sha256=Qg7jwyeg7x2h3Ur_2S34bdMCkHdlk_ngHfPwa
72
72
  codegraphcontext/utils/tree_sitter_manager.py,sha256=bIuKYN1aj1Zi6BnksGjZSLZzgBwuFRselZzyUpbToAU,9180
73
73
  codegraphcontext/utils/visualize_graph.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
74
  codegraphcontext/viz/server.py,sha256=Yu4fwMC2FsE6KUt7oYNlcE3GpCrblstkwUIVaGXTPYI,12767
75
- codegraphcontext-0.3.5.dist-info/licenses/LICENSE,sha256=Btzdu2kIoMbdSp6OyCLupB1aRgpTCJ_szMimgEnpkkE,1056
76
- codegraphcontext-0.3.5.dist-info/METADATA,sha256=rkKzmh5bAjIJNVO_ShCsjn54nCb2dCOySSpT9Ptlo_Y,21685
77
- codegraphcontext-0.3.5.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
78
- codegraphcontext-0.3.5.dist-info/entry_points.txt,sha256=LCxWCWMshdvYGoHBPuQZ8C-e4CiNSHCLXofrNSGHkoE,103
79
- codegraphcontext-0.3.5.dist-info/top_level.txt,sha256=CBgc6LAPZIO5FS0nSYYkylDifHsZTIqw3Gf5UwDxeGI,17
80
- codegraphcontext-0.3.5.dist-info/RECORD,,
75
+ codegraphcontext-0.3.7.dist-info/licenses/LICENSE,sha256=Btzdu2kIoMbdSp6OyCLupB1aRgpTCJ_szMimgEnpkkE,1056
76
+ codegraphcontext-0.3.7.dist-info/METADATA,sha256=PqemrIQ3-r8slvnaUscWeHgFLAJWbSVz0ToCPl75ZjQ,21685
77
+ codegraphcontext-0.3.7.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
78
+ codegraphcontext-0.3.7.dist-info/entry_points.txt,sha256=LCxWCWMshdvYGoHBPuQZ8C-e4CiNSHCLXofrNSGHkoE,103
79
+ codegraphcontext-0.3.7.dist-info/top_level.txt,sha256=CBgc6LAPZIO5FS0nSYYkylDifHsZTIqw3Gf5UwDxeGI,17
80
+ codegraphcontext-0.3.7.dist-info/RECORD,,