fix import
This commit is contained in:
@@ -3,18 +3,16 @@
|
||||
# Copyright (c) 2007 Tim Lauridsen <tla@rasmil.dk>
|
||||
# All Rights Reserved. See LICENSE-PSF & LICENSE for details.
|
||||
|
||||
from .ini import INIConfig, change_comment_syntax
|
||||
from .compat import ConfigParser, RawConfigParser, SafeConfigParser
|
||||
from .config import BasicConfig, ConfigNamespace
|
||||
from .compat import RawConfigParser, ConfigParser, SafeConfigParser
|
||||
from .configparser import (DEFAULTSECT, MAX_INTERPOLATION_DEPTH,
|
||||
DuplicateSectionError, InterpolationDepthError,
|
||||
InterpolationMissingOptionError,
|
||||
InterpolationSyntaxError, NoOptionError,
|
||||
NoSectionError)
|
||||
from .ini import INIConfig, change_comment_syntax
|
||||
from .utils import tidy
|
||||
|
||||
from .configparser import DuplicateSectionError, \
|
||||
NoSectionError, NoOptionError, \
|
||||
InterpolationMissingOptionError, \
|
||||
InterpolationDepthError, \
|
||||
InterpolationSyntaxError, \
|
||||
DEFAULTSECT, MAX_INTERPOLATION_DEPTH
|
||||
|
||||
__all__ = [
|
||||
'BasicConfig', 'ConfigNamespace',
|
||||
'INIConfig', 'tidy', 'change_comment_syntax',
|
||||
|
||||
@@ -12,21 +12,18 @@ The underlying INIConfig object can be accessed as cfg.data
|
||||
"""
|
||||
|
||||
import re
|
||||
from .configparser import DuplicateSectionError, \
|
||||
NoSectionError, NoOptionError, \
|
||||
InterpolationMissingOptionError, \
|
||||
InterpolationDepthError, \
|
||||
InterpolationSyntaxError, \
|
||||
DEFAULTSECT, MAX_INTERPOLATION_DEPTH
|
||||
|
||||
# These are imported only for compatiability.
|
||||
# The code below does not reference them directly.
|
||||
from .configparser import Error, InterpolationError, \
|
||||
MissingSectionHeaderError, ParsingError
|
||||
|
||||
import six
|
||||
|
||||
from . import ini
|
||||
# These are imported only for compatiability.
|
||||
# The code below does not reference them directly.
|
||||
from .configparser import (DEFAULTSECT, MAX_INTERPOLATION_DEPTH,
|
||||
DuplicateSectionError, Error,
|
||||
InterpolationDepthError, InterpolationError,
|
||||
InterpolationMissingOptionError,
|
||||
InterpolationSyntaxError, MissingSectionHeaderError,
|
||||
NoOptionError, NoSectionError, ParsingError)
|
||||
|
||||
|
||||
class RawConfigParser(object):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
try:
|
||||
from ConfigParser import *
|
||||
# not all objects get imported with __all__
|
||||
from ConfigParser import *
|
||||
from ConfigParser import Error, InterpolationMissingOptionError
|
||||
except ImportError:
|
||||
from configparser import *
|
||||
|
||||
@@ -42,11 +42,11 @@ Example:
|
||||
# Backward-compatiable with ConfigParser
|
||||
|
||||
import re
|
||||
from .configparser import DEFAULTSECT, ParsingError, MissingSectionHeaderError
|
||||
|
||||
import six
|
||||
|
||||
from . import config
|
||||
from .configparser import DEFAULTSECT, MissingSectionHeaderError, ParsingError
|
||||
|
||||
|
||||
class LineType(object):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from . import compat
|
||||
from .ini import LineContainer, EmptyLine
|
||||
from .ini import EmptyLine, LineContainer
|
||||
|
||||
|
||||
def tidy(cfg):
|
||||
|
||||
Reference in New Issue
Block a user