From 5cc2b900eef4c55c14f3cc867fbc888b857b9a8c Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 22 Jul 2017 02:07:17 +0200 Subject: [PATCH] constants: avoid comparing constants lgtm: Comparison of constants is always constant, but is harder to read than a simple constant. --- src/borg/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/borg/constants.py b/src/borg/constants.py index bcdaa07da..6c13a9c98 100644 --- a/src/borg/constants.py +++ b/src/borg/constants.py @@ -34,7 +34,7 @@ MAX_DATA_SIZE = 20971479 # MAX_OBJECT_SIZE = <20 MiB (MAX_DATA_SIZE) + 41 bytes for a Repository PUT header, which consists of # a 1 byte tag ID, 4 byte CRC, 4 byte size and 32 bytes for the ID. MAX_OBJECT_SIZE = MAX_DATA_SIZE + 41 # see LoggedIO.put_header_fmt.size assertion in repository module -assert MAX_OBJECT_SIZE == 20971520 == 20 * 1024 * 1024 +assert MAX_OBJECT_SIZE == 20 * 1024 * 1024 # borg.remote read() buffer size BUFSIZE = 10 * 1024 * 1024