From 45a88f08b4e881f0fc0039dc56c0223139850c64 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 18 May 2020 17:09:25 +0100 Subject: hacking: Modify checks for translated logs The N319 check previously asserted that debug-level logs were not translated. Now that we've removed all log translations, we can generalize this to all logs. We reuse the same number since these numbers are really just metadata and not public contracts. This also allows us to update the N323 and N326 checks, which ensure we import the translation function, '_', wherever it's used and don't concatenate translated and non-translated strings. Since we're no longer translating logs and the '_LE', '_LW' and '_LI' symbols are no longer provided, we don't need to consider logs in either of these cases. Change-Id: I64d139ad660bc382e8b9d7c8cd03352b26aadafd Signed-off-by: Stephen Finucane --- HACKING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'HACKING.rst') diff --git a/HACKING.rst b/HACKING.rst index f5083cfbd0..46c17d41a8 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -25,7 +25,7 @@ Nova Specific Commandments assertIsInstance(A, B). - [N317] Change assertEqual(type(A), B) by optimal assert like assertIsInstance(A, B) -- [N319] Validate that debug level logs are not translated. +- [N319] Validate that logs are not translated. - [N320] Setting CONF.* attributes directly in tests is forbidden. Use self.flags(option=value) instead. - [N322] Method's default argument shouldn't be mutable -- cgit v1.2.1