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

Function should_skip_file

src/pyspector/cli.py:137–154  ·  view source on GitHub ↗

Determine if a file should be skipped during AST parsing.

(file_path: Path)

Source from the content-addressed store, hash-verified

135 Shown at the start of every scan. The verbose ``[*]`` progress lines that
136 follow are gated by --debug.
137 """
138 click.echo(click.style(_BANNER))
139 click.echo(f"Version: {_get_version()}")
140 click.echo("Made with <3 by github.com/ParzivalHack\n")
141 note = get_startup_note()
142 click.echo(click.style(f"{note}\n", fg="bright_black", italic=True))
143
144
145def should_skip_file(file_path: Path) -> bool:
146 """Determine if a file should be skipped during AST parsing."""
147 path_str = str(file_path)
148 skip_patterns = [
149 '/tests/fixtures/',
150 '/test/fixtures/',
151 '/testdata/',
152 '/_fixtures/',
153 '/fixtures/',
154 ]
155 for pattern in skip_patterns:
156 if pattern in path_str.replace('\\', '/'):
157 return True

Callers 1

get_python_file_astsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected