Upgrading mypy 0.511 to 0.520
Unknown0.511 → 0.520
Fetching 1 release from GitHub…0 / 1
UnknownUpgrade verdict
DepDelta is still reading the notes for this range, so breaking changes can't be ruled out yet.
In plain terms
- DepDelta is still reading the release notes in this range, so it can't rule out breaking changes yet.
- This page updates as the notes come in.
Must act Still reading release notes
DepDelta is still reading the release notes in this range. This updates as they come in.
API changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- changed:
function get_declaration(expr: BindableExpression) -> Type → function get_declaration(expr: BindableExpression) -> Optional[Type] - changed:
method ConditionalTypeBinder.get(expr: Expression) -> Type → method ConditionalTypeBinder.get(expr: Expression) -> Optional[Type] - changed:
method ConditionalTypeBinder.most_recent_enclosing_type(expr: BindableExpression, type: Type) -> Type → method ConditionalTypeBinder.most_recent_enclosing_type(expr: BindableExpression, type: Type) -> Optional[Type] - added:
class DeclarationsFrame(Dict[Key, Optional[Type]]) - added:
constructor DeclarationsFrame() -> None
- removed:
function is_meta_fresh(meta: Optional[CacheMeta], id: str, path: str, manager: BuildManager) -> bool - changed:
constructor BuildManager(data_dir: str, lib_path: List[str], ignore_prefix: str, source_set: BuildSourceSet, reports: Reports, options: Options, version_id: str) -> None → constructor BuildManager(data_dir: str, lib_path: List[str], ignore_prefix: str, source_set: BuildSourceSet, reports: Reports, options: Options, version_id: str, plugin: Plugin, errors: Errors) -> None - changed:
function get_cache_names(id: str, path: str, cache_dir: str, pyversion: Tuple[int, int]) -> Tuple[str, str] → function get_cache_names(id: str, path: str, manager: BuildManager) -> Tuple[str, str] - changed:
function read_with_python_encoding(path: str, pyversion: Tuple[int, int]) -> str → function read_with_python_encoding(path: str, pyversion: Tuple[int, int]) -> Tuple[str, str] - changed:
function write_cache(id: str, path: str, tree: MypyFile, dependencies: List[str], suppressed: List[str], child_modules: List[str], dep_prios: List[int], old_interface_hash: str, manager: BuildManager) -> str → function write_cache(id: str, path: str, tree: MypyFile, dependencies: List[str], suppressed: List[str], child_modules: List[str], dep_prios: List[int], old_interface_hash: str, source_hash: str, manager: BuildManager) -> str - added:
field State.source_hash - added:
function atomic_write(filename: str, *lines: str) -> bool - added:
function find_config_file_line_number(path: str, section: str, setting_name: str) -> int - added:
function getmtime(name: str) -> int - added:
function load_plugins(options: Options, errors: Errors) -> Plugin - added:
function validate_meta(meta: Optional[CacheMeta], id: str, path: str, manager: BuildManager) -> Optional[CacheMeta] - added:
method State.patch_dependency_parents() -> None - added:
method State.semantic_analysis_apply_patches() -> None
- changed:
class TypeChecker(NodeVisitor[None]) → class TypeChecker(NodeVisitor[None], CheckerPluginInterface) - changed:
constructor TypeChecker(errors: Errors, modules: Dict[str, MypyFile], options: Options, tree: MypyFile, path: str) -> None → constructor TypeChecker(errors: Errors, modules: Dict[str, MypyFile], options: Options, tree: MypyFile, path: str, plugin: Plugin) -> None - added:
field TypeChecker.plugin - added:
method TypeChecker.check_setattr_method(typ: CallableType, context: Context) -> None - added:
method TypeChecker.check_untyped_after_decorator(typ: Type, func: FuncDef) -> None
- removed:
method ExpressionChecker.replace_tvars_any(tp: Type) -> Type - changed:
constructor ExpressionChecker(chk: mypy.checker.TypeChecker, msg: MessageBuilder) -> None → constructor ExpressionChecker(chk: mypy.checker.TypeChecker, msg: MessageBuilder, plugin: Plugin) -> None - changed:
method ExpressionChecker.accept(node: Expression, type_context: Type=…, allow_none_return: bool=…) -> Type → method ExpressionChecker.accept(node: Expression, type_context: Type=…, allow_none_return: bool=…, always_allow_any: bool=…) -> Type - changed:
method ExpressionChecker.check_call(callee: Type, args: List[Expression], arg_kinds: List[int], context: Context, arg_names: List[str]=…, callable_node: Expression=…, arg_messages: MessageBuilder=…) -> Tuple[Type, Type] → method ExpressionChecker.check_call(callee: Type, args: List[Expression], arg_kinds: List[int], context: Context, arg_names: List[str]=…, callable_node: Expression=…, arg_messages: MessageBuilder=…, callable_name: Optional[str]=…, object_type: Optional[Type]=…) -> Tuple[Type, Type] - changed:
method ExpressionChecker.check_call_expr_with_callee_type(callee_type: Type, e: CallExpr) -> Type → method ExpressionChecker.check_call_expr_with_callee_type(callee_type: Type, e: CallExpr, callable_name: Optional[str], object_type: Optional[Type]) -> Type - added:
class HasAnyType(types.TypeQuery[bool]) - added:
constructor HasAnyType() -> None - added:
field ExpressionChecker.plugin - added:
function has_any_type(t: Type) -> bool - added:
method ExpressionChecker.apply_function_plugin(arg_types: List[Type], inferred_ret_type: Type, arg_kinds: List[int], formal_to_actual: List[List[int]], args: List[Expression], num_formals: int, fullname: str, object_type: Optional[Type], context: Context) -> Type - added:
method ExpressionChecker.apply_method_signature_hook(e: CallExpr, callee: FunctionLike, object_type: Type, signature_hook: Callable[[MethodSigContext], CallableType]) -> FunctionLike - added:
method ExpressionChecker.find_typeddict_context(context: Type) -> Optional[TypedDictType] - added:
method ExpressionChecker.nonliteral_tuple_index_helper(left_type: TupleType, index: Expression) -> Type - added:
method HasAnyType.visit_any(t: AnyType) -> bool
- changed:
function analyze_member_access(name: str, typ: Type, node: Context, is_lvalue: bool, is_super: bool, is_operator: bool, builtin_type: Callable[[str], Instance], not_ready_callback: Callable[[str, Context], None], msg: MessageBuilder, *, original_type: Type, override_info: TypeInfo=…, chk: mypy.checker.TypeChecker=…) -> Type → function analyze_member_access(name: str, typ: Type, node: Context, is_lvalue: bool, is_super: bool, is_operator: bool, builtin_type: Callable[[str], Instance], not_ready_callback: Callable[[str, Context], None], msg: MessageBuilder, *, original_type: Type, chk: mypy.checker.TypeChecker, override_info: TypeInfo=…) -> Type - changed:
function analyze_member_var_access(name: str, itype: Instance, info: TypeInfo, node: Context, is_lvalue: bool, is_super: bool, builtin_type: Callable[[str], Instance], not_ready_callback: Callable[[str, Context], None], msg: MessageBuilder, original_type: Type, chk: mypy.checker.TypeChecker=…) -> Type → function analyze_member_var_access(name: str, itype: Instance, info: TypeInfo, node: Context, is_lvalue: bool, is_super: bool, builtin_type: Callable[[str], Instance], not_ready_callback: Callable[[str, Context], None], msg: MessageBuilder, original_type: Type, chk: mypy.checker.TypeChecker) -> Type - changed:
function analyze_var(name: str, var: Var, itype: Instance, info: TypeInfo, node: Context, is_lvalue: bool, msg: MessageBuilder, original_type: Type, not_ready_callback: Callable[[str, Context], None]) -> Type → function analyze_var(name: str, var: Var, itype: Instance, info: TypeInfo, node: Context, is_lvalue: bool, msg: MessageBuilder, original_type: Type, not_ready_callback: Callable[[str, Context], None], *, chk: mypy.checker.TypeChecker) -> Type - changed:
function bind_self(method: F, original_type: Type=…) -> F → function bind_self(method: F, original_type: Type=…, is_classmethod: bool=…) -> F
- removed:
method CompleteTypeVisitor.visit_none_type(t: NoneTyp) -> bool
- added:
function strict_optional_set(value: bool) -> Iterator[None]
- changed:
constructor ASTConverter(pyversion: Tuple[int, int], is_stub: bool, errors: Errors, custom_typing_module: str=…) -> None → constructor ASTConverter(options: Options, is_stub: bool, errors: Errors) -> None - changed:
function parse(source: Union[str, bytes], fnam: str=…, errors: Errors=…, pyversion: Tuple[int, int]=…, custom_typing_module: str=…) -> MypyFile → function parse(source: Union[str, bytes], fnam: str=…, errors: Errors=…, options: Options=…) -> MypyFile
- changed:
constructor ASTConverter(pyversion: Tuple[int, int], is_stub: bool, errors: Errors, custom_typing_module: str=…) -> None → constructor ASTConverter(options: Options, is_stub: bool, errors: Errors) -> None - changed:
function parse(source: Union[str, bytes], fnam: str=…, errors: Errors=…, pyversion: Tuple[int, int]=…, custom_typing_module: str=…) -> MypyFile → function parse(source: Union[str, bytes], fnam: str=…, errors: Errors=…, options: Options=…) -> MypyFile
- added:
function stale_info() -> TypeInfo
- changed:
function join_simple(declaration: Type, s: Type, t: Type) -> Type → function join_simple(declaration: Optional[Type], s: Type, t: Type) -> Type
- changed:
function main(script_path: str, args: List[str]=…) -> None → function main(script_path: Optional[str], args: List[str]=…) -> None - added:
class InvalidPackageName(Exception) - added:
function disallow_any_argument_type(raw_options: str) -> List[str] - added:
variable disallow_any_options
- removed:
method MessageBuilder.typeddict_instantiated_with_unexpected_items(expected_item_names: List[str], actual_item_names: List[str], context: Context) -> None - removed:
method MessageBuilder.typeddict_item_name_must_be_string_literal(typ: TypedDictType, context: Context) -> None - removed:
method MessageBuilder.typeddict_item_name_not_found(typ: TypedDictType, item_name: str, context: Context) -> None - removed:
variable TUPLE_INDEX_MUST_BE_AN_INT_LITERAL - removed:
variable TUPLE_SLICE_MUST_BE_AN_INT_LITERAL - removed:
variable TYPEDDICT_ITEM_NAME_MUST_BE_STRING_LITERAL - changed:
method MessageBuilder.has_no_attr(typ: Type, member: str, context: Context) -> Type → method MessageBuilder.has_no_attr(original_type: Type, typ: Type, member: str, context: Context) -> Type - changed:
method MessageBuilder.invalid_keyword_var_arg(typ: Type, context: Context) -> None → method MessageBuilder.invalid_keyword_var_arg(typ: Type, is_mapping: bool, context: Context) -> None - added:
function find_defining_module(modules: Dict[str, MypyFile], typ: CallableType) -> Optional[MypyFile] - added:
function format_key_list(keys: List[str], *, short: bool=…) -> str - added:
function make_inferred_type_note(context: Context, subtype: Type, supertype: Type, supertype_str: str) -> str - added:
method MessageBuilder.disallowed_any_type(typ: Type, context: Context) -> None - added:
method MessageBuilder.explicit_any(ctx: Context) -> None - added:
method MessageBuilder.typeddict_key_must_be_string_literal(typ: TypedDictType, context: Context) -> None - added:
method MessageBuilder.typeddict_key_not_found(typ: TypedDictType, item_name: str, context: Context) -> None - added:
method MessageBuilder.unexpected_typeddict_keys(typ: TypedDictType, expected_keys: List[str], actual_keys: List[str], context: Context) -> None - added:
method MessageBuilder.unimported_type_becomes_any(prefix: str, typ: Type, ctx: Context) -> None - added:
method MessageBuilder.untyped_decorated_function(typ: Type, context: Context) -> None - added:
variable BARE_GENERIC - added:
variable CANNOT_ISINSTANCE_NEWTYPE - added:
variable CANNOT_ISINSTANCE_TYPEDDICT - added:
variable IMPLICIT_GENERIC_ANY_BUILTIN - added:
variable INVALID_TUPLE_INDEX_TYPE - added:
variable TYPEDDICT_KEY_MUST_BE_STRING_LITERAL
- removed:
field Node.column - removed:
field Node.line - removed:
method Node.get_column() -> int - removed:
method Node.get_line() -> int - removed:
method Node.set_line(target: Union[Node, int], column: int=…) -> None - changed:
constructor ClassDef(name: str, defs: Block, type_vars: List[mypy.types.TypeVarDef]=…, base_type_exprs: List[Expression]=…, metaclass: str=…) -> None → constructor ClassDef(name: str, defs: Block, type_vars: List[mypy.types.TypeVarDef]=…, base_type_exprs: List[Expression]=…, metaclass: str=…, keywords: List[Tuple[str, Expression]]=…) -> None - changed:
constructor SymbolTableNode(kind: int, node: Optional[SymbolNode], mod_id: str=…, typ: mypy.types.Type=…, module_public: bool=…, normalized: bool=…) -> None → constructor SymbolTableNode(kind: int, node: Optional[SymbolNode], mod_id: str=…, typ: mypy.types.Type=…, module_public: bool=…, normalized: bool=…, alias_tvars: Optional[List[str]]=…) -> None - changed:
constructor TypeAliasExpr(type: mypy.types.Type, fallback: mypy.types.Type=…, in_runtime: bool=…) -> None → constructor TypeAliasExpr(type: mypy.types.Type, tvars: List[str], fallback: mypy.types.Type=…, in_runtime: bool=…) -> None - changed:
function check_arg_names(names: List[str], nodes: List[T], fail: Callable[[str, T], None], description: str=…) -> None → function check_arg_names(names: List[Optional[str]], nodes: List[T], fail: Callable[[str, T], None], description: str=…) -> None - changed:
method Argument.set_line(target: Union[Node, int], column: int=…) -> None → method Argument.set_line(target: Union[Context, int], column: int=…) -> None - changed:
method FuncItem.set_line(target: Union[Node, int], column: int=…) -> None → method FuncItem.set_line(target: Union[Context, int], column: int=…) -> None - added:
constructor Context(line: int=…, column: int=…) -> None - added:
constructor FakeInfo(*args: Any, **kwargs: Any) -> None - added:
field ClassDef.analyzed - added:
field ClassDef.keywords - added:
field Context.column - added:
field Context.line - added:
field OpExpr.right_always - added:
field OpExpr.right_unreachable - added:
field SymbolTableNode.alias_tvars - added:
method Context.set_line(target: Union[Context, int], column: int=…) -> None - added:
method TypeInfo.get_containing_type_info(name: str) -> Optional[TypeInfo]
- added:
class AnalyzerPluginInterface - added:
class ChainedPlugin(Plugin) - added:
class CheckerPluginInterface - added:
class DefaultPlugin(Plugin) - added:
class Plugin - added:
constructor ChainedPlugin(options: Options, plugins: List[Plugin]) -> None - added:
constructor Plugin(options: Options) -> None - added:
field CheckerPluginInterface.msg - added:
function contextmanager_callback(ctx: FunctionContext) -> Type - added:
function int_pow_callback(ctx: MethodContext) -> Type - added:
function open_callback(ctx: FunctionContext) -> Type - added:
function typed_dict_get_callback(ctx: MethodContext) -> Type - added:
function typed_dict_get_signature_callback(ctx: MethodSigContext) -> CallableType - added:
method AnalyzerPluginInterface.analyze_callable_args(arglist: TypeList) -> Optional[Tuple[List[Type], List[int], List[Optional[str]]]] - added:
method AnalyzerPluginInterface.analyze_type(typ: Type) -> Type - added:
method AnalyzerPluginInterface.fail(msg: str, ctx: Context) -> None - added:
method AnalyzerPluginInterface.named_type(name: str, args: List[Type]) -> Instance - added:
method ChainedPlugin.get_attribute_hook(fullname: str) -> Optional[Callable[[AttributeContext], Type]] - added:
method ChainedPlugin.get_function_hook(fullname: str) -> Optional[Callable[[FunctionContext], Type]] - added:
method ChainedPlugin.get_method_hook(fullname: str) -> Optional[Callable[[MethodContext], Type]] - added:
method ChainedPlugin.get_method_signature_hook(fullname: str) -> Optional[Callable[[MethodSigContext], CallableType]] - added:
method ChainedPlugin.get_type_analyze_hook(fullname: str) -> Optional[Callable[[AnalyzeTypeContext], Type]] - added:
method CheckerPluginInterface.named_generic_type(name: str, args: List[Type]) -> Instance - added:
method DefaultPlugin.get_function_hook(fullname: str) -> Optional[Callable[[FunctionContext], Type]] - added:
method DefaultPlugin.get_method_hook(fullname: str) -> Optional[Callable[[MethodContext], Type]] - added:
method DefaultPlugin.get_method_signature_hook(fullname: str) -> Optional[Callable[[MethodSigContext], CallableType]] - added:
method Plugin.get_attribute_hook(fullname: str) -> Optional[Callable[[AttributeContext], Type]] - added:
method Plugin.get_function_hook(fullname: str) -> Optional[Callable[[FunctionContext], Type]] - added:
method Plugin.get_method_hook(fullname: str) -> Optional[Callable[[MethodContext], Type]] - added:
method Plugin.get_method_signature_hook(fullname: str) -> Optional[Callable[[MethodSigContext], CallableType]] - added:
method Plugin.get_type_analyze_hook(fullname: str) -> Optional[Callable[[AnalyzeTypeContext], Type]] - added:
variable AnalyzeTypeContext - added:
variable AttributeContext - added:
variable FunctionContext - added:
variable MethodContext - added:
variable MethodSigContext - added:
variable T
- added:
class AnyExpressionsReporter(AbstractReporter) - added:
constructor AnyExpressionsReporter(reports: Reports, output_dir: str) -> None - added:
method AnyExpressionsReporter.on_file(tree: MypyFile, type_map: Dict[Expression, Type], options: Options) -> None - added:
method AnyExpressionsReporter.on_finish() -> None
- removed:
function infer_if_condition_value(expr: Expression, pyversion: Tuple[int, int], platform: str) -> int - changed:
constructor SemanticAnalyzer(modules: Dict[str, MypyFile], missing_modules: Set[str], lib_path: List[str], errors: Errors) -> None → constructor SemanticAnalyzer(modules: Dict[str, MypyFile], missing_modules: Set[str], lib_path: List[str], errors: Errors, plugin: Plugin) -> None - changed:
method SemanticAnalyzer.analyze_namedtuple_classdef(defn: ClassDef) -> bool → method SemanticAnalyzer.analyze_namedtuple_classdef(defn: ClassDef) -> Optional[TypeInfo] - changed:
method SemanticAnalyzer.build_typeddict_typeinfo(name: str, items: List[str], types: List[Type]) -> TypeInfo → method SemanticAnalyzer.build_typeddict_typeinfo(name: str, items: List[str], types: List[Type], required_keys: Set[str]) -> TypeInfo - changed:
method SemanticAnalyzer.check_typeddict_classdef(defn: ClassDef, oldfields: List[str]=…) -> Tuple[List[str], List[Type]] → method SemanticAnalyzer.check_typeddict_classdef(defn: ClassDef, oldfields: List[str]=…) -> Tuple[List[str], List[Type], Set[str]] - changed:
method SemanticAnalyzer.enter_class(defn: ClassDef) -> None → method SemanticAnalyzer.enter_class(info: TypeInfo) -> None - changed:
method SemanticAnalyzer.fail_typeddict_arg(message: str, context: Context) -> Tuple[List[str], List[Type], bool] → method SemanticAnalyzer.fail_typeddict_arg(message: str, context: Context) -> Tuple[List[str], List[Type], bool, bool] - changed:
method SemanticAnalyzer.name_already_defined(name: str, ctx: Context) -> None → method SemanticAnalyzer.name_already_defined(name: str, ctx: Context, original_ctx: Optional[SymbolTableNode]=…) -> None - changed:
method SemanticAnalyzer.parse_typeddict_args(call: CallExpr, fullname: str) -> Tuple[List[str], List[Type], bool] → method SemanticAnalyzer.parse_typeddict_args(call: CallExpr, fullname: str) -> Tuple[List[str], List[Type], bool, bool] - changed:
method SemanticAnalyzer.visit_file(file_node: MypyFile, fnam: str, options: Options) -> None → method SemanticAnalyzer.visit_file(file_node: MypyFile, fnam: str, options: Options, patches: List[Callable[[], None]]) -> None - changed:
method ThirdPass.analyze(type: Type) -> None → method ThirdPass.analyze(type: Optional[Type]) -> None - added:
class MakeAnyNonExplicit(TypeTranslator) - added:
field SemanticAnalyzer.is_typeshed_stub_file - added:
field SemanticAnalyzer.plugin - added:
function infer_condition_value(expr: Expression, pyversion: Tuple[int, int], platform: str) -> int - added:
function make_any_non_explicit(t: Type) -> Type - added:
method MakeAnyNonExplicit.visit_any(t: AnyType) -> Type - added:
method SemanticAnalyzer.add_fixture_note(fullname: str, ctx: Context) -> None - added:
method SemanticAnalyzer.analyze_alias(rvalue: Expression, allow_unnormalized: bool) -> Tuple[Optional[Type], List[str]] - added:
method SemanticAnalyzer.analyze_class_keywords(defn: ClassDef) -> None - added:
method SemanticAnalyzer.check_with_metaclass(defn: ClassDef) -> Tuple[List[Expression], Optional[str]] - added:
method SemanticAnalyzer.parse_bool(expr: Expression) -> Optional[bool] - added:
method SemanticAnalyzer.process_module_assignment(lvals: List[Expression], rval: Expression, ctx: AssignmentStmt) -> None - added:
method ThirdPass.check_for_omitted_generics(typ: Type) -> None - added:
variable NAMEDTUPLE_PROHIBITED_NAMES - added:
variable SUGGESTED_TEST_FIXTURES
- changed:
constructor StatisticsVisitor(inferred: bool, typemap: Dict[Expression, Type]=…, all_nodes: bool=…) -> None → constructor StatisticsVisitor(inferred: bool, filename: str, typemap: Dict[Expression, Type]=…, all_nodes: bool=…) -> None - changed:
method StatisticsVisitor.type(t: Type) -> None → method StatisticsVisitor.type(t: Optional[Type]) -> None - added:
method StatisticsVisitor.visit_class_def(o: ClassDef) -> None - added:
variable TYPE_UNANALYZED
- changed:
constructor StubGenerator(_all_: Optional[List[str]], pyversion: Tuple[int, int]) -> None → constructor StubGenerator(_all_: Optional[List[str]], pyversion: Tuple[int, int], include_private: bool=…) -> None - changed:
function generate_stub(path: str, output_dir: str, _all_: Optional[List[str]]=…, target: str=…, add_header: bool=…, module: str=…, pyversion: Tuple[int, int]=…) -> None → function generate_stub(path: str, output_dir: str, _all_: Optional[List[str]]=…, target: str=…, add_header: bool=…, module: str=…, pyversion: Tuple[int, int]=…, include_private: bool=…) -> None - changed:
function generate_stub_for_module(module: str, output_dir: str, quiet: bool=…, add_header: bool=…, sigs: Dict[str, str]=…, class_sigs: Dict[str, str]=…, pyversion: Tuple[int, int]=…, no_import: bool=…, search_path: List[str]=…, interpreter: str=…) -> None → function generate_stub_for_module(module: str, output_dir: str, quiet: bool=…, add_header: bool=…, sigs: Dict[str, str]=…, class_sigs: Dict[str, str]=…, pyversion: Tuple[int, int]=…, no_import: bool=…, search_path: List[str]=…, interpreter: str=…, include_private: bool=…) -> None - changed:
function parse_options() -> Options → function parse_options(args: List[str]) -> Options
- removed:
method TypeAnalyser.builtin_type(fully_qualified_name: str, args: List[Type]=…) -> Instance - removed:
method TypeAnalyser.get_tvar_name(t: Type) -> Optional[str] - removed:
method TypeAnalyser.get_type_var_names(tp: Type) -> List[str] - removed:
method TypeAnalyser.replace_alias_tvars(tp: Type, vars: List[str], subs: List[Type], newline: int, newcolumn: int) -> Type - changed:
class TypeAnalyser(SyntheticTypeVisitor[Type]) → class TypeAnalyser(SyntheticTypeVisitor[Type], AnalyzerPluginInterface) - changed:
constructor TypeAnalyser(lookup_func: Callable[[str, Context], SymbolTableNode], lookup_fqn_func: Callable[[str], SymbolTableNode], tvar_scope: TypeVarScope, fail_func: Callable[[str, Context], None], *, aliasing: bool=…, allow_tuple_literal: bool=…, allow_unnormalized: bool=…) -> None → constructor TypeAnalyser(lookup_func: Callable[[str, Context], SymbolTableNode], lookup_fqn_func: Callable[[str], SymbolTableNode], tvar_scope: TypeVarScope, fail_func: Callable[[str, Context], None], plugin: Plugin, options: Options, is_typeshed_stub: bool, *, aliasing: bool=…, allow_tuple_literal: bool=…, allow_unnormalized: bool=…) -> None - changed:
constructor TypeAnalyserPass3(fail_func: Callable[[str, Context], None]) -> None → constructor TypeAnalyserPass3(fail_func: Callable[[str, Context], None], options: Options, is_typeshed_stub: bool) -> None - changed:
function analyze_type_alias(node: Expression, lookup_func: Callable[[str, Context], SymbolTableNode], lookup_fqn_func: Callable[[str], SymbolTableNode], tvar_scope: TypeVarScope, fail_func: Callable[[str, Context], None], allow_unnormalized: bool=…) -> Optional[Type] → function analyze_type_alias(node: Expression, lookup_func: Callable[[str, Context], SymbolTableNode], lookup_fqn_func: Callable[[str], SymbolTableNode], tvar_scope: TypeVarScope, fail_func: Callable[[str, Context], None], plugin: Plugin, options: Options, is_typeshed_stub: bool, allow_unnormalized: bool=…) -> Optional[Type] - added:
class CollectAnyTypesQuery(TypeQuery[List[AnyType]]) - added:
class HasAnyFromUnimportedType(TypeQuery[bool]) - added:
class HasExplicitAny(TypeQuery[bool]) - added:
constructor CollectAnyTypesQuery() -> None - added:
constructor HasAnyFromUnimportedType() -> None - added:
constructor HasExplicitAny() -> None - added:
function check_for_explicit_any(typ: Optional[Type], options: Options, is_typeshed_stub: bool, msg: MessageBuilder, context: Context) -> None - added:
function collect_any_types(t: Type) -> List[AnyType] - added:
function has_any_from_unimported_type(t: Type) -> bool - added:
function has_explicit_any(t: Type) -> bool - added:
function replace_alias_tvars(tp: Type, vars: List[str], subs: List[Type], newline: int, newcolumn: int) -> Type - added:
function set_any_tvars(tp: Type, vars: List[str], newline: int, newcolumn: int, implicit: bool=…) -> Type - added:
method CollectAnyTypesQuery.visit_any(t: AnyType) -> List[AnyType] - added:
method HasAnyFromUnimportedType.visit_any(t: AnyType) -> bool - added:
method HasAnyFromUnimportedType.visit_typeddict_type(t: TypedDictType) -> bool - added:
method HasExplicitAny.visit_any(t: AnyType) -> bool - added:
method HasExplicitAny.visit_typeddict_type(t: TypedDictType) -> bool - added:
method TypeAnalyser.analyze_callable_args(arglist: TypeList) -> Optional[Tuple[List[Type], List[int], List[Optional[str]]]] - added:
method TypeAnalyser.analyze_type(t: Type) -> Type - added:
method TypeAnalyser.fail(msg: str, ctx: Context) -> None - added:
method TypeAnalyser.named_type(fully_qualified_name: str, args: List[Type]=…, line: int=…, column: int=…) -> Instance - added:
static method CollectAnyTypesQuery.combine_lists_strategy(it: Iterable[List[AnyType]]) -> List[AnyType]
- removed:
constructor Type(line: int=…, column: int=…) -> None - removed:
field Type.column - removed:
field Type.line - removed:
field TypeVarDef.column - removed:
field TypeVarDef.line - removed:
method Type.get_column() -> int - removed:
method Type.get_line() -> int - removed:
method TypeStrVisitor.keywords_str(a: Iterable[Tuple[str, Type]]) -> str - removed:
method TypeVarDef.get_column() -> int - removed:
method TypeVarDef.get_line() -> int - changed:
constructor AnyType(implicit: bool=…, line: int=…, column: int=…) -> None → constructor AnyType(implicit: bool=…, from_unimported_type: bool=…, explicit: bool=…, from_omitted_generics: bool=…, special_form: bool=…, line: int=…, column: int=…) -> None - changed:
constructor TypeType(item: Type, *, line: int=…, column: int=…) -> None → constructor TypeType(item: Union[Instance, AnyType, TypeVarType, TupleType, NoneTyp, CallableType], *, line: int=…, column: int=…) -> None - changed:
constructor TypedDictType(items: OrderedDict[str, Type], fallback: Instance, line: int=…, column: int=…) -> None → constructor TypedDictType(items: OrderedDict[str, Type], required_keys: Set[str], fallback: Instance, line: int=…, column: int=…) -> None - changed:
method TypedDictType.copy_modified(*, fallback: Instance=…, item_types: List[Type]=…) -> TypedDictType → method TypedDictType.copy_modified(*, fallback: Instance=…, item_types: List[Type]=…, required_keys: Set[str]=…) -> TypedDictType - changed:
static method TypeType.deserialize(data: JsonDict) -> TypeType → static method TypeType.deserialize(data: JsonDict) -> Type - added:
field Instance.from_generic_builtin - added:
field TypedDictType.required_keys - added:
method AnyType.copy_modified(implicit: bool=…, from_unimported_type: bool=…, explicit: bool=…, from_omitted_generics: bool=…, special_form: bool=…) -> AnyType - added:
method TypedDictType.is_anonymous() -> bool - added:
method UnionType.relevant_items() -> List[Type] - added:
static method TypeType.make_normalized(item: Type, *, line: int=…, column: int=…) -> Type - added:
variable names
- changed:
constructor LazySubprocess(name: str, args: List[str], *, cwd: str=…, env: Dict[str, str]=…) -> None → constructor LazySubprocess(name: str, args: List[str], *, cwd: str=…, env: Dict[str, str]=…, passthrough: Optional[int]=…) -> None