isort VS mypy

Compare isort vs mypy 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 mypy
9 37
4,323 11,863
3.3% 4.0%
9.4 9.7
4 days ago 4 days ago
Python Python
MIT License GNU General Public License v3.0 or later
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.


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 | | 7 Nov 2021
    yaml repos: - repo: rev: v1.4 hooks: - id: autoflake args: - --in-place - --remove-all-unused-imports - --expand-star-imports - --remove-duplicate-keys - --remove-unused-variables - repo: rev: v2.29.0 hooks: - id: pyupgrade args: [--py36-plus] - repo: rev: 5.9.3 hooks: - id: isort - repo: rev: 21.10b0 hooks: - id: black args: [--safe, --quiet] - repo: rev: 4.0.1 hooks: - id: flake8 - repo: local hooks: - id: pylint name: pylint entry: pylint language: system types: [python] args: [ "-rn", "-sn", ] - repo: rev: v0.910-1 hooks: - id: mypy name: mypy entry: mypy language: python types: [python] args: [] require_serial: true - repo: rev: v2.4.1 hooks: - id: prettier args: [--prose-wrap=always, --print-width=88]
  • Code Quality Tools in Python
    9 projects | | 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 | | 7 Oct 2021
  • Automate Clean Code and Linting in Python
    6 projects | | 22 Aug 2021
    isort 4.1k+ ⭐️
  • Write better Python - with some help!
    8 projects | | 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 | | 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 [INFO] Initializing environment for [INFO] Initializing environment for [INFO] Initializing environment for [INFO] Installing environment for [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for [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 | | 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 | | 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 | | 13 Oct 2020
    isort is also a similar tool to flake8, this tool sorts imports alphabetically, and automatically separated into sections and by type.


Posts with mentions or reviews of mypy. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-10-30.
  • mypy alternatives - pytype and pyright
    3 projects | 30 Oct 2021
  • How to fix mypy warning for this function
    2 projects | | 26 Oct 2021
    For your interest, this indeed was unintended behaviour on the part of `mypy`. It has since been fixed, apparently:
    2 projects | | 26 Oct 2021
    Just created a bug report for this.
  • Setup development environment
    4 projects | | 17 Oct 2021
    6. Add Mypy to the virtual environment. Mypy is a static type checker for Python.
  • Do You Miss Strongly-Typed World When Coding in Python? [RE#8]
    1 project | | 8 Oct 2021
    JavaScript people are lucky to have the well-known TypeScript at hand. For Python developers a good solution is mypy which is maintained by the official Python community: python/mypy. You can simply install it via:
  • Faster Python with Guido van Rossum
    11 projects | | 7 Oct 2021
    I am seeing what the GP comment says in a codebase I manage, around 47k LOC. Not massive at all, but enough where the problems mentioned above start to pop up. This is an application that runs in servers to analyze traffic data, so it has both analysis code and also a lot of code for the analysis framework. It gets hard to manage. I have unit tests and also integration tests that cover some, but not all of the code paths (it's very hard in this case to have everything covered). Most of the times, when they fail is due to something that would have been caught by static typing.

    The codebase is being slowly migrated to static typing. On one hand, as the parent says, the typing module is still immature and there are still some Python constructs (not too weird ones, see [1] for an example) that you can't type-check correctly. On the other hand, I like the fact that you can include typing slowly and not all at once, it makes the effort much easier to tackle. And, if typing works, it works well.

    Regarding performance, well. Parallelism is pretty hard to do well, and the language itself is not the fastest thing. Some parts are migrated to a C extension but that's costly in terms of development and debugging time.

    Despite all of that, I do think that Python was the best choice for our situation, and still is. Maybe from this point onwards another language would make things easier, but without Python's library support, ease and speed of development and expressiveness the cost of just getting to market would have been far higher, and probably we wouldn't have reached this point with other languages. And migrating the codebase to another language is just not worth it at all, as there are still a lot of areas we can improve quite a lot with far less effort than a full rewrite.


  • GitHub - facebookexperimental/skybison: Instagram's experimental performance oriented greenfield implementation of Python.
    2 projects | | 18 Sep 2021
    I don't know where you're getting your information, they did implement it. It's possible you're thinking of this issue which would make the typing more precise and let you specify totally different types for different keys. For now though any of the 4 ways I gave works.
  • Typehinting a dictionary that maps events to event handlers
    2 projects | | 9 Jul 2021
    I don't think it will be as easy as you're hoping, I think this is basically the same thing you're trying to do:
    2 projects | | 9 Jul 2021
  • Typeclasses in Python
    1 project | | 30 Jun 2021
    Support for singledispatch was recently added to mypy:

What are some alternatives?

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

black - The uncompromising Python code formatter

yapf - A formatter for Python files

PythonBuddy - 1st Online Python Editor With Live Syntax Checking and Execution

Flake8 - flake8 is a python tool that glues together pycodestyle, pyflakes, mccabe, and third-party plugins to check the style and quality of some python code.

typing - Python static typing home. Contains the source for typing_extensions and the documentation. Also hosts a user help forum.


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

bandit - Bandit is a tool designed to find common security issues in Python code.

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

pylama - Code audit tool for python.

pyright - Static type checker for Python