Skip to content

Commit

Permalink
Compatibility with 3.8 restored
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiopasra committed Nov 8, 2023
1 parent dad73a9 commit 7c19a0d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
7 changes: 6 additions & 1 deletion src/megaradrp/processing/modeldesc/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
#

import abc
from collections.abc import Sequence # for typing
import sys

if sys.version_info[:2] <= (3, 8):
from typing import Sequence # for typing
else:
from collections.abc import Sequence # for typing

import numpy as np

Expand Down
7 changes: 5 additions & 2 deletions src/megaradrp/processing/modeldesc/gaussbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
# License-Filename: LICENSE.txt
#


from collections.abc import Sequence # for typing
import sys
if sys.version_info[:2] <= (3, 8):
from typing import Sequence # for typing
else:
from collections.abc import Sequence # for typing

from numina.modeling.gaussbox import GaussBox
import numpy as np
Expand Down
6 changes: 5 additions & 1 deletion src/megaradrp/processing/modeldesc/moffat.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
# License-Filename: LICENSE.txt
#

from collections.abc import Sequence # for typing
import sys
if sys.version_info[:2] <= (3, 8):
from typing import Sequence # for typing
else:
from collections.abc import Sequence # for typing

from astropy.modeling.functional_models import Moffat1D
import numpy as np
Expand Down
7 changes: 6 additions & 1 deletion src/megaradrp/processing/modelmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@

import bisect
import collections
from collections.abc import Sequence # for typing
import logging
import math
import sys

if sys.version_info[:2] <= (3, 8):
from typing import Sequence # for typing
else:
from collections.abc import Sequence # for typing

from astropy.modeling import fitting
from astropy.modeling.functional_models import Const1D
Expand Down

0 comments on commit 7c19a0d

Please sign in to comment.