Skip to content

Commit

Permalink
Merge branch 'main' into feat/RenderableVNC_use_web_component
Browse files Browse the repository at this point in the history
  • Loading branch information
mariostieriansys authored Nov 16, 2023
2 parents c841fc3 + 8cf3805 commit c9cb883
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ dependencies = [
"requests>=2.28.2",
"docker>=6.1.0",
"urllib3<2",
"typing>=3.7.4.3",
"typing-extensions>=4.5.0",
"numpy>=1.21.0",
"Pillow>=9.3.0"
]
Expand Down
3 changes: 1 addition & 2 deletions src/ansys/pyensight/core/listobj.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
"""
from collections.abc import Iterable
import fnmatch
from typing import Any, List, Optional, TypeVar, no_type_check, overload
from typing import Any, List, Optional, SupportsIndex, TypeVar, no_type_check, overload

from ansys.pyensight.core.ensobj import ENSOBJ
from typing_extensions import SupportsIndex

T = TypeVar("T")

Expand Down
14 changes: 12 additions & 2 deletions src/ansys/pyensight/core/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -1510,6 +1510,13 @@ def _convert_ctor(self, s: str) -> str:
tail = s.find(", cached:yes")
if tail == -1:
break
# Subtype (PartType:, AnnotType:, ToolType:)
subtype = None
for name in ("PartType:", "AnnotType:", "ToolType:"):
location = s.find(name)
if (location != -1) and (location > id):
subtype = int(s[location + len(name) :].split(",")[0])
break
# isolate the block to replace
prefix = s[:start]
suffix = s[tail + tail_len :]
Expand All @@ -1526,8 +1533,11 @@ def _convert_ctor(self, s: str) -> str:
else:
subclass_info = ""
if attr_id is not None:
# if a "subclass" case and no subclass attrid value, ask for it...
if classname_lookup is not None:
if subtype is not None:
# the 2024 R2 interface includes the subtype
subclass_info = f",attr_id={attr_id}, attr_value={subtype}"
elif classname_lookup is not None:
# if a "subclass" case and no subclass attrid value, ask for it...
remote_name = self.remote_obj(objid)
cmd = f"{remote_name}.getattr({attr_id})"
attr_value = self.cmd(cmd)
Expand Down

0 comments on commit c9cb883

Please sign in to comment.