Skip to main content

flake8-import-order style plugin for my (thebigmunch) taste.

Project description


GitHub CI

flake8-import-order-tbm is a style for flake8-import-order.


  • Package, module, and imported names are naturally sorted using natsort.
  • Standard library import section precedes 3rd-party import section precedes local import section.
  • Import statements precede from import statements.
  • UPPERCASE precedes Capitalized precedes lowercase.
  • Fewer levels in a local relative import precede greater levels.

A basic example:

import os
import sys
from os import path

import attr
import requests
from attr import attrib, attrs

import LocalPackage
import localpackage
from localpackage import name
from . import name1, name2, name10
from .module import name3
from ..module import name4


Install flake8-import-order-tbm using pip install flake8-import-order-tbm.

When running flake8, do one of the following:

  • Add the --import-order-style=tbm option to the command.

  • Add this to your flake8 config:

     import-order-style = tbm

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flake8-import-order-tbm, version 1.3.0
Filename, size File type Python version Upload date Hashes
Filename, size flake8_import_order_tbm-1.3.0-py3-none-any.whl (4.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size flake8-import-order-tbm-1.3.0.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page