mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE][Easy] enable postponed annotations in tools
(#129375)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/129375 Approved by: https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
58f346c874
commit
8a67daf283
@ -5,7 +5,6 @@ import argparse
|
||||
import json
|
||||
import unittest
|
||||
from collections import defaultdict
|
||||
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
from gen_operators_yaml import (
|
||||
@ -43,10 +42,10 @@ def _mock_load_op_dep_graph():
|
||||
|
||||
|
||||
class GenOperatorsYAMLTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
def setUp(self) -> None:
|
||||
pass
|
||||
|
||||
def test_filter_creation(self):
|
||||
def test_filter_creation(self) -> None:
|
||||
filter_func = make_filter_from_options(
|
||||
model_name="abc",
|
||||
model_versions=["100", "101"],
|
||||
@ -99,7 +98,7 @@ class GenOperatorsYAMLTest(unittest.TestCase):
|
||||
len(filtered_configs) == 2
|
||||
), f"Expected 2 elements in filtered_configs, but got {len(filtered_configs)}"
|
||||
|
||||
def test_verification_success(self):
|
||||
def test_verification_success(self) -> None:
|
||||
filter_func = make_filter_from_options(
|
||||
model_name="abc",
|
||||
model_versions=["100", "101"],
|
||||
@ -142,7 +141,7 @@ class GenOperatorsYAMLTest(unittest.TestCase):
|
||||
"expected verify_all_specified_present to succeed instead it raised an exception"
|
||||
)
|
||||
|
||||
def test_verification_fail(self):
|
||||
def test_verification_fail(self) -> None:
|
||||
config = [
|
||||
{
|
||||
"model": {
|
||||
@ -229,7 +228,7 @@ class GenOperatorsYAMLTest(unittest.TestCase):
|
||||
)
|
||||
def test_fill_output_with_arguments_not_include_all_overloads(
|
||||
self, mock_parse_options: Mock, mock_load_op_dep_graph: Mock
|
||||
):
|
||||
) -> None:
|
||||
parser = argparse.ArgumentParser(description="Generate used operators YAML")
|
||||
options = get_parser_options(parser)
|
||||
|
||||
|
Reference in New Issue
Block a user