Skip to content

Commit

Permalink
Merge pull request #232 from Shashank-Pandey-ML/py3.11-support
Browse files Browse the repository at this point in the history
Support for Python3.11
  • Loading branch information
vvb authored Oct 26, 2023
2 parents e0f22ac + ae135ee commit ac4de06
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion imcsdk/imccoreutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import os
import re
import logging
import sys

from . import imcgenutils
from . import mometa
Expand Down Expand Up @@ -76,7 +77,12 @@ def get_imc_obj(class_id, elem, mo_obj=None):
return imcmethod.ExternalMethod(class_id)
elif class_id in MO_CLASS_ID:
mo_class = load_class(class_id)
mo_class_params = inspect.getargspec(mo_class.__init__)[0][2:]
if sys.version_info > (3, 0):
# Python 3 code in this block
mo_class_params = inspect.getfullargspec(mo_class.__init__)[0][2:]
else:
# Python 2 code in this block
mo_class_params = inspect.getargspec(mo_class.__init__)[0][2:]
mo_class_param_dict = {}
for param in mo_class_params:
mo_class_param_dict[param] = None
Expand Down

0 comments on commit ac4de06

Please sign in to comment.