Skip to content

Commit 5cddad2

Browse files
committed
Fix codespell warnings
1 parent dcf11f7 commit 5cddad2

File tree

2 files changed

+17
-21
lines changed

2 files changed

+17
-21
lines changed

OMPython/OMCSession.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ def sendExpression(self, command, parsed=True):
582582
logger.warning("Result of 'getMessagesStringInternal()' cannot be parsed - set parsed to False!")
583583
parsed = False
584584
else:
585-
# allways check for error
585+
# always check for error
586586
self._omc.send_string('getMessagesStringInternal()', flags=zmq.NOBLOCK)
587587
error_raw = self._omc.recv_string()
588588
# run error handling only if there is something to check

OMPython/OMParser.py

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -468,15 +468,13 @@ def make_elements(strings):
468468
skip_start = index + 1
469469
if strings[skip_start] == "{":
470470
skip_brace += 1
471-
indx = skip_start
472-
while indx < len(strings):
473-
char = strings[indx]
471+
for i in range(skip_start, len(strings)):
472+
char = strings[i]
474473
if char == "}":
475474
skip_brace -= 1
476475
if skip_brace == 0:
477-
index = indx + 1
476+
index = i + 1
478477
break
479-
indx += 1
480478

481479
index += 1
482480

@@ -523,21 +521,21 @@ def make_elements(strings):
523521

524522

525523
def check_for_next_string(next_string):
526-
anchorr = 0
527-
positionn = 0
528-
stopp = 0
524+
anchor = 0
525+
position = 0
526+
stop = 0
529527

530528
# remove braces & keep only the SET's values
531-
while positionn < len(next_string):
532-
check_str = next_string[positionn]
529+
while position < len(next_string):
530+
check_str = next_string[position]
533531
if check_str == "{":
534-
anchorr = positionn
532+
anchor = position
535533
elif check_str == "}":
536-
stopp = positionn
537-
delStr = next_string[anchorr:stopp + 1]
534+
stop = position
535+
delStr = next_string[anchor:stop + 1]
538536
next_string = next_string.replace(delStr, '')
539-
positionn = -1
540-
positionn += 1
537+
position = -1
538+
position += 1
541539

542540
if isinstance(next_string, str):
543541
if len(next_string) == 0:
@@ -616,16 +614,14 @@ def skip_all_inner_sets(position):
616614
if brace_count == 0:
617615
break
618616
elif s == "=" and string[position + 1] == "{":
619-
indx = position + 2
620617
skip_brace = 1
621-
while indx < end_of_main_set:
622-
char = string[indx]
618+
for i in range(position + 2, end_of_main_set):
619+
char = string[i]
623620
if char == "}":
624621
skip_brace -= 1
625622
if skip_brace == 0:
626-
position = indx + 1
623+
position = i + 1
627624
break
628-
indx += 1
629625
position += 1
630626
position += 1
631627
elif char == "{" and string[position + 1] == "{":

0 commit comments

Comments
 (0)