Skip to content

Commit

Permalink
Expose martian.ignore through our API.
Browse files Browse the repository at this point in the history
  • Loading branch information
thefunny42 committed May 9, 2018
1 parent 9a93a8e commit 09744b8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 1 addition & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Changes
3.0.3 (unreleased)
------------------

- Nothing changed yet.

- Expose ``martian.ignore`` through our API.

3.0.2 (2018-01-17)
------------------
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()


long_description = (
read('README.rst')
+ '\n' +
Expand Down Expand Up @@ -46,7 +47,7 @@ def read(*rnames):
include_package_data=True,
zip_safe=False,
install_requires=['setuptools',
'martian >= 0.14',
'martian >= 1.2',
'zope.component',
'zope.configuration',
'zope.interface',
Expand Down
2 changes: 1 addition & 1 deletion src/grokcore/component/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from zope.interface import implementsOnly, classProvides

from martian import baseclass
from martian import baseclass, ignore
from martian.error import GrokError, GrokImportError
from martian import ClassGrokker, InstanceGrokker, GlobalGrokker

Expand Down
4 changes: 4 additions & 0 deletions src/grokcore/component/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def baseclass():
it can still serve as a context.
"""

def ignore(name):
"""Prevent name to be grokked in the current module.
"""

def implements(*interfaces):
"""Declare that a class implements the given interfaces."""

Expand Down

0 comments on commit 09744b8

Please sign in to comment.