[BE][Easy][15/19] enforce style for empty lines in import segments in torch/_d*/ (#129767)

See https://github.com/pytorch/pytorch/pull/129751#issue-2380881501. Most changes are auto-generated by linter.

You can review these PRs via:

```bash
git diff --ignore-all-space --ignore-blank-lines HEAD~1
```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/129767
Approved by: https://github.com/anijain2305
This commit is contained in:
Xuehai Pan
2024-07-31 21:58:25 +08:00
committed by PyTorch MergeBot
parent ad9826208c
commit e74ba1b34a
69 changed files with 251 additions and 191 deletions

View File

@ -12,12 +12,6 @@ import unittest
from typing import List, Optional, Sequence, Union
from unittest.mock import patch
np: Optional[types.ModuleType] = None
try:
import numpy as np
except ModuleNotFoundError:
np = None
import torch
from torch import fx
from torch._dynamo.output_graph import OutputGraph
@ -32,6 +26,14 @@ from .bytecode_transformation import (
from .guards import CheckFunctionManager, CompileId, GuardedCode
from .utils import same
np: Optional[types.ModuleType] = None
try:
import numpy as np
except ModuleNotFoundError:
np = None
unsupported = eval_frame.unsupported
three = 3