Bim remove py2 compatibility code (#17229)

* BIM: remove py2 compatibility code

* remove unused six from conda environments
This commit is contained in:
Adrián Insaurralde Avalos
2024-10-14 13:25:14 -03:00
committed by GitHub
parent d4173be130
commit facd8ca6e0
3 changed files with 3 additions and 15 deletions

View File

@@ -92,7 +92,6 @@ dependencies:
- python==3.12.*
- pyyaml
- qt6-main
- six
- smesh
- swig
- vtk==9.2.6

View File

@@ -92,7 +92,6 @@ dependencies:
- python==3.11.*
- pyyaml
- qt-main
- six
- smesh
- swig
- vtk==9.2.6

View File

@@ -566,20 +566,10 @@ class BIM_IfcExplorer:
self.addAttributes(prop.id(), subitem)
def tostr(self, text):
"resolves py2/py3 string representation hassles"
import six
if six.PY2:
if isinstance(text, unicode):
return text.encode("utf8")
else:
return str(text)
if isinstance(text, str):
return text
else:
if isinstance(text, str):
return text
else:
return str(text)
return str(text)
def onSelectTree(self, item, previous):
"displays attributes and properties of a tree item"