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.

Source Distribution

flake8-import-order-tbm-1.3.0.tar.gz (3.5 kB view hashes)

Uploaded source

Built Distribution

Supported by

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