Skip to content

Commit edd2b62

Browse files
committed
fixing up type annotations for mypy
1 parent 2bc4f28 commit edd2b62

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

neurodocker/cli/generate.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import json as json_lib
1111
import sys
12+
import typing as ty
1213
from pathlib import Path
1314
from typing import IO, Any, Optional, Type, cast
1415

@@ -28,6 +29,9 @@
2829
from neurodocker.reproenv.template import Template
2930
from neurodocker.reproenv.types import allowed_pkg_managers
3031

32+
if ty.TYPE_CHECKING:
33+
from click.parser import ParsingState
34+
3135

3236
class GroupAddCommonParamsAndRegisteredTemplates(click.Group):
3337
"""Subclass of `click.Group` that adds parameters common to `reproenv generate`
@@ -137,7 +141,7 @@ def __init__(self, *args, **kwargs):
137141
self._eat_all_parser = None
138142

139143
def add_to_parser(self, parser, ctx):
140-
def parser_process(value, state: click.parser.ParsingState):
144+
def parser_process(value, state: ParsingState):
141145
# method to hook to the parser.process
142146
done = False
143147
value = [value]

0 commit comments

Comments
 (0)