Skip to content

Commit

Permalink
Merge pull request #39 from zopefoundation/issue38
Browse files Browse the repository at this point in the history
Add __all__ to all modules.
  • Loading branch information
jamadden committed Sep 27, 2018
2 parents 4083b7b + a02ed4e commit 95b9d80
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Expand Up @@ -8,6 +8,10 @@ Changes
multiple leading dots. See `issue 41
<https://github.com/zopefoundation/zope.configuration/issues/41>`_.

- Add ``__all__`` to all modules listing the documented members of
the module. Note that this is currently a broad list and may be
reduced in the future.


4.2.1 (2018-09-26)
------------------
Expand Down
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 95b9d80

Please sign in to comment.