Unverified Commit b81d189d authored by Nicolas Hug's avatar Nicolas Hug Committed by GitHub
Browse files

Fix all outstanding flake8 issues (#4535)

parent 5f0edb97
...@@ -4,7 +4,6 @@ import pickle ...@@ -4,7 +4,6 @@ import pickle
from typing import Any, Callable, Optional, Tuple from typing import Any, Callable, Optional, Tuple
import numpy as np import numpy as np
import torch
from PIL import Image from PIL import Image
from .utils import check_integrity, download_and_extract_archive from .utils import check_integrity, download_and_extract_archive
......
...@@ -6,7 +6,6 @@ import torch ...@@ -6,7 +6,6 @@ import torch
from PIL import Image from PIL import Image
from .utils import ( from .utils import (
check_integrity,
download_file_from_google_drive, download_file_from_google_drive,
download_and_extract_archive, download_and_extract_archive,
extract_archive, extract_archive,
......
import math import math
import os
import warnings import warnings
from fractions import Fraction from fractions import Fraction
from typing import List, Tuple from typing import List, Tuple
......
...@@ -65,11 +65,11 @@ class _DenseLayer(nn.Module): ...@@ -65,11 +65,11 @@ class _DenseLayer(nn.Module):
return cp.checkpoint(closure, *input) return cp.checkpoint(closure, *input)
@torch.jit._overload_method # noqa: F811 @torch.jit._overload_method # noqa: F811
def forward(self, input: List[Tensor]) -> Tensor: def forward(self, input: List[Tensor]) -> Tensor: # noqa: F811
pass pass
@torch.jit._overload_method # noqa: F811 @torch.jit._overload_method # noqa: F811
def forward(self, input: Tensor) -> Tensor: def forward(self, input: Tensor) -> Tensor: # noqa: F811
pass pass
# torchscript does not yet support *args, so we overload method # torchscript does not yet support *args, so we overload method
......
...@@ -9,7 +9,7 @@ from torchvision.ops import boxes as box_ops ...@@ -9,7 +9,7 @@ from torchvision.ops import boxes as box_ops
from . import _utils as det_utils from . import _utils as det_utils
# Import AnchorGenerator to keep compatibility. # Import AnchorGenerator to keep compatibility.
from .anchor_utils import AnchorGenerator from .anchor_utils import AnchorGenerator # noqa: 401
from .image_list import ImageList from .image_list import ImageList
......
import warnings import warnings
from collections import OrderedDict from collections import OrderedDict
from functools import partial from functools import partial
from typing import Any, Callable, Dict, List, Optional, Tuple from typing import Any, Callable, Dict, List, Optional
import torch import torch
from torch import nn, Tensor from torch import nn, Tensor
......
import warnings import warnings
from functools import partial
from typing import Callable, Any, Optional, List from typing import Callable, Any, Optional, List
import torch import torch
......
...@@ -7,12 +7,7 @@ _onnx_opset_version = 11 ...@@ -7,12 +7,7 @@ _onnx_opset_version = 11
def _register_custom_op(): def _register_custom_op():
from torch.onnx.symbolic_helper import ( from torch.onnx.symbolic_helper import parse_args
parse_args,
scalar_type_to_onnx,
scalar_type_to_pytorch_type,
cast_pytorch_to_onnx,
)
from torch.onnx.symbolic_opset11 import select, squeeze, unsqueeze from torch.onnx.symbolic_opset11 import select, squeeze, unsqueeze
from torch.onnx.symbolic_opset9 import _cast_Long from torch.onnx.symbolic_opset9 import _cast_Long
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment