Skip to content

Commit e4afffb

Browse files
[MLGO] Add pytype test (#79558)
This patch adds a pytype test to the mlgo-utils lit test suite to prevent regressions in typing while we wait to setup precommit CI for this specific project. This is somewhat hacky, but is a temporary fix and will be pulled out soonish. It also should only impact the ML buildbots as they are the only ones that should have `pytype` installed.
1 parent 5545406 commit e4afffb

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

llvm/utils/mlgo-utils/mlgo/corpus/__init__.py

Whitespace-only changes.

llvm/utils/mlgo-utils/tests/lit.local.cfg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,11 @@ import sys
44
# the entire project has been bumped to 3.8.
55
if sys.version_info > (3,8):
66
config.available_features.add("python-38")
7+
8+
# TODO(boomanaiden154): Remove this flag once we enable type checking in the
9+
# precommit CI.
10+
try:
11+
import pytype
12+
config.available_features.add("has-pytype")
13+
except:
14+
pass
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# REQUIRES: system-linux, has-pytype
2+
3+
# RUN: pytype %S/../mlgo
4+
# RUN: pytype %S/../tests

0 commit comments

Comments
 (0)