←back to thread

136 points d-yoda | 2 comments | | HN request time: 0.418s | source

Hi HN! I built pyscn for Python developers in the vibe coding era. If you're using Cursor, Claude, or ChatGPT to ship Python code fast, you know the feeling: features work, tests pass, but the codebase feels... messy.

Common vibe coding artifacts:

• Code duplication (from copy-pasted snippets)

• Dead code from quick iterations

• Over-engineered solutions for simple problems

• Inconsistent patterns across modules

pyscn performs structural analysis:

• APTED tree edit distance + LSH

• Control-Flow Graph (CFG) analysis

• Coupling Between Objects (CBO)

• Cyclomatic Complexity

Try it without installation:

  uvx pyscn analyze .          # Using uv (fastest)
  pipx run pyscn analyze .     # Using pipx
  (Or install: pip install pyscn)
Built with Go + tree-sitter. Happy to dive into the implementation details!
Show context
incomingpain ◴[] No.45490469[source]
I saw this project show up in some newsletters. Awesome project idea. I've been using 'vulture' so far.

But when i try to run analyze or check.

Running quality check...

Complexity analysis failed: [INVALID_INPUT] no Python files found in the specified paths

Dead code analysis failed: [INVALID_INPUT] no Python files found in the specified paths

  Clone detection failed: no Python files found in the specified paths
Error: analysis failed with errors

I'm certainly in a folder with python files.

replies(1): >>45511788 #
d-yoda ◴[] No.45511788[source]
Wow, was it really in some newsletters? That's awesome to hear, and would definitely explain the recent spike on GitHub!

Thanks a lot for the bug report and for providing the details. I have a hunch—it's possible that you need to explicitly specify the path depending on your directory structure. For example, if your Python files are under a src directory, could you try running it like [your_tool_name] analyze src/?

If that still doesn't solve the problem, it would be a huge help if you could open a quick issue on GitHub for this.

Thanks again for your feedback!

replies(1): >>45515100 #
1. incomingpain ◴[] No.45515100[source]
https://imgur.com/a/382mtPr

It was linked in the TLDR newsletter on monday.

(myglobalenv) steve@bird:~/PycharmProjects/netflow$ ls aggregator.py data netflow settings.py assets database.py notifications.py sniper.py config.py Dockerfile opencode.json start.sh context_manager.py integration.py __pycache__ tcpports.py context.py largflow.py README.md dashboard.py main.py requirements.txt (myglobalenv) steve@bird:~/PycharmProjects/netflow$ pyscn check . Running quality check... Complexity analysis failed: [INVALID_INPUT] no Python files found in the specified paths Dead code analysis failed: [INVALID_INPUT] no Python files found in the specified paths Clone detection failed: no Python files found in the specified paths Error: analysis failed with errors Usage: pyscn check [files...] [flags]

Flags: --allow-dead-code Allow dead code (don't fail) -c, --config string Configuration file path -h, --help help for check --max-complexity int Maximum allowed complexity (default 10) -q, --quiet Suppress output unless issues found --skip-clones Skip clone detection

Global Flags: -v, --verbose Enable verbose output

-v doesnt give me anything neither.

replies(1): >>45516266 #
2. d-yoda ◴[] No.45516266[source]
Thanks! I will fix the issue as soon as I can in the next version.