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:
parent
1ff8815a25
commit
64c51a554c
@ -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:
|
||||
|
@ -11,6 +11,7 @@ Machines
|
||||
|
||||
.. autoclass:: automaton.machines.FiniteMachine
|
||||
:members:
|
||||
:special-members: __iter__, __contains__
|
||||
|
||||
.. autoclass:: automaton.machines.HierarchicalFiniteMachine
|
||||
:members:
|
||||
|
Loading…
Reference in New Issue
Block a user