Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

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

Project description

flake8-import-order-tbm

PyPI
Travis

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

Styling

  • 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

Usage

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.1.0
Filename, size File type Python version Upload date Hashes
Filename, size flake8_import_order_tbm-1.1.0-py3-none-any.whl (4.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size flake8-import-order-tbm-1.1.0.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page