flake8-import-order style plugin for my (thebigmunch) taste.
Project description
flake8-import-order-tbm
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.
Source Distribution
Built Distribution
File details
Details for the file flake8-import-order-tbm-1.3.0.tar.gz
.
File metadata
- Download URL: flake8-import-order-tbm-1.3.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.0.0-1035-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ffc6126ef88c9b4142af7412a8acf31857e7c4b97fba41695bffd12820291f3 |
|
MD5 | 9a844c86644702f45fcf4614c6058a4f |
|
BLAKE2b-256 | e1870061adcada3dd75d18eddc0890b5fb7515f6d33ed8217a3972b2a66b5c91 |
File details
Details for the file flake8_import_order_tbm-1.3.0-py3-none-any.whl
.
File metadata
- Download URL: flake8_import_order_tbm-1.3.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.0.0-1035-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1b63f9ac001ecaaca716f23b538204556770b18d4d8b3dce154fb4dd362812f |
|
MD5 | f28a920a5dc83c866c6cdc5626c1990e |
|
BLAKE2b-256 | 411bffd1ffee739b21104c2766f310d88da050da35f2b5e2a4c212d9b5d379bb |