Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-usielski committed Oct 22, 2024
1 parent c9864a4 commit fef1e5f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
8 changes: 4 additions & 4 deletions moler/device/junipergeneric3.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def __init__(self, sm_params, name=None, io_connection=None, io_type=None, varia
sm_params = sm_params.copy()
initial_state = initial_state if initial_state is not None else JuniperGeneric3.cli
super(JuniperGeneric3, self).__init__(sm_params=sm_params, name=name, io_connection=io_connection,
io_type=io_type, variant=variant,
io_constructor_kwargs=io_constructor_kwargs,
initial_state=initial_state, lazy_cmds_events=lazy_cmds_events)
io_type=io_type, variant=variant,
io_constructor_kwargs=io_constructor_kwargs,
initial_state=initial_state, lazy_cmds_events=lazy_cmds_events)
self.logger = logging.getLogger('moler.juniper')

@mark_to_call_base_class_method_with_same_name
Expand Down Expand Up @@ -228,7 +228,7 @@ def _get_packages_for_state(self, state, observer):
elif state == JuniperGeneric3.configure:
available = {
JuniperGeneric3.cmds: ['moler.events.unix', 'moler.cmd.juniper.configure',
'moler.cmd.juniper_ex.configure'],
'moler.cmd.juniper_ex.configure'],
JuniperGeneric3.events: ['moler.events.unix', 'moler.events.juniper', 'moler.events.juniper_ex']}

if available:
Expand Down
11 changes: 4 additions & 7 deletions moler/device/proxy_pc3.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,18 @@ def __init__(self, sm_params, name=None, io_connection=None, io_type=None, varia
initial_state = initial_state if initial_state is not None else ProxyPc3.unix_local
self._use_proxy_pc = self._is_proxy_pc_in_sm_params(sm_params, ProxyPc3.proxy_pc)
super(ProxyPc3, self).__init__(name=name, io_connection=io_connection,
io_type=io_type, variant=variant,
io_constructor_kwargs=io_constructor_kwargs,
sm_params=sm_params, initial_state=initial_state,
lazy_cmds_events=lazy_cmds_events)
io_type=io_type, variant=variant,
io_constructor_kwargs=io_constructor_kwargs,
sm_params=sm_params, initial_state=initial_state,
lazy_cmds_events=lazy_cmds_events)
self._log(level=logging.WARNING, msg="Experimental device. May be deleted at any moment. Please don't use it in your scripts.")


def _prepare_sm_data(self, sm_params):
self._prepare_dicts_for_sm(sm_params=sm_params)

self._prepare_newline_chars()
self._send_transitions_to_sm(self._stored_transitions)


def _prepare_transitions(self):
"""
Prepare transitions to change states.
Expand Down Expand Up @@ -99,7 +97,6 @@ def _prepare_dicts_for_sm(self, sm_params):
self._validate_device_configuration()
self._prepare_state_prompts()


def _overwrite_prompts(self) -> None:
"""
Method to overwrite prompts in commands.
Expand Down

0 comments on commit fef1e5f

Please sign in to comment.