Skip to content

Commit c39615a

Browse files
committed
Fix codespell warnings
1 parent 324f168 commit c39615a

File tree

4 files changed

+19
-23
lines changed

4 files changed

+19
-23
lines changed

OMPython/OMCSession.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ def sendExpression(self, command, parsed=True):
563563
logger.warning("Result of 'getMessagesStringInternal()' cannot be parsed - set parsed to False!")
564564
parsed = False
565565
else:
566-
# allways check for error
566+
# always check for error
567567
self._omc.send_string('getMessagesStringInternal()', flags=zmq.NOBLOCK)
568568
error_raw = self._omc.recv_string()
569569
# 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
@@ -467,15 +467,13 @@ def make_elements(strings):
467467
skip_start = index + 1
468468
if strings[skip_start] == "{":
469469
skip_brace += 1
470-
indx = skip_start
471-
while indx < len(strings):
472-
char = strings[indx]
470+
for i in range(skip_start, len(strings)):
471+
char = strings[i]
473472
if char == "}":
474473
skip_brace -= 1
475474
if skip_brace == 0:
476-
index = indx + 1
475+
index = i + 1
477476
break
478-
indx += 1
479477

480478
index += 1
481479

@@ -522,21 +520,21 @@ def make_elements(strings):
522520

523521

524522
def check_for_next_string(next_string):
525-
anchorr = 0
526-
positionn = 0
527-
stopp = 0
523+
anchor = 0
524+
position = 0
525+
stop = 0
528526

529527
# remove braces & keep only the SET's values
530-
while positionn < len(next_string):
531-
check_str = next_string[positionn]
528+
while position < len(next_string):
529+
check_str = next_string[position]
532530
if check_str == "{":
533-
anchorr = positionn
531+
anchor = position
534532
elif check_str == "}":
535-
stopp = positionn
536-
delStr = next_string[anchorr:stopp + 1]
533+
stop = position
534+
delStr = next_string[anchor:stop + 1]
537535
next_string = next_string.replace(delStr, '')
538-
positionn = -1
539-
positionn += 1
536+
position = -1
537+
position += 1
540538

541539
if isinstance(next_string, str):
542540
if len(next_string) == 0:
@@ -615,16 +613,14 @@ def skip_all_inner_sets(position):
615613
if brace_count == 0:
616614
break
617615
elif s == "=" and string[position + 1] == "{":
618-
indx = position + 2
619616
skip_brace = 1
620-
while indx < end_of_main_set:
621-
char = string[indx]
617+
for i in range(position + 2, end_of_main_set):
618+
char = string[i]
622619
if char == "}":
623620
skip_brace -= 1
624621
if skip_brace == 0:
625-
position = indx + 1
622+
position = i + 1
626623
break
627-
indx += 1
628624
position += 1
629625
position += 1
630626
elif char == "{" and string[position + 1] == "{":

tests/test_ArrayDimension.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
# do not change the prefix class name, the class name should have prefix "Test"
8-
# according to the documenation of pytest
8+
# according to the documentation of pytest
99
class Test_ArrayDimension:
1010
def test_ArrayDimension(self):
1111
omc = OMPython.OMCSessionZMQ()

tests/test_FMIRegression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
# do not change the prefix class name, the class name should have prefix "Test"
8-
# according to the documenation of pytest
8+
# according to the documentation of pytest
99
class Test_FMIRegression:
1010

1111
def buildModelFMU(self, modelName):

0 commit comments

Comments
 (0)