Skip to content

Commit 9aeec07

Browse files
committed
Fix small bug after #46
1 parent effb27e commit 9aeec07

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

torchfix/visitors/deprecated_symbols/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
class TorchDeprecatedSymbolsVisitor(TorchVisitor):
2020
ERRORS: List[TorchError] = [
2121
TorchError("TOR001", "Use of removed function {qualified_name}"),
22-
TorchError("TOR101", "Import of deprecated function {qualified_name}"),
22+
TorchError("TOR101", "Use of deprecated function {qualified_name}"),
2323
TorchError("TOR004", "Import of removed function {qualified_name}"),
2424
TorchError("TOR103", "Import of deprecated function {qualified_name}"),
2525
]
@@ -94,7 +94,6 @@ def visit_Call(self, node) -> None:
9494
if self.deprecated_config[qualified_name]["remove_pr"] is None:
9595
error_code = self.ERRORS[1].error_code
9696
message = self.ERRORS[1].message(qualified_name=qualified_name)
97-
message = f"Use of deprecated function {qualified_name}"
9897
else:
9998
error_code = self.ERRORS[0].error_code
10099
message = self.ERRORS[0].message(qualified_name=qualified_name)

0 commit comments

Comments
 (0)