Flake8 plugin that checks import order against various Python Style Guides

Overview

flake8-import-order

Build Status

A flake8 and Pylama plugin that checks the ordering of your imports. It does not check anything else about the imports. Merely that they are grouped and ordered correctly.

In general stdlib comes first, then 3rd party, then local packages, and that each group is individually alphabetized, however this depends on the style used. Flake8-Import-Order supports a number of styles and is extensible allowing for custom styles.

This plugin was originally developed to match the style preferences of the cryptography project, with this style remaining the default.

Warnings

This package adds 4 new flake8 warnings

  • I100: Your import statements are in the wrong order.
  • I101: The names in your from import are in the wrong order.
  • I201: Missing newline between import groups.
  • I202: Additional newline in a group of imports.

Styles

The following styles are directly supported,

  • cryptography - see an example
  • google - style described in Google Style Guidelines, see an example
  • smarkets - style as google only with import statements before from X import ... statements, see an example
  • appnexus - style as google only with import statements for packages local to your company or organisation coming after import statements for third-party packages, see an example
  • edited - see an example
  • pycharm - style as smarkets only with case sensitive sorting imported names
  • pep8 - style that only enforces groups without enforcing the order within the groups

You can also add your own style by extending Style class.

Configuration

You will want to set the application-import-names option to a comma separated list of names that should be considered local to your application. These will be used to help categorise your import statements into the correct groups. Note that relative imports are always considered local.

You will want to set the application-package-names option to a comma separated list of names that should be considered local to your company or organisation, but which are obtained using some sort of package manager like Pip, Apt, or Yum. Typically, code representing the values listed in this option is located in a different repository than the code being developed. This option is only accepted in the supported appnexus or edited styles or in any style that accepts application package names.

The application-import-names and application-package-names can contain namespaced packages or even exact nested module names. (This is possible with 0.16 onwards).

import-order-style controls what style the plugin follows (cryptography is the default).

Limitations

Currently these checks are limited to module scope imports only. Conditional imports in module scope will also be ignored.

Classification of an imported module is achieved by checking the module against a stdlib list and then if there is no match against the application-import-names list and application-package-names if the style accepts application-package names. Only if none of these lists contain the imported module will it be classified as third party.

These checks only consider an import against its previous import, rather than considering all the imports together. This means that I100 errors are only raised for the latter of adjacent imports out of order. For example,

import X.B
import X  # I100
import X.A

only import X raises an I100 error, yet import X.A is also out of order compared with the import X.B.

Imported modules are classified as stdlib if the module is in a vendored list of stdlib modules. This list is based on the latest release of Python and hence the results can be misleading. This list is also the same for all Python versions because otherwise it would be impossible to write programs that work under both Python 2 and 3 and pass the import order check.

The I202 check will consider any blank line between imports to count, even if the line is not contextually related to the imports. For example,

import logging
try:
    from logging import NullHandler
except ImportError:
    class NullHandler(logging.Handler):
        """Shim for version of Python < 2.7."""

        def emit(self, record):
            pass
import sys  # I202 due to the blank line before the 'def emit'

will trigger a I202 error despite the blank line not being contextually related.

Extending styles

You can add your own style by extending flake8_import_order.styles.Style class. Here's an example:

from flake8_import_order.styles import Cryptography


class ReversedCryptography(Cryptography):
    # Note that Cryptography is a subclass of Style.

    @staticmethod
    def sorted_names(names):
        return reversed(Cryptography.sorted_names(names))

By default there are five import groupings or sections; future, stdlib, third party, application, and relative imports. A style can choose to accept another grouping, application-package, by setting the Style class variable accepts_application_package_names to True, e.g.

class PackageNameCryptography(Cryptography):
    accepts_application_package_names = True

To make flake8-import-order able to discover your extended style, you need to register it as flake8_import_order.styles using setuptools' entry points mechanism:

# setup.py of your style package
setup(
    name='flake8-import-order-reversed-cryptography',
    ...,
    entry_points={
        'flake8_import_order.styles': [
            'reversed = reversedcryptography:ReversedCryptography',
            # 'reversed' is a style name.  You can pass it to
            # --import-order-style option
            # 'reversedcryptography:ReversedCryptography' is an import path
            # of your extended style class.
        ]
    }
)
Comments
  • Improve namespace package support

    Improve namespace package support

    We're using flake8 with namespace packages and we'd like to group our imports like this:

    import functools
    
    import google.auth  # separate package
    from google.cloud import core  # separate package
    import six
    
    from google.cloud.bigquery import table  # package-local, we're in google/cloud/bigquery/job.py
    

    It's fine if we need to specify this via a flag (like --application-import-names=google.cloud.bigquery)

    Presently we must either choose between putting all google.* imports in the 2nd grouping or the 3rd grouping.

    opened by theacodes 15
  • Ignore comment lines from I202?

    Ignore comment lines from I202?

    Not sure if this is a bug really, but there's a couple of places I have code like:

    import os
    # Need to import this for xyz.
    import sys
    
    ...
    

    This ends up with an error:

    $ flake8 --import-order-style appnexus temp.py
    temp.py:3:1: I202 Additional newline in a section of imports.
    

    Comments are explicit though, so maybe they should be ignored in the spacing check?

    What do you think?

    opened by clokep 12
  • dependency on enum34 causes issues on macOS with Python 3.6

    dependency on enum34 causes issues on macOS with Python 3.6

    After updating flake8-import-order and its dependencies I get tracebacks like this:

    Failed to import the site module
    Traceback (most recent call last):
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 544, in <module>
        main()
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 530, in main
        known_paths = addusersitepackages(known_paths)
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 282, in addusersitepackages
        user_site = getusersitepackages()
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 258, in getusersitepackages
        user_base = getuserbase() # this will also set USER_BASE
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 248, in getuserbase
        USER_BASE = get_config_var('userbase')
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/sysconfig.py", line 601, in get_config_var
        return get_config_vars().get(name)
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/sysconfig.py", line 580, in get_config_vars
        import _osx_support
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/_osx_support.py", line 4, in <module>
        import re
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/re.py", line 142, in <module>
        class RegexFlag(enum.IntFlag):
    AttributeError: module 'enum' has no attribute 'IntFlag'
    

    After looking around on the internet I found:

    https://stackoverflow.com/questions/43124775/why-python-3-6-1-throws-attributeerror-module-enum-has-no-attribute-intflag

    Which implies having enum34 installed causes this problem.

    This dependency was introduced in:

    https://github.com/PyCQA/flake8-import-order/commit/c52371fd5314429895064135146ef80e7c36a07f#diff-2eeaed663bd0d25b7e608891384b7298R32

    So I uninstalled it, but then enum34 causes import to fail:

    Traceback (most recent call last):
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
        "__main__", mod_spec)
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "/usr/local/lib/python3.6/site-packages/flake8/__main__.py", line 4, in <module>
        cli.main()
      File "/usr/local/lib/python3.6/site-packages/flake8/main/cli.py", line 16, in main
        app.run(argv)
      File "/usr/local/lib/python3.6/site-packages/flake8/main/application.py", line 396, in run
        self._run(argv)
      File "/usr/local/lib/python3.6/site-packages/flake8/main/application.py", line 384, in _run
        self.run_checks()
      File "/usr/local/lib/python3.6/site-packages/flake8/main/application.py", line 310, in run_checks
        self.file_checker_manager.run()
      File "/usr/local/lib/python3.6/site-packages/flake8/checker.py", line 321, in run
        self.run_serial()
      File "/usr/local/lib/python3.6/site-packages/flake8/checker.py", line 305, in run_serial
        checker.run_checks()
      File "/usr/local/lib/python3.6/site-packages/flake8/checker.py", line 579, in run_checks
        self.run_ast_checks()
      File "/usr/local/lib/python3.6/site-packages/flake8/checker.py", line 493, in run_ast_checks
        for (line_number, offset, text, check) in runner:
      File "/usr/local/lib/python3.6/site-packages/flake8_import_order/flake8_linter.py", line 91, in run
        for error in self.check_order():
      File "/usr/local/lib/python3.6/site-packages/flake8_import_order/checker.py", line 58, in check_order
        style_cls = style_entry_point.load()
      File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2407, in load
        self.require(*args, **kwargs)
      File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2430, in require
        items = working_set.resolve(reqs, env, installer, extras=self.extras)
      File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 870, in resolve
        raise DistributionNotFound(req, requirers)
    pkg_resources.DistributionNotFound: The 'enum34' distribution was not found and is required by the application
    

    The other recommendation from SO is to depend on enum-compat which only installs enum34 when necessary. So perhaps the solution is to just depend on that instead of enum34?

    opened by wjwwood 11
  • I201 Is Only Enforced When Selected

    I201 Is Only Enforced When Selected

    flake8 only throws errors on I201 when --select I201 is used

    example: my_file.py

    import logging
    import wtforms
    import wtforms.validators as validators
    

    flake8 my_file.py (returns nothing)

    flake8 --select I201 my_file.py my_file.py:4:1: I201 Missing newline before sections or imports. I201 Missing newline before sections or imports.

    opened by pwgraham91 11
  • IndexError when checking file from stdin

    IndexError when checking file from stdin

    When linting a file from stdin, this plugin raises an error.

    $ cat conftest.py | flake8 -
    Traceback (most recent call last):
      File "/tmp/venv/bin/flake8", line 11, in <module>
        sys.exit(main())
      File "/tmp/venv/lib/python3.5/site-packages/flake8/main/cli.py", line 16, in main
        app.run(argv)
      File "/tmp/venv/lib/python3.5/site-packages/flake8/main/application.py", line 316, in run
        self._run(argv)
      File "/tmp/venv/lib/python3.5/site-packages/flake8/main/application.py", line 300, in _run
        self.run_checks()
      File "/tmp/venv/lib/python3.5/site-packages/flake8/main/application.py", line 238, in run_checks
        self.file_checker_manager.run()
      File "/tmp/venv/lib/python3.5/site-packages/flake8/checker.py", line 346, in run
        self.run_serial()
      File "/tmp/venv/lib/python3.5/site-packages/flake8/checker.py", line 330, in run_serial
        checker.run_checks(self.results_queue, self.statistics_queue)
      File "/tmp/venv/lib/python3.5/site-packages/flake8/checker.py", line 564, in run_checks
        self.run_ast_checks()
      File "/tmp/venv/lib/python3.5/site-packages/flake8/checker.py", line 475, in run_ast_checks
        for (line_number, offset, text, check) in runner:
      File "/tmp/venv/lib/python3.5/site-packages/flake8_import_order/flake8_linter.py", line 66, in run
        for error in self.check_order():
      File "/tmp/venv/lib/python3.5/site-packages/flake8_import_order/checker.py", line 46, in check_order
        if not pycodestyle.noqa(self.lines[import_.lineno - 1]):
    IndexError: list index out of range
    

    This does work when just linting a file instead.

    $ flake8 conftest.py
    $
    

    I've installed the following packages in my environment (simply a virtualenv using the latest flake8 and flake8-import-order).

    $ pip list
    flake8 (3.0.2)
    flake8-import-order (0.9.1)
    mccabe (0.5.0)
    pip (8.1.2)
    pycodestyle (2.0.0)
    pyflakes (1.2.3)
    setuptools (25.1.0)
    wheel (0.29.0)
    

    This bug does not yet exist when using the following requirements:

    flake8 ~= 2.5.5
    flake8-import-order ~= 0.8.0
    

    I didn't try this using flake8 ~= 2.6.0, because this was causing errors related to other plugins.

    opened by remcohaszing 11
  • issue with relative imports

    issue with relative imports

    After updating to 2014-10-29 version I started getting lots of:

    I201 Missing newline before sections or imports.
    

    For absolute imports followed by relative imports:

    from myproject.app.tests import UserFactory
    from .tests import SomeClass
    

    I have these settings defined in tox.ini:

    import-order-style=google
    application-import-names=myproject,myproject2
    

    Anyone else getting changed behavior with the 2014-10-29 release?

    opened by adrianandreias 11
  • Make styles able to be extended by users

    Make styles able to be extended by users

    This patch replaces hardcoded style names with setuptools' entry points.

    Entry points are a simple way for distributions to “advertise” Python objects (such as functions or classes) for use by other distributions. Extensible applications and frameworks can search for entry points with a particular name or group, either from a specific distribution or from all active distributions on sys.path, and then inspect or load the advertised objects at will.

    The group name of extensible entry points is flake8_import_order.styles (which follows the convention). Built-in styles also become discovered using entry points so that style names don't have to be hardcoded.

    Also wrote some docs about extending styles into README.rst, but I'm unsure that my English is fine. If anyone reviews my code and docs I would adjust the patch.

    Thanks for the very useful program! :+1:

    opened by dahlia 10
  • Crash when run with flake8 3.0

    Crash when run with flake8 3.0

    (cryptography) ~/p/cryptography (master) $ flake8
    Traceback (most recent call last):
      File "/Users/alex_gaynor/.virtualenvs/cryptography/bin/flake8", line 11, in <module>
        sys.exit(main())
      File "/Users/alex_gaynor/.virtualenvs/cryptography/site-packages/flake8/main/cli.py", line 16, in main
        app.run(argv)
      File "/Users/alex_gaynor/.virtualenvs/cryptography/site-packages/flake8/main/application.py", line 299, in run
        self._run(argv)
      File "/Users/alex_gaynor/.virtualenvs/cryptography/site-packages/flake8/main/application.py", line 285, in _run
        self.initialize(argv)
      File "/Users/alex_gaynor/.virtualenvs/cryptography/site-packages/flake8/main/application.py", line 276, in initialize
        self.register_plugin_options()
      File "/Users/alex_gaynor/.virtualenvs/cryptography/site-packages/flake8/main/application.py", line 150, in register_plugin_options
        self.check_plugins.register_options(self.option_manager)
      File "/Users/alex_gaynor/.virtualenvs/cryptography/site-packages/flake8/plugins/manager.py", line 451, in register_options
        list(self.manager.map(register_and_enable))
      File "/Users/alex_gaynor/.virtualenvs/cryptography/site-packages/flake8/plugins/manager.py", line 261, in map
        yield func(self.plugins[name], *args, **kwargs)
      File "/Users/alex_gaynor/.virtualenvs/cryptography/site-packages/flake8/plugins/manager.py", line 447, in register_and_enable
        call_register_options(plugin)
      File "/Users/alex_gaynor/.virtualenvs/cryptography/site-packages/flake8/plugins/manager.py", line 357, in generated_function
        return method(optmanager, *args, **kwargs)
      File "/Users/alex_gaynor/.virtualenvs/cryptography/site-packages/flake8/plugins/manager.py", line 207, in register_options
        add_options(optmanager)
      File "/Users/alex_gaynor/.virtualenvs/cryptography/site-packages/flake8_import_order/flake8_linter.py", line 32, in add_options
        parser.config_options.append("application-import-names")
    AttributeError: 'OptionManager' object has no attribute 'config_options'
    
    opened by alex 10
  • How to configure?

    How to configure?

    This is a silly question but I'm using vim's nvie/vim-flake8 which runs the currently available flake8 command + extensions whenever editing a file.

    I've created a ~/.config/flake8 file with the following content:

    [flake8]
    max-line-length = 120
    
    [flake8-import-order]
    import-order-style = edited
    

    But no matter what I set the import-order-style to, my vim editor keeps showing the same error for the imports.

    Specifically I have the following imports...

    from bf_metrics.rig import metrics
    from nsq import Message
    from structlog import get_logger
    

    It sees them all as Third-Party and expects a line break between them.

    Maybe the configuration is correct/working but I just don't have a style selected that's matching what I'm looking for 🤔

    I ideally want to find a style that is:

    <standard library modules - grouped together>
    
    <third-party modules - grouped together>
    
    <local modules - grouped together>
    

    Would this need to be a custom style?

    opened by Integralist 9
  • Unwanted I202 errors

    Unwanted I202 errors

    Hey there, we're using this plugin for linting imports at EDITED and have noticed unwanted I202s with recent versions.

    Our style would normally allow for both of the following cases:

    import X
    import Y
    import Z
    from X import *
    from X import A
    

    and

    import X
    import Y
    import Z
    
    from X import *
    from X import A
    

    with the difference here being the empty line between the import and from parts of an import section.

    It looks like the second case is no longer allowed under I202 though. We have several codebases that already follow that kind of style though, and are getting a fair amount of I202s that we're actually OK with.

    For the time being, we can pin to a version of the plugin that does not flag those up, so it's not a pressing issue. Do you however have any suggestions on how to proceed here to avoid remaining pinned to a version permanently? If there are any pointers on necessary changes to allow for a bit more flexibility around this, I could provide a PR.

    opened by pkatseas 9
  • Differentiate constants, classes and variables imports

    Differentiate constants, classes and variables imports

    Hi,

    ~~Would it be possible to add an option to make case insensitivity optional? I really find that taking case into account just makes more sense and helps separating constants, classes and variables imports. We could add an option like ignore-imports-case that would default to true. I don't really want to put this logic into my projects, so it would help if it were proposed as a built-in option.~~

    See https://github.com/PyCQA/flake8-import-order/issues/114#issuecomment-333365135

    Would a contribution in this direction be accepted?

    Thanks.

    opened by gilbsgilbs 9
  • _csv is identified as Third Party instead of Stdlib

    _csv is identified as Third Party instead of Stdlib

    Having this code:

    from _csv import _reader as csv_reader, _writer as csv_writer
    from logging import Logger
    

    Produces the following error messages when running flake8 with flake8-import-order:

    .\annotations.py:2:1: I100 Import statements are in the wrong order.
     'from logging import Logger' should be before 'from _csv import _reader, _writer' and in a different group.
    .\annotations.py:2:1: I201 Missing newline between import groups.
     'from logging import Logger' is identified as Stdlib and 'from _csv import _reader, _writer' is identified as Third Party.
    

    To my understanding, _csv is a stdlib module because csv is and _csv is it's "relative" written in C and flake8 has to recognize it as stdlib.

     flake8 --version
    3.8.3 (assertive: 1.2.1, flake8-bugbear: 20.1.4, flake8-comprehensions: 3.2.3,
    flake8_commas: 2.0.0, import-order: 0.18.1, mccabe: 0.6.1, pycodestyle: 2.6.0,
    pyflakes: 2.2.0) CPython 3.6.1 on Windows
    
    opened by sanyassh 8
  • Two Third Party imports in the same block throws I201 error

    Two Third Party imports in the same block throws I201 error

    When running flake8, with flake8-import-order installed, on this script:

    import numpy as np
    import pandas as pd
    
    
    def test():
        return pd.DataFrame(np.arange(10))
    

    I get this error:

    test.py:2:1: I201 Missing newline between import groups. 'import pandas' is identified as Third Party and 'import numpy' is identified as Third Party.

    Is this expected behavior?

    I'm on the latest packages from conda. flake8 --version shows 3.8.3 (import-order: 0.18.1, mccabe: 0.6.1, pycodestyle: 2.6.0, pyflakes: 2.2.0) CPython 3.7.7 on Linux.

    opened by MaxGhenis 4
  • Third-party after local import should be forbidden but isn't

    Third-party after local import should be forbidden but isn't

    When putting a third-party import after local import, pep8 style should reject it, but it doesn't:

    % cat test.py
    import os
    
    import third
    
    from .local import something
    
    import party
    % flake8 test.py --select=I2 --import-order-style=pep8 && echo no problem
    no problem
    
    opened by hydrargyrum 0
  • pycharm: case-sensitivity of module names in

    pycharm: case-sensitivity of module names in "from" imports

    Sorted by PyCharm with case-sensitivity:

    from smb.SMBConnection import SMBConnection
    from smb.smb_structs import OperationFailure, ProtocolError
    

    flake-8-import-order says:

    ./framework/os_access/smb_path.py:13:1: I100 Import statements are in the wrong order. 'from smb.smb_structs import OperationFailure, ProtocolError' should be before 'from smb.SMBConnection import SMBConnection'
    
    opened by sovetov 0
Owner
Python Code Quality Authority
Organization for code quality tools (and plugins) for the Python programming language
Python Code Quality Authority
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 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 integrates isort

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

Gil Forcada Codinachs 139 Nov 8, 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
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
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
OpenStack Hacking Style Checks. Mirror of code maintained at opendev.org.

Introduction hacking is a set of flake8 plugins that test and enforce the OpenStack StyleGuide Hacking pins its dependencies, as a new release of some

Mirrors of opendev.org/openstack 224 Jan 5, 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 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
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 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
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
A simple program which checks Python source files for errors

Pyflakes A simple program which checks Python source files for errors. Pyflakes analyzes programs and detects various errors. It works by parsing the

Python Code Quality Authority 1.2k Dec 30, 2022
A python documentation linter which checks that the docstring description matches the definition.

Darglint A functional docstring linter which checks whether a docstring's description matches the actual function/method implementation. Darglint expe

Terrence Reilly 463 Dec 31, 2022
Simple Python style checker in one Python file

pycodestyle (formerly called pep8) - Python style guide checker pycodestyle is a tool to check your Python code against some of the style conventions

Python Code Quality Authority 4.7k Jan 1, 2023