274 if code in self.__expected: |
274 if code in self.__expected: |
275 return |
275 return |
276 |
276 |
277 if code and (self.counters[code] == 1 or self.__repeat): |
277 if code and (self.counters[code] == 1 or self.__repeat): |
278 if code in Pep257Checker.Codes: |
278 if code in Pep257Checker.Codes: |
279 text = self.__getMessage(code, *args) |
279 text = self.getMessage(code, *args) |
280 # record the issue with one based line number |
280 # record the issue with one based line number |
281 self.errors.append((self.__filename, lineNumber + 1, offset, text)) |
281 self.errors.append((self.__filename, lineNumber + 1, offset, text)) |
282 |
282 |
283 def __getMessage(self, code, *args): |
283 def getMessage(self, code, *args): |
284 """ |
284 """ |
285 Private method to get a translated and formatted message for a |
285 Public method to get a translated and formatted message for a |
286 given code. |
286 given code. |
287 |
287 |
288 @param code message code (string) |
288 @param code message code (string) |
289 @param args arguments for a formatted message (list) |
289 @param args arguments for a formatted message (list) |
290 @return translated and formatted message (string) |
290 @return translated and formatted message (string) |