Skip to content

Commit

Permalink
fix typos #24
Browse files Browse the repository at this point in the history
  • Loading branch information
ebroecker committed Mar 9, 2021
1 parent fe776cb commit 163cbff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/pyreqif/rif.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def getSubElementValuesByTitle(xmlElement, tagNameArray=[]):

datatypesXmlElement = contentRoot.find('./' + ns + 'DATATYPES')
for child in datatypesXmlElement:
if child.tag == ns + "DATATYPE-DEFINITION-DOCUMENT" or child.tag == ns + 'DATATYPE-DEFINITION-STRING' or child.tag == ns + 'DATATYPE-DEFINITION-XHTML'\
if child.tag == ns + "DATATYPE-DEFINITION-DOCUMENT" or child.tag == ns + 'DATATYPE-DEFINITION-STRING' or child.tag == ns + 'DATATYPE-DEFINITION-XHTML'\
or child.tag == ns + 'DATATYPE-DEFINITION-BOOLEAN' or child.tag == ns + "DATATYPE-DEFINITION-INTEGER" or child.tag == ns + "DATATYPE-DEFINITION-DATE"\
or child.tag == ns + 'DATATYPE-DEFINITION-REAL':
datatypeProto = getSubElementValuesByTitle(child, ['EMBEDDED'])
Expand Down Expand Up @@ -227,7 +227,7 @@ def getSubElementValuesByTitle(xmlElement, tagNameArray=[]):
if attributesXml is not None:
for attribute in attributesXml:
if attribute.tag == ns +"ATTRIBUTE-DEFINITION-COMPLEX" or attribute.tag == ns +"ATTRIBUTE-DEFINITION-STRING" or attribute.tag == ns +"ATTRIBUTE-DEFINITION-XHTML"\
or attribute.tag == ns + "ATTRIBUTE-DEFINITION-BOOLEAN" or attribute.tag == ns + "ATTRIBUTE-DEFINITION-INTEGER" or attribute.tag == ns + "ATTRIBUTE-VALUE-DATE" or attribute.tag == ns + "ATTRIBUTE-DEFINITION-DATE" or attribute.tag == ns + "ATTRIBUTE-DEFINITION-REAL"::
or attribute.tag == ns + "ATTRIBUTE-DEFINITION-BOOLEAN" or attribute.tag == ns + "ATTRIBUTE-DEFINITION-INTEGER" or attribute.tag == ns + "ATTRIBUTE-VALUE-DATE" or attribute.tag == ns + "ATTRIBUTE-DEFINITION-DATE" or attribute.tag == ns + "ATTRIBUTE-DEFINITION-REAL":
specAttribType = getSubElementValuesByTitle(attribute)
tagWithoutNamespace = re.sub('{[\S]*}', '', attribute.tag)
specAttribType["type"] = mapReqifAttributeDefinition2Py(tagWithoutNamespace)
Expand Down
2 changes: 1 addition & 1 deletion xlsx2reqif.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def get_images(images, row, col):
last_hierarch_element = myHierarch
for row_nr in range(2, ws.max_row+1):
xls_req = dict(zip(columns, [ws.cell(row_nr, x).value for x in range(1, ws.max_column + 1)]))
if not "reqifId" in xls_req:
if "reqifId" not in xls_req:
xls_req["reqifId"] = pyreqif.create.creatUUID()
for col in columns:
# do images:
Expand Down

0 comments on commit 163cbff

Please sign in to comment.