Skip to content

Commit 1654a41

Browse files
fix: fix NoneType definition
1 parent 6933247 commit 1654a41

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

snakemake_interface_executor_plugins/_common.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
__license__ = "MIT"
55

66
from dataclasses import MISSING, Field
7-
from types import NoneType
87
from typing import Any, Dict, List, Literal, Tuple, Union, get_args, get_origin
98
from argparse_dataclass import _handle_bool_type
109

@@ -13,6 +12,10 @@
1312
executor_plugin_module_prefix = executor_plugin_prefix.replace("-", "_")
1413

1514

15+
# In Python 3.10, we can use types.NoneType
16+
NoneType = type(None)
17+
18+
1619
# Taken from https://github.com/mivade/argparse_dataclass/pull/59/files.
1720
# TODO remove once https://github.com/mivade/argparse_dataclass/pull/59/files is
1821
# merged and released

0 commit comments

Comments
 (0)