Skip to content

Commit bf672de

Browse files
committed
correctly check NoneType, test python 3.11 and 3.12
1 parent 96f33d7 commit bf672de

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/pythonpackage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
PYTHON_VERSION: ["3.7", "3.8", "3.9", "3.10"]
12+
PYTHON_VERSION: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
1313
steps:
1414
- uses: actions/checkout@v2
1515

fgpyo/util/inspect.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def dict_parse(dict_string: str) -> Dict[Any, Any]:
240240
return types.make_enum_parser(type_)
241241
elif types.is_constructible_from_str(type_):
242242
return functools.partial(type_)
243-
elif isinstance(type_, type(None)):
243+
elif type_ is type(None):
244244
return functools.partial(types.none_parser)
245245
elif types.get_origin_type(type_) is Union:
246246
return types.make_union_parser(

0 commit comments

Comments
 (0)