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
from typing import Any, Callable, Optional, Tuple
import numpy as np
import torch
from PIL import Image
from .utils import check_integrity, download_and_extract_archive
......
......@@ -6,7 +6,6 @@ import torch
from PIL import Image
from .utils import (
check_integrity,
download_file_from_google_drive,
download_and_extract_archive,
extract_archive,
......
import math
import os
import warnings
from fractions import Fraction
from typing import List, Tuple
......
......@@ -65,11 +65,11 @@ class _DenseLayer(nn.Module):
return cp.checkpoint(closure, *input)
@torch.jit._overload_method # noqa: F811
def forward(self, input: List[Tensor]) -> Tensor:
def forward(self, input: List[Tensor]) -> Tensor: # noqa: F811
pass
@torch.jit._overload_method # noqa: F811
def forward(self, input: Tensor) -> Tensor:
def forward(self, input: Tensor) -> Tensor: # noqa: F811
pass
# torchscript does not yet support *args, so we overload method
......
......@@ -9,7 +9,7 @@ from torchvision.ops import boxes as box_ops
from . import _utils as det_utils
# Import AnchorGenerator to keep compatibility.
from .anchor_utils import AnchorGenerator
from .anchor_utils import AnchorGenerator # noqa: 401
from .image_list import ImageList
......
import warnings
from collections import OrderedDict
from functools import partial
from typing import Any, Callable, Dict, List, Optional, Tuple
from typing import Any, Callable, Dict, List, Optional
import torch
from torch import nn, Tensor
......
import warnings
from functools import partial
from typing import Callable, Any, Optional, List
import torch
......
......@@ -7,12 +7,7 @@ _onnx_opset_version = 11
def _register_custom_op():
from torch.onnx.symbolic_helper import (
parse_args,
scalar_type_to_onnx,
scalar_type_to_pytorch_type,
cast_pytorch_to_onnx,
)
from torch.onnx.symbolic_helper import parse_args
from torch.onnx.symbolic_opset11 import select, squeeze, unsqueeze
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