diff --git a/mypy/checkexpr.py b/mypy/checkexpr.py index c9296bd5e875..7b4214b090c0 100644 --- a/mypy/checkexpr.py +++ b/mypy/checkexpr.py @@ -1934,6 +1934,11 @@ def analyze_type_type_callee(self, item: ProperType, context: Context) -> Type: # We support Type of namedtuples but not of tuples in general if isinstance(item, TupleType) and tuple_fallback(item).type.fullname != "builtins.tuple": return self.analyze_type_type_callee(tuple_fallback(item), context) + if isinstance(item, NoneType): + # type(None)() and NoneType() are valid in Python 3 + return CallableType( + arg_types=[], arg_kinds=[], arg_names=[], ret_type=item, fallback=None + ) if isinstance(item, TypedDictType): return self.typeddict_callable_from_context(item) diff --git a/mypy/config_parser.py b/mypy/config_parser.py index 97fa01b8dd21..5fe976fc7716 100644 --- a/mypy/config_parser.py +++ b/mypy/config_parser.py @@ -207,6 +207,7 @@ def split_commas(value: str) -> list[str]: "exclude": lambda s: [s.strip()], "packages": try_split, "modules": try_split, + "output": str, } # Reuse the ini_config_types and overwrite the diff @@ -229,6 +230,7 @@ def split_commas(value: str) -> list[str]: "exclude": str_or_array_as_list, "packages": try_split, "modules": try_split, + "output": str, } )