Skip to content
Commit 798ffa16 authored by Derrick Petzold's avatar Derrick Petzold
Browse files

Custom section ordering and support.

Users can now define their own sections and ordering. For example

    import_heading_stdlib = Standard Library
    import_heading_thirdparty = Third Party
    import_heading_firstparty = First Party
    import_heading_django = Django
    import_heading_pandas = Pandas
    known_django = django
    known_pandas = pandas,numpy
    known_first_party = p24,p24.imports._VERSION
    sections = FUTURE,STDLIB,DJANGO,THIRDPARTY,PANDAS,FIRSTPARTY,LOCALFOLDER

would create two new sections with the specified known modules.

    # Standard Library
    import os
    import p24.imports._argparse as argparse
    import p24.imports._subprocess as subprocess
    import sys

    # Django
    from django.conf import settings
    from django.db import models

    # Third Party
    from bottle import Bottle, redirect, response, run

    # Pandas
    import numpy as np
    import pandas as pd

    # First Party
    import p24.imports._VERSION as VERSION
    import p24.shared.media_wiki_syntax as syntax
parent 1480a240
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment