Skip to content

Commit

Permalink
[cdd/emit/utils/sqlalchemy_utils.py] Ensure support for Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelMarks committed Jan 9, 2023
1 parent 72a0d60 commit b5dc8de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cdd/emit/utils/sqlalchemy_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
sqlalchemy_top_level_imports,
)
from cdd.pure_utils import (
PY_GTE_3_8,
PY_GTE_3_9,
find_module_filepath,
none_types,
rpartial,
Expand Down Expand Up @@ -202,7 +202,7 @@ def update_args_infer_typ_sqlalchemy(_param, args, name, nullable, x_typ_sql):
union_typ = ast.parse(_param["typ"]).body[0]
assert isinstance(union_typ.value, Subscript)
union_typ_tuple = (
union_typ.value.slice if PY_GTE_3_8 else union_typ.value.slice.value
union_typ.value.slice if PY_GTE_3_9 else union_typ.value.slice.value
)
assert isinstance(union_typ_tuple, Tuple)
assert len(union_typ_tuple.elts) == 2
Expand Down

0 comments on commit b5dc8de

Please sign in to comment.