flake8 plugin that integrates isort

Overview
https://travis-ci.org/gforcada/flake8-isort.svg?branch=master https://coveralls.io/repos/gforcada/flake8-isort/badge.svg?branch=master&service=github

Flake8 meet isort

Use isort to check if the imports on your python files are sorted the way you expect.

Add an .isort.cfg to define how you want your imports sorted and run flake8 as you usually do.

See isort documentation for .isort.cfg available options.

Install

Install with pip:

$ pip install flake8-isort

Install with conda:

$ conda install -c conda-forge flake8-isort

Configuration

If using the select [option from flake8](http://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-select) be sure to enable the I category as well, see below for the specific error codes reported by flake8-isort.

Error codes

Error code Description
I001 isort found an import in the wrong position
I002 no configuration found (.isort.cfg or [isort] in configs)
I003 isort expected 1 blank line in imports, found 0
I004 isort found an unexpected blank line in imports
I005 isort found an unexpected missing import

Requirements

  • Python 2.7, 3.5, 3.6, pypy or pypy3
  • flake8
  • isort

Relation to flake8-import-order

As an alternative to this flake8 plugin, there's flake8-import-order that could be worth checking out. In contrast to this plugin that defers all logic to isort, the flake8-import-order comes bundled with it's own logic.

flake8-import-order comes with a few predefined set of styles meanwhile this plugin can be customized a bit more. But the biggest difference could lie in that flake8-isort actually has the corresponding sorting engine isort that can sort the import orders of your existing python files. Meanwhile flake8-import-order has no such corresponding tool, hence big existing projects who want to adopt either would get a more automized experience choosing flake8-isort.

License

GPL 2.0

Comments
  • flake8-isort reports several import warnings without any reason

    flake8-isort reports several import warnings without any reason

    Hey there, I have these import statements at the top of my module:

    
    import os
    
    from flask import Blueprint, abort, current_app, jsonify
    from flask.views import MethodView
    from webargs import fields, missing
    from webargs.flaskparser import use_kwargs
    from werkzeug.utils import secure_filename
    
    from tcst_api.models.data import DataContract, DataFile
    from tcst_api.schemas.data import DataContractSchema, DataFileSchema
    

    When I run flake8-isort on the file I get the following output:

    tcst_api/views/data.py:2:1: I001 isort found an import in the wrong position
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    tcst_api/views/data.py:4:1: I003 isort expected 1 blank line in imports, found 0
    

    Which is kinda meaningless and seems to be broken. However if I run isort on the same content I get no errors as expected.

    I'm using the following flake8 and isort versions:

    flake8 - 3.5.0
    flake8-isort - 2.3
    isort - 4.3.4
    

    Can you please help me with this?

    opened by Kamforka 14
  • Support isort5

    Support isort5

    Hi,

    This PR adds support for isort >=5 while retaining the code for isort 4.

    The new code parses the unified diff output produced by isort.api.check_file and isort.api.check_code_string.

    isort5 only reads one config file and uses a specific order. So the tests need their own temporary dir each. So I started to rewrite the tests and because the self.assertEqual() calls in the unit tests made it hard to debug, I moved everything to pytest fixtures.

    Pytest is used by the CI anyway.

    I started to work on a PR to support isort 5 before I saw https://github.com/gforcada/flake8-isort/issues/88#issuecomment-657172965, but I think it is the same approach. Please review.

    Fixes #88

    opened by bnavigator 12
  • No error outputted in flake8 >= 3.1.0

    No error outputted in flake8 >= 3.1.0

    I just installed this extension but there is no error output for any of the files that fail isort. I added a print statement before the yield so the config is fine and it is getting the error from isort but seems to not be passed along or displayed by flake8.

    $ flake8 --version
    3.2.0 (pyflakes: 1.3.0, flake8_isort: 2.0, mccabe: 0.5.2, pycodestyle: 2.2.0) CPython 2.7.12 on Linux
    
    opened by cas-- 11
  • Add option to allow overriding isort's skip_gitignore option

    Add option to allow overriding isort's skip_gitignore option

    Hi!

    I was profiling flake8 and found that ~90% of the runtime was just isort waiting for git subprocesses in order to implement skip_gitignore = True. (isort doesn't use libgit2 or anything, it just starts short-lived subprocesses targeting the git binary.)

    skip_gitignore = True is not very useful when running flake8-isort since flake8 uses its own ignore list already. This PR adds an option --isort-no-skip-gitignore that allows users to force skip_gitignore = False when running flake8-isort without having to remove skip_gitignore = True from their isort config.

    On the library I was profiling, --isort-no-skip-gitignore brought the flake8 runtime from ~50 s to ~5 s. Note that this measurement is on a Linux box. On Windows the speedup provided by this option appears to be much larger (apparently subprocess is extremely slow on Windows?). I actually did not finish the measurement on a Windows box because without --isort-no-skip-gitignore, flake8 was taking > 5 min.

    Note that skip_gitignore was added in isort 5.2, so I added the option to Flake8Isort5 rather than Flake8IsortBase.

    opened by gschaffner 10
  • Not working with isort new release v5.0.0

    Not working with isort new release v5.0.0

    Hi,

    I'm using flake8-isort plugin in my projects and since isort released the new version, v5.0.0, the plugin stopped working. Here is the log with traceback:

    Traceback (most recent call last):
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/plugins/manager.py", line 157, in load_plugin
        self._load()
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/plugins/manager.py", line 134, in _load
        self._plugin = self.entry_point.load()
      File "/app/.tox/lint/lib/python3.6/site-packages/importlib_metadata/__init__.py", line 105, in load
        module = import_module(match.group('module'))
      File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 994, in _gcd_import
      File "<frozen importlib._bootstrap>", line 971, in _find_and_load
      File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 678, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8_isort.py", line 3, in <module>
        from isort import SortImports
    ImportError: cannot import name 'SortImports'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/app/.tox/lint/bin/flake8", line 8, in <module>
        sys.exit(main())
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/main/cli.py", line 22, in main
        app.run(argv)
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/main/application.py", line 360, in run
        self._run(argv)
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/main/application.py", line 347, in _run
        self.initialize(argv)
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/main/application.py", line 328, in initialize
        self.find_plugins(config_finder)
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/main/application.py", line 159, in find_plugins
        self.check_plugins.load_plugins()
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/plugins/manager.py", line 415, in load_plugins
        plugins = list(self.manager.map(load_plugin))
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/plugins/manager.py", line 302, in map
        yield func(self.plugins[name], *args, **kwargs)
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/plugins/manager.py", line 413, in load_plugin
        return plugin.load_plugin()
      File "/app/.tox/lint/lib/python3.6/site-packages/flake8/plugins/manager.py", line 164, in load_plugin
        raise failed_to_load
    flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "I00" due to cannot import name 'SortImports'.
    
    opened by srtab 10
  • Adds isort output to each warning

    Adds isort output to each warning

    This PR introduces new warning output style. It now includes isort diff with how to fix your warning.

    Works the same way as pytest-isort.

    Problem (multiple spaces):

    import   os
    

    Old warning:

    flake8_isort.py:7:1: I001 isort found an import in the wrong position
    flake8_isort.py:7:7: E271 multiple spaces after keyword
    

    New warning:

    flake8_isort.py:7:1: I001 isort found an import in the wrong position
    
     from os.path import expanduser
     from testfixtures import OutputCapture
     
    -import   os
    +import os
     
     
     try:
    
    flake8_isort.py:7:7: E271 multiple spaces after keyword
    

    Closes #60

    opened by sobolevn 10
  • Incorrect version number

    Incorrect version number

    Just encountered a weird issue:

    > pip freeze | grep flake8-isort
    flake8-isort==5.0.0
    

    but flakeheaven tells me something different:

    > flakeheaven plugins
    
    NAME                         | VERSION  | CODES               | RULES
    ...
    flake8-isort                 | 4.2.1    | I00                 | +*
    ...
    

    I think this is because 4.2.1 is set here as version string: https://github.com/gforcada/flake8-isort/blob/master/flake8_isort.py#L12 Even though there is no such version released on pypi, could you maybe double check?

    opened by lukasbindreiter 9
  • No configuration found when is used with git hook

    No configuration found when is used with git hook

    Files with changes are moved to a temporal directory when flake8 git hook is used.

    $ flake8 --install-hook git

    flake8-isort should look for configuration files in the current directory while checking the files in the temporary directory.

    Before fix, no configuration is found.

    $ git commit -m "Commit message" script.py:0:1: I002 no configuration found (.isort.cfg or [isort] on setup.cfg)

    After fix, project configuration is found.

    $ git commit -m "Commit message" script.py:1:1: D200 One-line docstring should fit on one line with quotes

    opened by sergio-alonso 8
  • exception on empty __init__.py files

    exception on empty __init__.py files

    On version 2.1.0 and 2.1.1, empty __init__.py files triggers an exception.

    $ > __init__.py
    $ flake8 __init__.py
    Process Process-1:
    Traceback (most recent call last):
      File "/Users/mnencia/.pyenv/versions/2.7.12/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
        self.run()
      File "/Users/mnencia/.pyenv/versions/2.7.12/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 114, in run
        self._target(*self._args, **self._kwargs)
      File "/Users/mnencia/.pyenv/versions/2.7.12/envs/test/lib/python2.7/site-packages/flake8/checker.py", line 666, in _run_checks_from_queue
        checker.run_checks(results_queue, statistics_queue)
      File "/Users/mnencia/.pyenv/versions/2.7.12/envs/test/lib/python2.7/site-packages/flake8/checker.py", line 606, in run_checks
        self.run_ast_checks()
      File "/Users/mnencia/.pyenv/versions/2.7.12/envs/test/lib/python2.7/site-packages/flake8/checker.py", line 517, in run_ast_checks
        for (line_number, offset, text, check) in runner:
      File "/Users/mnencia/.pyenv/versions/2.7.12/envs/test/lib/python2.7/site-packages/flake8_isort.py", line 70, in run
        for line_num, message in self.sortimports_linenum_msg(sort_result):
      File "/Users/mnencia/.pyenv/versions/2.7.12/envs/test/lib/python2.7/site-packages/flake8_isort.py", line 116, in sortimports_linenum_msg
        self._fixup_sortimports_wrapped(sort_result)
      File "/Users/mnencia/.pyenv/versions/2.7.12/envs/test/lib/python2.7/site-packages/flake8_isort.py", line 172, in _fixup_sortimports_wrapped
        for idx, line in enumerate(sort_imports.out_lines):
    AttributeError: 'SortImports' object has no attribute 'out_lines'
    

    On 2.0.3 it works as expected.

    Empty files with a different name don't trigger the error.

    bug 
    opened by mnencia 8
  • Location of .isort.cfg

    Location of .isort.cfg

    I am not sure where or how to fix it, but I found out that .isort.cfg is not looked for recursively. It gets looked up in cwd and in the home directory. Right now I need to put an .isort.cfg in my project directory, because there I start vim and it looks at cwd. Then I need to symlink the .isort.cfg to src/package_name, because this is the cwd when this plugin gets called

    opened by do3cc 8
  • Reason for GPL 2.0?

    Reason for GPL 2.0?

    Is there any special reason that GPL version 2.0 has been chosen for flake8-isort?

    isort and flake8 are both released under MIT. Using flake8-isort some users might have licensing issues.

    opened by sliverc 7
  • flake8-isort 100 times slower than isort

    flake8-isort 100 times slower than isort

    I'd like to use flake8-isort in my project, but I can't because it is extremely slow. Here is a script to reproduce the issue.

    import os
    import shutil
    from pathlib import Path
    from time import time
    
    def prepare_files():
        shutil.rmtree("files", ignore_errors=True)
        Path("files").mkdir(exist_ok=True)
        content = "\n".join(10000 * ["def a(): pass"])
        for i in range(100):
            Path(f"files/file{i:03d}.py").write_text(content)
    
    def execute(cmd):
        start = time()
        os.system(cmd)
        duration = time() - start
        return duration
    
    if __name__ == "__main__":
        prepare_files()
        isort_duration = execute("isort --check-only files")
        print(f"isort: {isort_duration:.3f} sec")
        flake8_duration = execute("flake8 --select I001,I002,I003,I004,I005 files")
        print(f"flake8: {flake8_duration:.3f} sec")
        print(f"ratio: {flake8_duration / isort_duration:.1f}")
    
    

    I see following numbers on my machine (the same is on github actions).

    isort: 2.511 sec
    flake8: 394.109 sec
    ratio: 157.0
    

    Is it possible to do something with it?

    Versions:

    Python: 3.9.7
    flake8: 3.9.2
    flake8-isort: 4.0.0
    isort: 5.9.3
    
    opened by maratori 4
  • --isort-show-traceback: only show the traceback once per file

    --isort-show-traceback: only show the traceback once per file

    This PR is an experiment in ergonomics of flake8 output with the --isort-show-traceback option.

    At the moment the full traceback is printed with each message emitted. When I'm running flake8 on the command line this leads to very verbose output.

    This PR changes that behaviour so that the traceback is printed only once with the last message of the file.

    Feel free to throw this away if you prefer the existing behaviour; while this change is nicer for me I can imagine there are situations where repeating the traceback with every message might be desirable.

    opened by davidhewitt 0
  • Not working with flake8

    Not working with flake8

    In a project I'm working on (can provide link if you need it) we have a pipeline setup to run flake8, but flake8-isort doesn't seem to run correctly as it doesn't detect isort failures. Running isort only works fine, so I guess its the plugin :smile:

    Isort config (.isort.cfg)

    [settings]
    profile = black
    force_single_line = true
    

    Flake8 config (.flake8)

    [flake8]
    count = true
    
    ignore =
        A002,      # Argument is shadowing a python builtin.
        A003,      # Class attribute is shadowing a python builtin.
        CFQ002,    # Function has too many arguments.
        D102,      # Missing docstring in public method.
        D105,      # Magic methods not having a docstring.
        D412,      # No blank lines allowed between a section header and its content
        E402,      # Module level import not at top of file (isn't compatible with our import style).
        IFSTMT001  # "use a oneliner here".
        T101,      # TO-DO comment detection (T102 is FIX-ME and T103 is XXX).
        W503,      # line break before binary operator.
        W504,      # line break before binary operator (again, I guess).
        S101,      # Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
    
    # F401: unused import.
    # F403: cannot detect unused vars if we use starred import
    # FS003: f-string missing prefix.
    # R102: unnecessary parenthesis on raised exception (raises false positives in places)
    # S106: posible hardcoded password (we dont care about this in the tests)
    # D106, D104, D103, D101, D100: Missing docstring in public function/class/module (ignore in tests)
    per-file-ignores =
        hikari/__init__.py:              F401,F403
        hikari/events/__init__.py:       F401,F403
        hikari/utilities/routes.py:      FS003
        hikari/utilities/date.py:        FS003
        hikari/impl/stateless_cache.py:  R102
        tests/hikari/*:                  FS003,S106,D106,D104,D103,D101,D100
    
    max-complexity = 20
    # TODO reset to 100 again if possible.
    max-function-length = 130
    # Technically this is 120, but black has a policy of "1 or 2 over is fine if it is tidier", so we have to raise this.
    max-line-length = 130
    show_source = False
    statistics = False
    
    accept-encodings = utf-8
    docstring-convention = numpy
    

    Flake8 plugins

    # Android support
    #flake8==3.8.3
    git+https://gitlab.com/PyCQA/flake8@master
    
    # Plugins
    # Ref: https://github.com/DmytroLitvinov/awesome-flake8-extensions
    
    flake8-bandit~=2.1.2                    # runs bandit
    flake8-black==0.2.1                     # runs black
    flake8-broken-line==0.2.1               # forbey "\" linebreaks
    flake8-builtins==1.5.3                  # builtin shadowing checks
    flake8-coding==1.3.2                    # coding magic-comment detectiong
    flake8-comprehensions==3.2.3            # comprehension checks
    flake8-deprecated==1.3                  # deprecated call checks
    flake8-docstrings==1.5.0                # pydocstyle support
    flake8-executable==2.0.4                # shebangs
    flake8-fixme==1.1.1                     # "fix me" counter
    flake8-functions==0.0.4                 # function linting
    flake8-html==0.4.1                      # html output
    flake8-if-statements==0.1.0             # condition linting
    flake8-isort==4.0.0                     # runs isort
    isort==5.5.2
    flake8_formatter_junit_xml==0.0.6       # junit
    flake8-mutable==1.2.0                   # mutable default argument detection
    flake8-pep3101==1.3.0                   # new-style format strings only
    flake8-print==3.1.4                     # complain about print statements in code
    flake8-printf-formatting==1.1.0         # forbey printf-style python2 string formatting
    flake8-pytest-style==1.3.0              # pytest checks
    flake8-raise==0.0.5                     # exception raising linting
    flake8-use-fstring==1.1                 # format string checking
    
    opened by davfsa 2
  • Use max-line-length setting from flake8

    Use max-line-length setting from flake8

    In one of my files I have an import line that with a recent commit exceeded the length of 79 (the default line length in isort).

    For some reason, in my local environment (with virtualenv) flake8 did not report any errors. However, my CI pipeline failed during the linting step/check reporting an error on the above mentioned line. After lots of digging I figured out that this is due to exceeding the max line length (e.g., running isort in the Docker container that is used by the CI pipeline wrapped the imported classes in parentheses over multiple lines).

    Is there a reason why inconsistent results could be produced in this case?

    Adding line_length = n to my config file fixed this problem. Ideally, I feel that flake8-isort should use the max-line-length setting from flake8 and pass it to isort.

    opened by mschoettle 2
  • Honor flake8's own --config parameter

    Honor flake8's own --config parameter

    In reference to #42

    Within parse_options, options.config should be the command-line parameter received by flake8 itself. Once you have that, it's just matter of giving it proper priority.

    Note that this quick implementation does not check if the provided file actually contains a valid configuration. While thinking about it, I'm not certain whether that should be an immediate error, or whether it should keep looking for a valid configuration elsewhere...

    opened by SwampFalc 5
  • Add `settings-path` option support

    Add `settings-path` option support

    There's an awesome setting for the isort that I use quite frequently in my setup: settings-path. It allows to specify the desired configuration path.

    Could I please add a support for this option to this library? I really miss it, and it won't interfere with nay other options.

    That's how I think it should work:

    1. If --no-isort-config is passed, then we ignore all other steps and use the default options 0.1 We can also raise an exception if both --no-isort-config and --isort-settings-path are passed 0.2 We can just ignore the --isort-settings-path
    2. If this option is passed - then try to read this file. I have two options in case this file does not exist or can not be red: 1.1 We can raise an exception. All flake8 check will fail with this exception. This will help to indicate about the problem early 1.2 Just fallback to the config finding behavior in case this file is missing
    3. If no options are passed we should fallback to the config finding logic

    @gforcada What do you think?

    I personally prefer explicit exceptions. As they indicate about the problem. And not hiding it.

    opened by sobolevn 9
A plugin for Flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle.

flake8-bugbear A plugin for Flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycode

Python Code Quality Authority 869 Dec 30, 2022
❄️ A flake8 plugin to help you write better list/set/dict comprehensions.

flake8-comprehensions A flake8 plugin that helps you write better list/set/dict comprehensions. Requirements Python 3.6 to 3.9 supported. Installation

Adam Johnson 398 Dec 23, 2022
Flake8 plugin that checks import order against various Python Style Guides

flake8-import-order A flake8 and Pylama plugin that checks the ordering of your imports. It does not check anything else about the imports. Merely tha

Python Code Quality Authority 270 Nov 24, 2022
Flake8 plugin to find commented out or dead code

flake8-eradicate flake8 plugin to find commented out (or so called "dead") code. This is quite important for the project in a long run. Based on eradi

wemake.services 277 Dec 27, 2022
flake8 plugin to run black for checking Python coding style

flake8-black Introduction This is an MIT licensed flake8 plugin for validating Python code style with the command line code formatting tool black. It

Peter Cock 146 Dec 15, 2022
A plugin for flake8 integrating Mypy.

flake8-mypy NOTE: THIS PROJECT IS DEAD It was created in early 2017 when Mypy performance was often insufficient for in-editor linting. The Flake8 plu

Łukasz Langa 103 Jun 23, 2022
A plugin for Flake8 that checks pandas code

pandas-vet pandas-vet is a plugin for flake8 that provides opinionated linting for pandas code. It began as a project during the PyCascades 2019 sprin

Jacob Deppen 146 Dec 28, 2022
flake8 plugin to catch useless `assert` statements

flake8-useless-assert flake8 plugin to catch useless assert statements Download or install on the PyPI page Violations Code Description Example ULA001

null 1 Feb 12, 2022
The official GitHub mirror of https://gitlab.com/pycqa/flake8

Flake8 Flake8 is a wrapper around these tools: PyFlakes pycodestyle Ned Batchelder's McCabe script Flake8 runs all the tools by launching the single f

Python Code Quality Authority 2.6k Jan 3, 2023
Flake8 extension for checking quotes in python

Flake8 Extension to lint for quotes. Major update in 2.0.0 We automatically encourage avoiding escaping quotes as per PEP 8. To disable this, use --no

Zachary Heller 157 Dec 13, 2022
Flake8 wrapper to make it nice, legacy-friendly, configurable.

THE PROJECT IS ARCHIVED Forks: https://github.com/orsinium/forks It's a Flake8 wrapper to make it cool. Lint md, rst, ipynb, and more. Shareable and r

Life4 232 Dec 16, 2022
Automated security testing using bandit and flake8.

flake8-bandit Automated security testing built right into your workflow! You already use flake8 to lint all your code for errors, ensure docstrings ar

Tyler Wince 96 Jan 1, 2023
Flake8 extension for enforcing trailing commas in python

Flake8 Extension to enforce better comma placement. Usage If you are using flake8 it's as easy as: pip install flake8-commas Now you can avoid those a

Python Code Quality Authority 127 Sep 3, 2022
Tool to automatically fix some issues reported by flake8 (forked from autoflake).

autoflake8 Introduction autoflake8 removes unused imports and unused variables from Python code. It makes use of pyflakes to do this. autoflake8 also

francisco souza 27 Sep 8, 2022
Utilities for pycharm code formatting (flake8 and black)

Pycharm External Tools Extentions to Pycharm code formatting tools. Currently supported are flake8 and black on a selected code block. Usage Flake8 [P

Haim Daniel 13 Nov 3, 2022
Flake8 extension to provide force-check option

flake8-force Flake8 extension to provide force-check option. When this option is enabled, flake8 performs all checks even if the target file cannot be

Kenichi Maehashi 9 Oct 29, 2022
Pylint plugin for improving code analysis for when using Django

pylint-django About pylint-django is a Pylint plugin for improving code analysis when analysing code using Django. It is also used by the Prospector t

Python Code Quality Authority 544 Jan 6, 2023
A Pylint plugin to analyze Flask applications.

pylint-flask About pylint-flask is Pylint plugin for improving code analysis when editing code using Flask. Inspired by pylint-django. Problems pylint

Joe Schafer 62 Sep 18, 2022
isort is a Python utility / library to sort imports alphabetically, and automatically separated into sections and by type.

isort is a Python utility / library to sort imports alphabetically, and automatically separated into sections and by type. It provides a command line utility, Python library and plugins for various editors to quickly sort all your imports.

Python Code Quality Authority 5.5k Jan 8, 2023
Tool for automatically reordering python imports. Similar to isort but uses static analysis more.

reorder_python_imports Tool for automatically reordering python imports. Similar to isort but uses static analysis more. Installation pip install reor

Anthony Sottile 589 Dec 26, 2022