MCPcopy Create free account
hub / github.com/ParzivalHack/PySpector / record_files

Method record_files

src/pyspector/stats.py:100–113  ·  view source on GitHub ↗

Record file-level metrics after AST generation.

(
        self,
        python_files_data: List[Dict[str, Any]],
        skipped: int = 0,
        errors:  int = 0,
    )

Source from the content-addressed store, hash-verified

98
99
100 def record_files(
101 self,
102 python_files_data: List[Dict[str, Any]],
103 skipped: int = 0,
104 errors: int = 0,
105 ) -> None:
106 """Record file-level metrics after AST generation."""
107 self.files_scanned = len(python_files_data)
108 self.files_skipped = skipped
109 self.parse_errors = errors
110 self.total_loc = sum(
111 f.get("content", "").count("\n") + 1
112 for f in python_files_data
113 )
114
115 def record_rules(self, rules_toml_str: str) -> None:
116 try:

Callers 1

_execute_scanFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected