Coder Social home page Coder Social logo

awesome-python-ast's Introduction

awesome-python-ast

Python tools, libraries and resources about AST (as in Abstract Syntax Trees)

Online resources

Tools

  • astmonkey - Set of tools to play with Python AST
  • astor - AST read/write
  • astpath - A command-line search utility for Python ASTs using XPath syntax.
  • astpretty - Pretty print the output of python stdlib ast.parse.
  • astroid - A common base representation of python source code for pylint and other projects
  • astsearch - Search through ASTs using XPath syntax
  • astunparse - a factored out version of unparse found in the Python source distribution
  • baron - a Full Syntax Tree (FST) library
  • parso - parser that supports error recovery and round-trip parsing
  • redbaron - Bottom-up approach to refactoring in python
  • show_ast - An IPython notebook plugin for visualizing ASTs.
  • tokenize-rt - A wrapper around the stdlib tokenize which roundtrips.

Unused code detection

Formatters

  • autopep8 - A tool that automatically formats Python code to conform to the PEP 8 style guide
  • black - The uncompromising Python code formatter | Online demo
  • yapf - configurable formatter from Google | Online demo

Linters

  • flake8 - glues together pycodestyle, pyflakes, mccabe, and third-party plugins to check the style and quality of code
  • mccabe - McCabe complexity checker
  • pycodestyle - former pep8. Check your Python code against some of the style conventions in PEP 8.
  • pydocstyle - docstring style checker
  • pyflakes - A simple program which checks Python source files for errors.
  • pylint - code analysis tool which looks for programming errors, helps enforcing a coding standard, sniffs for code smells and offers simple refactoring suggestions.

Import sorters

Other

  • add-trailing-comma - A tool (and pre-commit hook) to automatically add trailing commas to calls and literals.
  • pyupgrade - A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language.
  • yesqa - A tool (and pre-commit hook) to automatically remove unnecessary # noqa comments

Online tools

Articles

2010-02-22: Instrumenting the AST

Code examples

TODOs

  • common dependencies
  • "getting into" howto
  • static/dynamic code analysis
  • pluggable or not

awesome-python-ast's People

Contributors

gyermolenko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.