Skip to content

Commit b215da2

Browse files
committed
[stubgenc] Replace NoneType with None
1 parent 2d59723 commit b215da2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mypy/stubgenc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ def strip_or_import(typ: str, module: ModuleType, imports: List[str]) -> str:
231231
stripped_type = typ[len('builtins') + 1:]
232232
else:
233233
imports.append('import %s' % (arg_module,))
234+
if stripped_type == 'NoneType':
235+
stripped_type = 'None'
234236
return stripped_type
235237

236238

0 commit comments

Comments
 (0)