Skip to content

Upgrading mypy 0.730 to 0.740

Unknown0.730 → 0.740

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.

  • 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.
Still reading release notes

DepDelta is still reading the release notes in this range. This updates as they come in.

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • changed: method TypeChecker.check_subtype(subtype: Type, supertype: Type, context: Context, msg: str=…, subtype_label: Optional[str]=…, supertype_label: Optional[str]=…, *, code: Optional[ErrorCode]=…) -> bool → method TypeChecker.check_subtype(subtype: Type, supertype: Type, context: Context, msg: str=…, subtype_label: Optional[str]=…, supertype_label: Optional[str]=…, *, code: Optional[ErrorCode]=…, outer_context: Optional[Context]=…) -> bool
  • added: function has_bool_item(typ: ProperType) -> bool
  • added: method TypeChecker.check__exit__return_type(defn: FuncItem) -> None
  • added: method TypeChecker.check_init_subclass(defn: ClassDef) -> None
  • changed: function has_bytes_component(typ: Type) -> bool → function has_bytes_component(typ: Type, py2: bool=…) -> bool
  • added: method ExpressionChecker.check_str_format_call(e: CallExpr) -> None
  • changed: constructor ConversionSpecifier(key: Optional[str], flags: str, width: str, precision: str, type: str) -> None → constructor ConversionSpecifier(key: Optional[str], flags: str, width: str, precision: str, type: str, format_spec: Optional[str]=…, conversion: Optional[str]=…, field: Optional[str]=…) -> None
  • changed: method StringFormatterChecker.conversion_type(p: str, context: Context, expr: FormatStringExpr) -> Optional[Type] → method StringFormatterChecker.conversion_type(p: str, context: Context, expr: FormatStringExpr, format_call: bool=…) -> Optional[Type]
  • added: function compile_new_format_re(custom_spec: bool) -> Pattern[str]
  • added: function custom_special_method(typ: Type, name: str, check_all: bool=…) -> bool
  • added: function has_type_component(typ: Type, fullname: str) -> bool
  • added: method StringFormatterChecker.apply_field_accessors(spec: ConversionSpecifier, repl: Expression, ctx: Context) -> Expression
  • added: method StringFormatterChecker.auto_generate_keys(all_specs: List[ConversionSpecifier], ctx: Context) -> bool
  • added: method StringFormatterChecker.build_dict_type(expr: FormatStringExpr) -> Type
  • added: method StringFormatterChecker.check_placeholder_type(typ: Type, expected_type: Type, context: Context) -> None
  • added: method StringFormatterChecker.check_s_special_cases(expr: FormatStringExpr, typ: Type, context: Context) -> None
  • added: method StringFormatterChecker.check_specs_in_format_call(call: CallExpr, specs: List[ConversionSpecifier], format_value: str) -> None
  • added: method StringFormatterChecker.check_str_format_call(call: CallExpr, format_value: str) -> None
  • added: method StringFormatterChecker.find_non_escaped_targets(format_value: str, ctx: Context) -> Optional[List[str]]
  • added: method StringFormatterChecker.find_replacements_in_call(call: CallExpr, keys: List[str]) -> List[Expression]
  • added: method StringFormatterChecker.get_expr_by_name(key: str, call: CallExpr) -> Optional[Expression]
  • added: method StringFormatterChecker.get_expr_by_position(pos: int, call: CallExpr) -> Optional[Expression]
  • added: method StringFormatterChecker.parse_format_value(format_value: str, ctx: Context, nested: bool=…) -> Optional[List[ConversionSpecifier]]
  • added: method StringFormatterChecker.perform_special_format_checks(spec: ConversionSpecifier, call: CallExpr, repl: Expression, actual_type: Type, expected_type: Type) -> None
  • added: method StringFormatterChecker.validate_and_transform_accessors(temp_ast: Expression, original_repl: Expression, spec: ConversionSpecifier, ctx: Context) -> bool
  • added: static method ConversionSpecifier.from_match(match_obj: Match[str], non_standard_spec: bool=…) -> ConversionSpecifier
  • added: variable DUMMY_FIELD_NAME
  • added: variable FLOAT_TYPES
  • added: variable FORMAT_RE_NEW
  • added: variable FORMAT_RE_NEW_CUSTOM
  • added: variable MatchMap
  • added: variable NUMERIC_TYPES_NEW
  • added: variable NUMERIC_TYPES_OLD
  • added: variable REQUIRE_INT_NEW
  • added: variable REQUIRE_INT_OLD
  • added: variable SUPPORTED_TYPES_NEW
  • added: variable EXIT_RETURN
  • added: variable STRING_FORMATTING
  • added: variable STR_BYTES_PY3
  • changed: function parse_type_ignore_tag(tag: Optional[str]) -> List[str] → function parse_type_ignore_tag(tag: Optional[str]) -> Optional[List[str]]
  • added: variable INVALID_TYPE_IGNORE
  • changed: method MessageBuilder.requires_int_or_char(context: Context) -> None → method MessageBuilder.requires_int_or_char(context: Context, format_call: bool=…) -> None
  • added: method MessageBuilder.incorrect__exit__return(context: Context) -> None
  • removed: function try_getting_str_literals(expr: Expression, typ: Type) -> Optional[List[str]]
  • added: function path_open_callback(ctx: MethodContext) -> Type
  • changed: method NamedTupleAnalyzer.analyze_namedtuple_classdef(defn: ClassDef) -> Tuple[bool, Optional[TypeInfo]] → method NamedTupleAnalyzer.analyze_namedtuple_classdef(defn: ClassDef, is_stub_file: bool) -> Tuple[bool, Optional[TypeInfo]]
  • changed: method NamedTupleAnalyzer.check_namedtuple_classdef(defn: ClassDef) -> Optional[Tuple[List[str], List[Type], Dict[str, Expression]]] → method NamedTupleAnalyzer.check_namedtuple_classdef(defn: ClassDef, is_stub_file: bool) -> Optional[Tuple[List[str], List[Type], Dict[str, Expression]]]
  • changed: function find_member(name: str, itype: Instance, subtype: Type) -> Optional[Type] → function find_member(name: str, itype: Instance, subtype: Type, is_operator: bool=…) -> Optional[Type]
  • changed: constructor SuggestionEngine(fgmanager: FineGrainedBuildManager, *, json: bool, no_errors: bool=…, no_any: bool=…, try_text: bool=…, flex_any: Optional[float]=…) -> None → constructor SuggestionEngine(fgmanager: FineGrainedBuildManager, *, json: bool, no_errors: bool=…, no_any: bool=…, try_text: bool=…, flex_any: Optional[float]=…, use_fixme: Optional[str]=…) -> None
  • changed: method SuggestionEngine.ensure_loaded(state: State) -> MypyFile → method SuggestionEngine.ensure_loaded(state: State, force: bool=…) -> MypyFile
  • changed: method SuggestionEngine.get_suggestion(function: str) -> PyAnnotateSignature → method SuggestionEngine.get_suggestion(mod: str, node: FuncDef) -> PyAnnotateSignature
  • changed: method SuggestionEngine.json_suggestion(function: str, suggestion: PyAnnotateSignature) -> str → method SuggestionEngine.json_suggestion(mod: str, func_name: str, node: FuncDef, suggestion: PyAnnotateSignature) -> str
  • changed: method SuggestionEngine.restore_after(target: str) -> Iterator[None] → method SuggestionEngine.restore_after(module: str) -> Iterator[None]
  • added: method SuggestionEngine.find_node_by_file_and_line(file: str, line: int) -> Tuple[str, SymbolNode]
  • added: method SuggestionEngine.find_node_by_module_and_name(modname: str, tail: str) -> Optional[SymbolNode]
  • added: method TypeFormatter.visit_typeddict_type(t: TypedDictType) -> str
  • added: class ReturnCollector(TraverserVisitor)
  • added: constructor ReturnCollector() -> None
  • added: function all_return_statements(node: Node) -> List[ReturnStmt]
  • added: method ReturnCollector.visit_func_def(defn: FuncDef) -> None
  • added: method ReturnCollector.visit_return_stmt(stmt: ReturnStmt) -> None
  • added: function callable_type(fdef: FuncItem, fallback: Instance, ret_type: Optional[Type]=…) -> CallableType
  • added: function function_type(func: FuncBase, fallback: Instance) -> FunctionLike
  • added: function try_getting_str_literals(expr: Expression, typ: Type) -> Optional[List[str]]
  • removed: function callable_type(fdef: mypy.nodes.FuncItem, fallback: Instance, ret_type: Optional[Type]=…) -> CallableType
  • removed: function function_type(func: mypy.nodes.FuncBase, fallback: Instance) -> FunctionLike
  • changed: static method UnionType.make_union(items: List[ProperType], line: int=…, column: int=…) -> ProperType | (items: List[Type], line: int=…, column: int=…) -> Type → static method UnionType.make_union(items: Sequence[ProperType], line: int=…, column: int=…) -> ProperType | (items: Sequence[Type], line: int=…, column: int=…) -> Type
  • added: variable MODULE_PREFIX
  • changed: constructor HeaderDeclaration(dependencies: Set[str], decl: List[str], defn: Optional[List[str]], needs_extern: bool=…) -> None → constructor HeaderDeclaration(decl: Union[str, List[str]], defn: Optional[List[str]]=…, *, dependencies: Optional[Set[str]]=…, is_type: bool=…) -> None
  • removed: function generate_trait_vtable_setup(cl: ClassIR, vtable_setup_name: str, vtable_name: str, emitter: Emitter) -> None
  • changed: function generate_class_type_decl(cl: ClassIR, c_emitter: Emitter, emitter: Emitter) -> None → function generate_class_type_decl(cl: ClassIR, c_emitter: Emitter, external_emitter: Emitter, emitter: Emitter) -> None
  • changed: function generate_vtables(base: ClassIR, vtable_name: str, emitter: Emitter) -> str → function generate_vtables(base: ClassIR, vtable_setup_name: str, vtable_name: str, emitter: Emitter) -> str
  • changed: function compile_modules_to_c(result: BuildResult, module_names: List[str], shared_lib_name: Optional[str], compiler_options: CompilerOptions, ops: Optional[List[str]]=…) -> List[Tuple[str, str]] → function compile_modules_to_c(result: BuildResult, module_names: List[str], shared_lib_name: Optional[str], compiler_options: CompilerOptions, errors: Errors, ops: Optional[List[str]]=…) -> List[Tuple[str, str]]
  • changed: method ModuleGenerator.declare_finals(final_names: Iterable[Tuple[str, RType]], emitter: Emitter) -> None → method ModuleGenerator.declare_finals(module: str, final_names: Iterable[Tuple[str, RType]], emitter: Emitter) -> None
  • changed: method ModuleGenerator.declare_global(type_spaced: str, name: str, initializer: Optional[str]=…) -> None → method ModuleGenerator.declare_global(type_spaced: str, name: str, *, initializer: Optional[str]=…) -> None
  • changed: method ModuleGenerator.define_finals(final_names: Iterable[Tuple[str, RType]], emitter: Emitter) -> None → method ModuleGenerator.define_finals(module: str, final_names: Iterable[Tuple[str, RType]], emitter: Emitter) -> None
  • added: class Errors
  • added: constructor Errors() -> None
  • added: method Errors.error(msg: str, path: str, line: int) -> None
  • added: method Errors.flush_errors() -> None
  • added: method Errors.warning(msg: str, path: str, line: int) -> None
  • removed: class Errors
  • removed: constructor Errors() -> None
  • removed: field IRBuilder.import_maps
  • removed: method Errors.error(msg: str, path: str, line: int) -> None
  • removed: method Errors.flush_errors() -> None
  • removed: method Errors.warning(msg: str, path: str, line: int) -> None
  • removed: method IRBuilder.load_module_attr(expr: RefExpr) -> Value
  • changed: function build_ir(modules: List[MypyFile], graph: Graph, types: Dict[Expression, Type], options: CompilerOptions) -> Tuple[LiteralsMap, List[Tuple[str, ModuleIR]], int] → function build_ir(modules: List[MypyFile], graph: Graph, types: Dict[Expression, Type], options: CompilerOptions, errors: Errors) -> Tuple[LiteralsMap, List[Tuple[str, ModuleIR]]]
  • changed: method IRBuilder.add_non_ext_class_attr(lvalue: NameExpr, stmt: AssignmentStmt, cdef: ClassDef, attr_to_cache: List[Lvalue]) -> None → method IRBuilder.add_non_ext_class_attr(non_ext: NonExtClassInfo, lvalue: NameExpr, stmt: AssignmentStmt, cdef: ClassDef, attr_to_cache: List[Lvalue]) -> None
  • changed: method IRBuilder.add_to_non_ext_dict(key: str, val: Value, line: int) -> None → method IRBuilder.add_to_non_ext_dict(non_ext: NonExtClassInfo, key: str, val: Value, line: int) -> None
  • changed: method IRBuilder.handle_non_ext_method(cdef: ClassDef, fdef: FuncDef) -> None → method IRBuilder.handle_non_ext_method(non_ext: NonExtClassInfo, cdef: ClassDef, fdef: FuncDef) -> None
  • changed: method IRBuilder.load_non_ext_class(ir: ClassIR, line: int) -> Value → method IRBuilder.load_non_ext_class(ir: ClassIR, non_ext: NonExtClassInfo, line: int) -> Value
  • changed: method IRBuilder.visit_method(cdef: ClassDef, fdef: FuncDef) -> None → method IRBuilder.visit_method(cdef: ClassDef, non_ext: Optional[NonExtClassInfo], fdef: FuncDef) -> None
  • added: variable NAMESPACE_MODULE