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
|
@property
|
||||||
def default_start_state(self):
|
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.
|
"""Sets the *default* start state that the machine should use.
|
||||||
|
|
||||||
NOTE(harlowja): this will be used by ``initialize`` but only if that
|
NOTE(harlowja): this will be used by ``initialize`` but only if that
|
||||||
function is not given its own ``start_state`` that overrides this
|
function is not given its own ``start_state`` that overrides this
|
||||||
default.
|
default.
|
||||||
"""
|
"""
|
||||||
|
return self._default_start_state
|
||||||
|
|
||||||
|
@default_start_state.setter
|
||||||
|
def default_start_state(self, state):
|
||||||
if self.frozen:
|
if self.frozen:
|
||||||
raise excp.FrozenMachine()
|
raise excp.FrozenMachine()
|
||||||
if state not in self._states:
|
if state not in self._states:
|
||||||
|
@ -11,6 +11,7 @@ Machines
|
|||||||
|
|
||||||
.. autoclass:: automaton.machines.FiniteMachine
|
.. autoclass:: automaton.machines.FiniteMachine
|
||||||
:members:
|
:members:
|
||||||
|
:special-members: __iter__, __contains__
|
||||||
|
|
||||||
.. autoclass:: automaton.machines.HierarchicalFiniteMachine
|
.. autoclass:: automaton.machines.HierarchicalFiniteMachine
|
||||||
:members:
|
:members:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user