[FX] fix lint (#42866)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/42866
Test Plan: Imported from OSS
Reviewed By: zdevito
Differential Revision: D23056813
Pulled By: jamesr66a
fbshipit-source-id: d30cdffe6f0465223354dec00f15658eb0b08363
diff --git a/torch/fx/__init__.py b/torch/fx/__init__.py
index 466ac3c..9832f02 100644
--- a/torch/fx/__init__.py
+++ b/torch/fx/__init__.py
@@ -1,3 +1,4 @@
+# type: ignore
r'''
**This feature is experimental and its stability is not currently guaranteed. Proceed at your own risk**
diff --git a/torch/fx/graph.py b/torch/fx/graph.py
index 426d24d..6bfaaa2 100644
--- a/torch/fx/graph.py
+++ b/torch/fx/graph.py
@@ -1,3 +1,4 @@
+# type: ignore
from .node import Node, Attribute, magic_methods
import builtins
@@ -163,7 +164,8 @@
continue
elif node.op == 'call_method':
body.append(
- f'{node.name} = {_format_target(repr(node.args[0]), node.target)}({_format_args(node.args[1:], node.kwargs)})\n')
+ f'{node.name} = {_format_target(repr(node.args[0]), node.target)}'
+ f'({_format_args(node.args[1:], node.kwargs)})\n')
continue
elif node.op == 'call_function':
# pretty print operators
diff --git a/torch/fx/graph_module.py b/torch/fx/graph_module.py
index 5978edc..84d7886 100644
--- a/torch/fx/graph_module.py
+++ b/torch/fx/graph_module.py
@@ -1,3 +1,4 @@
+# type: ignore
import torch
import torch.overrides
import linecache
diff --git a/torch/fx/node.py b/torch/fx/node.py
index 5408d32..1734135 100644
--- a/torch/fx/node.py
+++ b/torch/fx/node.py
@@ -1,3 +1,4 @@
+# type: ignore
import dis
import torch
import inspect
diff --git a/torch/fx/symbolic_trace.py b/torch/fx/symbolic_trace.py
index b5a1052..463a145 100644
--- a/torch/fx/symbolic_trace.py
+++ b/torch/fx/symbolic_trace.py
@@ -1,3 +1,4 @@
+# type: ignore
import inspect
from types import CodeType, FunctionType
import torch