diff --git a/.ci/docker/requirements-lintrunner.txt b/.ci/docker/requirements-lintrunner.txt index ad3917585b..dadffcdff0 100644 --- a/.ci/docker/requirements-lintrunner.txt +++ b/.ci/docker/requirements-lintrunner.txt @@ -10,6 +10,7 @@ flake8-comprehensions==3.12.0 flake8-pyi==23.5.0 mccabe==0.7.0 pycodestyle==2.10.0 +torchfix==0.0.2 # UFMT black==22.12.0 diff --git a/.flake8 b/.flake8 index 0359325649..21c78a4a75 100644 --- a/.flake8 +++ b/.flake8 @@ -1,5 +1,5 @@ [flake8] -select = B,C,E,F,P,W,B9 +select = B,C,E,F,P,W,B9,TOR0,TOR1,TOR2 max-line-length = 80 ignore = # Black conflicts and overlaps. diff --git a/exir/emit/test/test_emit.py b/exir/emit/test/test_emit.py index 1c4182fa77..239f471bb6 100644 --- a/exir/emit/test/test_emit.py +++ b/exir/emit/test/test_emit.py @@ -635,12 +635,8 @@ def f(x: torch.Tensor) -> torch.Tensor: def test_optional_float_list(self) -> None: class M(torch.nn.Module): - def __init__(self): - super().__init__() - self.upsample = torch.nn.UpsamplingNearest2d(scale_factor=2) - def forward(self, x): - return self.upsample(x) + return torch.nn.functional.interpolate(x, scale_factor=2) x = (torch.randn(1, 1, 2, 2),) program = (