From ceb26750ad9ddaeb8d725f18051f6f34038f3672 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Tue, 19 Jul 2022 14:55:07 +0200 Subject: [PATCH] Fix mypy error This is not a runtime issue, because when the supplied mode is DentryPerms.symlink, the target is only used passed to os.symlink, which does allow str too. --- swh/vault/to_disk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swh/vault/to_disk.py b/swh/vault/to_disk.py index 7f957b0..2721642 100644 --- a/swh/vault/to_disk.py +++ b/swh/vault/to_disk.py @@ -130,7 +130,7 @@ class DirectoryBuilder: identifier.""" for file_data in revs_data: path = os.path.join(self.root, file_data["path"]) - target = hashutil.hash_to_hex(file_data["target"]) + target = hashutil.hash_to_bytehex(file_data["target"]) self._create_file(path, target, mode=DentryPerms.symlink) def _create_file( -- GitLab