[all-commits] [llvm/llvm-project] 517767: Updated MLIR type stubs to work with pytype

Sergei Lebedev via All-commits all-commits at lists.llvm.org
Fri Mar 25 05:39:04 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5177676261147ef6c930e060a13a895e45bb6af4
      https://github.com/llvm/llvm-project/commit/5177676261147ef6c930e060a13a895e45bb6af4
  Author: Sergei Lebedev <slebedev at google.com>
  Date:   2022-03-25 (Fri, 25 Mar 2022)

  Changed paths:
    M mlir/python/mlir/_mlir_libs/_mlir/ir.pyi
    M mlir/python/mlir/_mlir_libs/_mlir/passmanager.pyi

  Log Message:
  -----------
  Updated MLIR type stubs to work with pytype

The diff is big, but there are in fact only three kinds of changes

* ir.py had a synax error -- underminated [
* forward references are unnecessary in .pyi files (see https://github.com/python/typeshed/blob/9a76b13127ffa8365431dcc105fc111cdd267e7e/CONTRIBUTING.md?plain=1#L450-L454)
* methods defined via .def_static() are now decorated with @staticmethod

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D122300




More information about the All-commits mailing list