Skip to content

Commit

Permalink
RTD is still complaining about __doc__ for activations
Browse files Browse the repository at this point in the history
  • Loading branch information
bartvm committed Jan 17, 2015
1 parent fc5f472 commit 53ad992
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blocks/bricks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,8 @@ def _activation_factory(name, activation):
class ActivationDocumentation(type):
def __new__(cls, name, bases, classdict):
classdict['__doc__'] = classdict['__doc__'].format(name.lower())
classdict['apply'].__doc__ = \
classdict['apply'].__doc__.format(name.lower())
return type.__new__(cls, name, bases, classdict)

@add_metaclass(ActivationDocumentation)
Expand All @@ -1051,8 +1053,6 @@ def apply(self, input_):
output = activation(input_)
return output
Activation.__name__ = name
Activation.apply.__doc__ = \
Activation.apply.__doc__.format(name.lower())
return Activation

Identity = _activation_factory('Identity', lambda x: x)
Expand Down

0 comments on commit 53ad992

Please sign in to comment.