diff --git a/countess/plugins/python.py b/countess/plugins/python.py index 2eec940..588427e 100644 --- a/countess/plugins/python.py +++ b/countess/plugins/python.py @@ -1,7 +1,7 @@ import builtins import math import re -from types import BuiltinFunctionType, CodeType, FunctionType, ModuleType, NoneType +from types import BuiltinFunctionType, CodeType, FunctionType, ModuleType from typing import Any import numpy as np @@ -12,6 +12,9 @@ from countess.core.parameters import BooleanParam, TextParam from countess.core.plugins import PandasTransformDictToDictPlugin +# For 3.9 compatibility +NoneType = type(None) + # XXX pretty sure this is a job for ast.parse rather than just # running compile() and exec() but that can wait. # Builtins are restricted but there's still plenty of things which