diff options
author | Ćukasz Rogalski <rogalski.91@gmail.com> | 2017-01-03 18:13:16 +0100 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2017-01-03 19:55:37 +0200 |
commit | ea6c74adce6613d543cb3689f39450d4a83166f5 (patch) | |
tree | 56359b592b8c72cc5b3ddd1bb87d4e52111e55c3 | |
parent | 018ed0712fba32b52de6e37c6693937a4d164c33 (diff) | |
download | pylint-git-ea6c74adce6613d543cb3689f39450d4a83166f5.tar.gz |
Add change log entries, fix style issues
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | doc/whatsnew/2.0.rst | 4 | ||||
-rw-r--r-- | pylint/checkers/logging.py | 7 |
3 files changed, 13 insertions, 3 deletions
@@ -250,6 +250,11 @@ Release date: tba Closes #1204 + * Bug-fix for false-positive logging-format-interpolation` when format specifications + are used in formatted string. + + Fixes #572 + What's new in Pylint 1.6.3? =========================== diff --git a/doc/whatsnew/2.0.rst b/doc/whatsnew/2.0.rst index 83a8c5d69..12699b6bc 100644 --- a/doc/whatsnew/2.0.rst +++ b/doc/whatsnew/2.0.rst @@ -858,6 +858,10 @@ Bug fixes may be a part of exposed API, this check is disabled by default. For enabling it, set ``allow-global-unused-variables`` option to false. +* Fix a false-positive ``logging-format-interpolation`` message, when format + specifications are used in formatted string. In general, these operations + are not always convertible to old-style formatting used by logging module. + Removed Changes =============== diff --git a/pylint/checkers/logging.py b/pylint/checkers/logging.py index be031a931..d9c1fd78b 100644 --- a/pylint/checkers/logging.py +++ b/pylint/checkers/logging.py @@ -57,8 +57,9 @@ MSGS = { } -CHECKED_CONVENIENCE_FUNCTIONS = {'critical', 'debug', 'error', 'exception', - 'fatal', 'info', 'warn', 'warning'} +CHECKED_CONVENIENCE_FUNCTIONS = { + 'critical', 'debug', 'error', 'exception', 'fatal', 'info', 'warn', 'warning' +} def is_method_call(func, types=(), methods=()): @@ -233,7 +234,7 @@ class LoggingChecker(checkers.BaseChecker): def is_complex_format_str(node): - """ Checks if node represents a string with complex formatting specs. + """Checks if node represents a string with complex formatting specs. Args: node (astroid.node_classes.NodeNG): AST node to check |