SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 Python Code Analysis Projects
-
XO. This feels like the Black of Typescript linting. XO has styles for everything and is very opinionated. This can be nice, because it takes a lot of code style decisions off of your plate. But beware it can be cumbersome to implement in the middle of a project because it will require extensive reformatting. In lieu of XO, I found Unicorn opinionated enough and more immediately useful.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
-
YAPF (Yet Another Python Formatter): YAPF takes a different approach in that it’s based off of ‘clang-format’, a popular formatter for C++ code. YAPF reformats Python code so that it conforms to the style guide and looks good.
-
scalene
Scalene: a high-performance, high-precision CPU, GPU, and memory profiler for Python with AI-powered optimization proposals
This has been a feature of the Scalene Python profiler (https://github.com/plasma-umass/scalene) for some time (at this point, about 1.5 years) - bring your own API key for OpenAI / Azure / Bedrock, also works with Ollama. Optimizing Python code to use NumPy or other similar native libraries can easily yield multiple order of magnitude improvements in real-world settings. We tried it on several of the success stories of Scalene (before the integration with LLMs); see https://github.com/plasma-umass/scalene/issues/58 - and found that it often automatically yielded the same or better optimizations - see https://github.com/plasma-umass/scalene/issues/554. (Full disclosure: I am one of the principal designers of Scalene.)
-
# .pre-commit-config.yaml (28.06.2024) repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-added-large-files - repo: https://github.com/PyCQA/isort rev: 5.13.2 hooks: - id: isort - repo: https://github.com/psf/black rev: 24.4.2 hooks: - id: black - repo: https://github.com/pycqa/flake8 rev: 7.1.0 hooks: - id: flake8 - repo: local hooks: - id: django-check name: Run Django Check entry: python manage.py check language: system pass_filenames: false types: [python]
-
pytype (https://github.com/google/pytype) is based on symbolic interpretation of python bytecode, but with the data stack storing types rather than values. it works very well and has been running in production within google forever.
the nice thing about writing a bytecode rather than an AST interpreter is that you can leverage a lot of the work the python compiler does, and work with the resulting simplified code.
-
-
Code2flow generates call graphs for dynamic programming language. Code2flow supports Python, JavaScript, Ruby, and PHP.
-
-
vulture – Find dead Python code
-
coala
coala provides a unified command-line interface for linting and fixing all your code, regardless of the programming languages you use.
-
-
-
a very important difference is that MS doesn't let you use some of their quite nice language servers unless you're using VS Code, e.g. Pylance: https://github.com/microsoft/pylance-release/issues/483
for this reason, the non-MS-built VS Code isn't equivalent to theirs, regardless of the license of the editor itself.
-
-
-
-
monitors4codegen
Code and Data artifact for NeurIPS 2023 paper - "Monitor-Guided Decoding of Code LMs with Static Analysis of Repository Context". `multispy` is a lsp client library in Python intended to be used to build applications around language servers.
Project mention: Multilspy: Building a common LSP client handtuned for all Language servers | news.ycombinator.com | 2024-12-16 -
multilspy
multispy is a lsp client library in Python intended to be used to build applications around language servers.
Project mention: Multilspy: Building a common LSP client handtuned for all Language servers | news.ycombinator.com | 2024-12-16 -
-
Project mention: OpenRepoWiki: Automatically generate a wiki page for any given GitHub repository | news.ycombinator.com | 2025-01-09
-
-
Python Code Analysis discussion
Python Code Analysis related posts
-
LLMs and Code Optimization
-
Python Meta Circular Interpreter (2019)
-
Enhancing Code Quality: Adding Formatters and Linters to Code-Formatter-Advisor
-
Ask HN: Are my HPC professors right? Is Python worthless compared to C?
-
Black – The uncompromising Python code formatter
-
code tools
-
GitHub Is Down?
-
A note from our sponsor - SaaSHub
www.saashub.com | 19 Jan 2025
Index
What are some of the best open-source Code Analysis projects in Python? This list will help you:
# | Project | Stars |
---|---|---|
1 | black | 39,446 |
2 | YouCompleteMe | 25,522 |
3 | yapf | 13,821 |
4 | scalene | 12,363 |
5 | isort | 6,568 |
6 | pytype | 4,809 |
7 | typeshed | 4,456 |
8 | code2flow | 4,082 |
9 | vprof | 3,957 |
10 | vulture | 3,632 |
11 | coala | 3,555 |
12 | wemake-python-styleguide | 2,639 |
13 | pydeps | 1,842 |
14 | pylance-release | 1,731 |
15 | pyannotate | 1,428 |
16 | git-fame | 692 |
17 | lancer | 257 |
18 | monitors4codegen | 234 |
19 | multilspy | 191 |
20 | tokei-pie | 184 |
21 | open-repo-wiki | 153 |
22 | chainjacking | 57 |
23 | cookiecutter-cpp-project | 54 |