Skip to content

Commit 7f7fdb1

Browse files
dreissfacebook-github-bot
authored andcommitted
Remove a use of checkScript(str) (#35623)
Summary: Pull Request resolved: #35623 Python 2 has reached end-of-life and is no longer supported by PyTorch. This test case is valid syntax in Python 3. Test Plan: CI Differential Revision: D20842874 Pulled By: dreiss fbshipit-source-id: 9f12e046f827d4f9d5eca99b0b0b46f73e06ff51
1 parent 313bea8 commit 7f7fdb1

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

test/test_jit.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13111,15 +13111,12 @@ def subscript_tuple_assign(a, x, i):
1311113111

1311213112
self.checkScript(subscript_tuple_assign, ([12, 7, 9, 11], torch.tensor((3, 13, 17)), 0))
1311313113

13114-
# python 2 does not support star assignments so we use compilation unit to test instead
13115-
star_code = dedent('''
1311613114
def star_tuple_assign():
1311713115
# type: () -> Tuple[int, int, Tuple[int, int], Tuple[int, int]]
1311813116
a, (b, *c), *d = 1, (2, 3, 4), 5, 6
1311913117
return a, b, c, d
13120-
''')
1312113118

13122-
self.checkScript(star_code, (), name='star_tuple_assign')
13119+
self.checkScript(star_tuple_assign, ())
1312313120

1312413121
def subscript_tuple_augmented_assign(a):
1312513122
# type: (Tuple[int, int]) -> Tuple[int, int]

0 commit comments

Comments
 (0)