From 8523dc164acb3ae362c49c3d0df65bf4967cf47e Mon Sep 17 00:00:00 2001 From: JamzumSum Date: Sat, 5 Nov 2022 20:11:35 +0800 Subject: [PATCH] fix: NoneType ImportError on python<3.10 --- src/yacs_stubgen/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/yacs_stubgen/__init__.py b/src/yacs_stubgen/__init__.py index f3277b6..ff72c26 100644 --- a/src/yacs_stubgen/__init__.py +++ b/src/yacs_stubgen/__init__.py @@ -1,5 +1,4 @@ from pathlib import Path -from types import NoneType from typing import Any, Dict, Optional, Union import yaml @@ -8,7 +7,7 @@ typo_map = { list: "T.Sequence", tuple: "T.Sequence", - NoneType: "T.Any", + type(None): "T.Any", }