Skip to content

Commit

Permalink
Fix small bug after #46 (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
kit1980 authored Apr 24, 2024
1 parent effb27e commit 894113f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions torchfix/visitors/deprecated_symbols/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class TorchDeprecatedSymbolsVisitor(TorchVisitor):
ERRORS: List[TorchError] = [
TorchError("TOR001", "Use of removed function {qualified_name}"),
TorchError("TOR101", "Import of deprecated function {qualified_name}"),
TorchError("TOR101", "Use of deprecated function {qualified_name}"),
TorchError("TOR004", "Import of removed function {qualified_name}"),
TorchError("TOR103", "Import of deprecated function {qualified_name}"),
]
Expand Down Expand Up @@ -94,7 +94,6 @@ def visit_Call(self, node) -> None:
if self.deprecated_config[qualified_name]["remove_pr"] is None:
error_code = self.ERRORS[1].error_code
message = self.ERRORS[1].message(qualified_name=qualified_name)
message = f"Use of deprecated function {qualified_name}"
else:
error_code = self.ERRORS[0].error_code
message = self.ERRORS[0].message(qualified_name=qualified_name)
Expand Down

0 comments on commit 894113f

Please sign in to comment.