Bim remove py2 compatibility code (#17229)
* BIM: remove py2 compatibility code * remove unused six from conda environments
This commit is contained in:
committed by
GitHub
parent
139cd7866e
commit
7d52617bfd
@@ -92,7 +92,6 @@ dependencies:
|
||||
- python==3.12.*
|
||||
- pyyaml
|
||||
- qt6-main
|
||||
- six
|
||||
- smesh
|
||||
- swig
|
||||
- vtk==9.2.6
|
||||
|
||||
@@ -92,7 +92,6 @@ dependencies:
|
||||
- python==3.11.*
|
||||
- pyyaml
|
||||
- qt-main
|
||||
- six
|
||||
- smesh
|
||||
- swig
|
||||
- vtk==9.2.6
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user