• Derrick Petzold's avatar
    Custom section ordering and support. · 798ffa16
    Derrick Petzold 创作于
    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
    798ffa16