Skip to content

Commit 1729ca6

Browse files
r-barnesfacebook-github-bot
authored andcommitted
Annotate some functions that return None
Summary: Test functions return None. This codemod fixes that so type annotation efforts can focus on trickier cases. Reviewed By: azad-meta Differential Revision: D52570419 fbshipit-source-id: f99c81915d3d7a5b7b806b59cffb9eb2c72be88d
1 parent a21ece5 commit 1729ca6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/torchtext_unittest/test_transforms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ def test_gpt2_bpe_tokenizer(self, test_scripting, return_tokens):
709709
"""test tokenization on single sentence input as well as batch on sentences"""
710710
self._gpt2_bpe_tokenizer(self._load_tokenizer(test_scripting=test_scripting, return_tokens=return_tokens))
711711

712-
def test_gpt2_bpe_decoder(self):
712+
def test_gpt2_bpe_decoder(self) -> None:
713713
"""test string output returned by decoder given the token ids"""
714714
self._gpt2_bpe_decoder(self._load_tokenizer(test_scripting=False, return_tokens=False))
715715
self._gpt2_bpe_decoder_with_special_tokens(self._load_tokenizer(test_scripting=False, return_tokens=False))

0 commit comments

Comments
 (0)