From d6458206a953b54069e2da40e44d1689ab694cd4 Mon Sep 17 00:00:00 2001 From: Simon Brugman Date: Mon, 2 Sep 2024 12:27:21 +0200 Subject: [PATCH] Use dict comprehension --- torchfix/visitors/deprecated_symbols/__init__.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/torchfix/visitors/deprecated_symbols/__init__.py b/torchfix/visitors/deprecated_symbols/__init__.py index 1ba44a7..6a05472 100644 --- a/torchfix/visitors/deprecated_symbols/__init__.py +++ b/torchfix/visitors/deprecated_symbols/__init__.py @@ -36,10 +36,6 @@ def read_deprecated_config(path=None): super().__init__() self.deprecated_config = read_deprecated_config(deprecated_config_path) - self.old_new_name_map = {} - for name in self.deprecated_config: - new_name = self.deprecated_config[name].get("replacement") - self.old_new_name_map[name] = new_name self.old_new_name_map = { name: self.deprecated_config[name].get("replacement") for name in self.deprecated_config