isort VS yapf

Compare isort vs yapf and see what are their differences.

Our great sponsors
  • Scout APM - A developer's best friend. Try free for 14-days
  • Nanos - Run Linux Software Faster and Safer than Linux with Unikernels
  • SaaSHub - Software Alternatives and Reviews
isort yapf
9 4
4,323 12,180
3.3% 0.9%
9.4 7.6
4 days ago 19 days ago
Python Python
MIT License Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

isort

Posts with mentions or reviews of isort. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-11-07.
  • Python Code Quality - Improve the quality of your Python code with linters, code formatters, and security vulnerability scanners
    7 projects | reddit.com/r/Python | 7 Nov 2021
    yaml repos: - repo: https://github.com/myint/autoflake rev: v1.4 hooks: - id: autoflake args: - --in-place - --remove-all-unused-imports - --expand-star-imports - --remove-duplicate-keys - --remove-unused-variables - repo: https://github.com/asottile/pyupgrade rev: v2.29.0 hooks: - id: pyupgrade args: [--py36-plus] - repo: https://github.com/PyCQA/isort rev: 5.9.3 hooks: - id: isort - repo: https://github.com/psf/black rev: 21.10b0 hooks: - id: black args: [--safe, --quiet] - repo: https://github.com/PyCQA/flake8 rev: 4.0.1 hooks: - id: flake8 - repo: local hooks: - id: pylint name: pylint entry: pylint language: system types: [python] args: [ "-rn", "-sn", ] - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.910-1 hooks: - id: mypy name: mypy entry: mypy language: python types: [python] args: [] require_serial: true - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.4.1 hooks: - id: prettier args: [--prose-wrap=always, --print-width=88]
  • Code Quality Tools in Python
    9 projects | dev.to | 9 Oct 2021
    Formatters automatically format your code based on a style guide. Some popular formatters are Black, YAPF, autopep8 and isort.
  • Three cool projects to contribute to during Hacktoberfest
    14 projects | dev.to | 7 Oct 2021
  • Automate Clean Code and Linting in Python
    6 projects | dev.to | 22 Aug 2021
    isort 4.1k+ ⭐️
  • Write better Python - with some help!
    8 projects | dev.to | 3 Aug 2021
    If you like to keep your imports in tact, there are also rules to enforce a specific order amongst them. One tool that does that is isort. Isort follows the order:
  • Make your Django project newbie contributor friendly with pre-commit
    5 projects | dev.to | 4 Jul 2021
    $ pre-commit install pre-commit installed at .git/hooks/pre-commit $ git add .pre-commit-config.yaml $ git commit -m "Add pre-commit config" [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Initializing environment for https://gitlab.com/pycqa/flake8. [INFO] Initializing environment for https://github.com/pycqa/isort. [INFO] Initializing environment for https://github.com/python/black. [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://gitlab.com/pycqa/flake8. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/pycqa/isort. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/python/black. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... Trim Trailing Whitespace.................................................Passed Check Yaml...............................................................Passed Check for merge conflicts................................................Passed Debug Statements (Python)............................(no files to check)Skipped Check for added large files..............................................Passed Fix requirements.txt.................................(no files to check)Skipped Check django project for potential problems..........(no files to check)Skipped Check django project for missing migrations..........(no files to check)Skipped flake8...............................................(no files to check)Skipped isort................................................(no files to check)Skipped black................................................(no files to check)Skipped
  • How to Protect Your Python Code Health 🐍🩺
    2 projects | dev.to | 6 Jun 2021
    A formatter arranges our code so that it's more readable on the screen, but does not change what our code does. Black and isort are formatters.
  • Looking Beyond Nox
    7 projects | dev.to | 8 Apr 2021
    Run syntax checks, including isort through flake8, and generate a report for each sub-project.
  • Python: Setting Up Project Environment
    12 projects | dev.to | 13 Oct 2020
    isort is also a similar tool to flake8, this tool sorts imports alphabetically, and automatically separated into sections and by type.

yapf

Posts with mentions or reviews of yapf. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-10-09.
  • Code Quality Tools in Python
    9 projects | dev.to | 9 Oct 2021
    YAPF (Yet Another Python Formatter) is Google's official python formatter which follows google's style guide. The documentation is easy to understand the installation and configuration for this formatter.
  • Sunday Daily Thread: What's everyone working on this week?
    10 projects | reddit.com/r/Python | 7 Aug 2021
    You could also try yapf - it's slower to run but has more customization options. I would recommend it if you dislike how black formatting looks, but it may take some time to figure out the customization options you like. Also if you're on a team that likes to argue about style, then you may find yourself arguing about yapf configuration instead!
  • [HELP][Tabs] Automatically select intent character based on file.
    4 projects | reddit.com/r/vim | 29 Dec 2020
    Or simply fix the python files by executing a fixer upon them, no need to even use Vim. I use yapf
  • Python: Setting Up Project Environment
    12 projects | dev.to | 13 Oct 2020
    Black is the uncompromising Python code formatter provided by the Python Software Foundation. An alternative to black is yapf, distributed by Google. Both tools have their own strengths and weaknesses, but in my personal opinion, black is a bit easier to use.

What are some alternatives?

When comparing isort and yapf you can also consider the following projects:

black - The uncompromising Python code formatter

Pylint - It's not just a linter that annoys you!

awesome-python-typing - Collection of awesome Python types, stubs, plugins, and tools to work with them.

flake8

pyright - Static type checker for Python

Poetry - Python dependency management and packaging made easy.

autoflake - Removes unused imports and unused variables as reported by pyflakes

black - The uncompromising Python code formatter [Moved to: https://github.com/psf/black]

autopep8 - A tool that automatically formats Python code to conform to the PEP 8 style guide.

pyenv-installer - This tool is used to install `pyenv` and friends.