Skip to content

Commit

Permalink
Union
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-usielski committed Jan 24, 2024
1 parent 3f2466e commit 0ede39c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions moler/cmd/commandtextualgeneric.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from moler.abstract_moler_connection import AbstractMolerConnection
from moler.runner import ConnectionObserverRunner
from threading import Lock
from typing import Optional, Pattern
from typing import Optional, Pattern, Union


r_default_prompt: str = r'^[^<]*[$%#>~]\s*$' # When user provides no prompt
Expand All @@ -33,7 +33,7 @@ class CommandTextualGeneric(Command):
_re_default_prompt = re.compile(r_default_prompt) # When user provides no prompt
_default_newline_chars = ("\n", "\r") # New line chars on device, not system with script!

def __init__(self, connection: Optional[AbstractMolerConnection], prompt: Optional[str | Pattern] = None, newline_chars: Optional[list | tuple] = None, runner: Optional[ConnectionObserverRunner] = None):
def __init__(self, connection: Optional[AbstractMolerConnection], prompt: Optional[Union[str, Pattern]] = None, newline_chars: Optional[Union[list, tuple]] = None, runner: Optional[ConnectionObserverRunner] = None):
"""
Base class for textual commands.
Expand Down

0 comments on commit 0ede39c

Please sign in to comment.