Skip to content

Commit

Permalink
Add __all__ to all modules.
Browse files Browse the repository at this point in the history
The value replicates what is currently documented by Sphinx, which turns out to be everything. It's not clear though if that's all really meant to be consumed publically.

Fixes #38
  • Loading branch information
jamadden committed Sep 26, 2018
1 parent 722d905 commit 3d4272f
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 2 deletions.
31 changes: 30 additions & 1 deletion src/zope/configuration/config.py
Expand Up @@ -37,7 +37,36 @@
from zope.configuration._compat import string_types
from zope.configuration._compat import text_type


__all__ = [
'ConfigurationContext',
'ConfigurationAdapterRegistry',
'ConfigurationMachine',
'ConfigurationExecutionError',
'IStackItem',
'SimpleStackItem',
'RootStackItem',
'GroupingStackItem',
'ComplexStackItem',
'GroupingContextDecorator',
'DirectiveSchema',
'IDirectivesInfo',
'IDirectivesContext',
'DirectivesHandler',
'IDirectiveInfo',
'IFullInfo',
'IStandaloneDirectiveInfo',
'defineSimpleDirective',
'defineGroupingDirective',
'IComplexDirectiveContext',
'ComplexDirectiveDefinition',
'subdirective',
'IProvidesDirectiveInfo',
'provides',
'toargs',
'expand_action',
'resolveConflicts',
'ConfigurationConflictError',
]

zopens = 'http://namespaces.zope.org/zope'
metans = 'http://namespaces.zope.org/meta'
Expand Down
7 changes: 6 additions & 1 deletion src/zope/configuration/docutils.py
Expand Up @@ -17,6 +17,11 @@

import re

__all__ = [
'wrap',
'makeDocStructures',
]

para_sep = re.compile('\n{2,}')
whitespace = re.compile('[ \t\n\r]+')

Expand All @@ -27,7 +32,7 @@ def wrap(text, width=78, indent=0):

new_paras = []
for par in paras:
words= filter(None, whitespace.split(par))
words = filter(None, whitespace.split(par))

lines = []
line = []
Expand Down
4 changes: 4 additions & 0 deletions src/zope/configuration/exceptions.py
Expand Up @@ -14,6 +14,10 @@
"""Standard configuration errors
"""

__all__ = [
'ConfigurationError',
]

class ConfigurationError(Exception):
"""There was an error in a configuration
"""
10 changes: 10 additions & 0 deletions src/zope/configuration/fields.py
Expand Up @@ -32,6 +32,16 @@
from zope.configuration.exceptions import ConfigurationError
from zope.configuration.interfaces import InvalidToken

__all__ = [
'PythonIdentifier',
'GlobalObject',
'GlobalInterface',
'Tokens',
'Path',
'Bool',
'MessageID',
]


class PythonIdentifier(schema_PythonIdentifier):
"""
Expand Down
5 changes: 5 additions & 0 deletions src/zope/configuration/interfaces.py
Expand Up @@ -17,6 +17,11 @@
from zope.schema import BytesLine
from zope.schema.interfaces import ValidationError

__all__ = [
'InvalidToken',
'IConfigurationContext',
'IGroupingContext',
]

class InvalidToken(ValidationError):
"""Invaid token in list."""
Expand Down
6 changes: 6 additions & 0 deletions src/zope/configuration/name.py
Expand Up @@ -17,6 +17,12 @@
import os
from types import ModuleType

__all__ = [
'resolve',
'getNormalizedName',
'path',
]

def resolve(name, package='zopeproducts', _silly=('__doc__',), _globals={}):
name = name.strip()

Expand Down
19 changes: 19 additions & 0 deletions src/zope/configuration/xmlconfig.py
Expand Up @@ -45,6 +45,25 @@
from zope.configuration.zopeconfigure import ZopeConfigure
from zope.configuration._compat import reraise

__all__ = [
'ZopeXMLConfigurationError',
'ZopeSAXParseException',
'ParserInfo',
'ConfigurationHandler',
'processxmlfile',
'openInOrPlain',
'IInclude',
'include',
'exclude',
'includeOverrides',
'registerCommonDirectives',
'file',
'string',
'XMLConfig',
'xmlconfig',
'testxmlconfig',
]

logger = logging.getLogger("config")

ZCML_NAMESPACE = "http://namespaces.zope.org/zcml"
Expand Down
4 changes: 4 additions & 0 deletions src/zope/configuration/zopeconfigure.py
Expand Up @@ -108,6 +108,10 @@
from zope.configuration.config import GroupingContextDecorator
from zope.configuration.fields import GlobalObject

__all__ = [
'IZopeConfigure',
'ZopeConfigure',
]

class IZopeConfigure(Interface):
"""The ``zope:configure`` Directive
Expand Down

0 comments on commit 3d4272f

Please sign in to comment.