Ensure machine special method(s) include in generated docs

Without explicitly mentioning that it should have its docs
generated sphinx won't generate docs for it, so ensure that
we list __iter__ and __contains__ so that it does get
generated docs.

Also fixes 'default_start_state' docs which were not showing
up since they were on the setter method vs the getter method.

Change-Id: I83d02a3604678d16b16f6da5384ff10543af850f
This commit is contained in:
Joshua Harlow 2016-01-06 21:03:35 -08:00 committed by Joshua Harlow
parent 1ff8815a25
commit 64c51a554c
2 changed files with 5 additions and 4 deletions

View File

@ -113,16 +113,16 @@ class FiniteMachine(object):
@property
def default_start_state(self):
return self._default_start_state
@default_start_state.setter
def default_start_state(self, state):
"""Sets the *default* start state that the machine should use.
NOTE(harlowja): this will be used by ``initialize`` but only if that
function is not given its own ``start_state`` that overrides this
default.
"""
return self._default_start_state
@default_start_state.setter
def default_start_state(self, state):
if self.frozen:
raise excp.FrozenMachine()
if state not in self._states:

View File

@ -11,6 +11,7 @@ Machines
.. autoclass:: automaton.machines.FiniteMachine
:members:
:special-members: __iter__, __contains__
.. autoclass:: automaton.machines.HierarchicalFiniteMachine
:members: