From 8e1a6258d830b434da4f2fd89b66164f8576ba18 Mon Sep 17 00:00:00 2001 From: Puneeth Chaganti Date: Sun, 3 Dec 2023 00:25:05 +0530 Subject: [PATCH] Change standart to standard --- asciinema_automation/cli.py | 8 ++++---- asciinema_automation/instruction.py | 12 ++++++------ asciinema_automation/script.py | 4 ++-- examples/hello_world.sh | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/asciinema_automation/cli.py b/asciinema_automation/cli.py index afdd4b1..bc0bd14 100644 --- a/asciinema_automation/cli.py +++ b/asciinema_automation/cli.py @@ -32,10 +32,10 @@ def cli(argv=None): ) parser.add_argument( "-sd", - "--standart-deviation", + "--standard-deviation", type=int, default=60, - help="standart deviation for gaussian used to generate time between key strokes", + help="standard deviation for gaussian used to generate time between key strokes", ) parser.add_argument( "-t", @@ -70,7 +70,7 @@ def cli(argv=None): delay = args.delay wait = args.wait asciinema_arguments = args.asciinema_arguments - standart_deviation = args.standart_deviation + standard_deviation = args.standard_deviation loglevel = args.loglevel timeout = args.timeout @@ -87,7 +87,7 @@ def cli(argv=None): asciinema_arguments, wait, delay, - standart_deviation, + standard_deviation, timeout, ) diff --git a/asciinema_automation/instruction.py b/asciinema_automation/instruction.py index c957837..36b0abf 100644 --- a/asciinema_automation/instruction.py +++ b/asciinema_automation/instruction.py @@ -62,18 +62,18 @@ def run(self, script): for send_character, receive_character in zip( self.send_value, self.receive_value ): - if script.standart_deviation is None: + if script.standard_deviation is None: time.sleep(script.delay) else: - time.sleep(abs(random.gauss(script.delay, script.standart_deviation))) + time.sleep(abs(random.gauss(script.delay, script.standard_deviation))) script.process.send(str(send_character)) script.process.expect(str(receive_character)) # End instruction - if script.standart_deviation is None: + if script.standard_deviation is None: time.sleep(script.delay) else: - time.sleep(abs(random.gauss(script.delay, script.standart_deviation))) + time.sleep(abs(random.gauss(script.delay, script.standard_deviation))) class SendCharacterInstruction(Instruction): @@ -129,10 +129,10 @@ def run(self, script): super().run(script) logger.debug("Send %s arrow %i times", self.send, self.num) for _ in range(self.num): - if script.standart_deviation is None: + if script.standard_deviation is None: time.sleep(script.delay) else: - time.sleep(abs(random.gauss(script.delay, script.standart_deviation))) + time.sleep(abs(random.gauss(script.delay, script.standard_deviation))) if self.enter: script.process.sendline(self.mapping[self.send]) else: diff --git a/asciinema_automation/script.py b/asciinema_automation/script.py index 7e21c98..9b8f55e 100644 --- a/asciinema_automation/script.py +++ b/asciinema_automation/script.py @@ -49,7 +49,7 @@ def __init__( asciinema_arguments: str, wait, delay, - standart_deviation, + standard_deviation, timeout, ): # Set members from arguments @@ -58,7 +58,7 @@ def __init__( self.asciinema_arguments = asciinema_arguments self.delay = delay / 1000.0 self.wait = wait / 1000.0 - self.standart_deviation = standart_deviation / 1000.0 + self.standard_deviation = standard_deviation / 1000.0 # Default values for data members self.expected = "\n" diff --git a/examples/hello_world.sh b/examples/hello_world.sh index e68b949..179f5e6 100755 --- a/examples/hello_world.sh +++ b/examples/hello_world.sh @@ -1,4 +1,4 @@ -# delay instructions change the time (or mean of gaussian if standart deviation is given) between key strokes +# delay instructions change the time (or mean of gaussian if standard deviation is given) between key strokes #$ delay 50 echo "Hello world"