Skip to content

Commit

Permalink
Merge pull request #55 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
parag-may4 authored Nov 28, 2023
2 parents 4d0165d + 292857e commit 2c91436
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ucscsdk/ucsccoreutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import os
import re
import logging
import sys

from . import ucscgenutils
from . import mometa
Expand Down Expand Up @@ -54,7 +55,12 @@ def get_ucsc_obj(class_id, elem, mo_obj=None):
return ucscmethod.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 2c91436

Please sign in to comment.