diff options
Diffstat (limited to 'pylint/test/functional/logging_not_lazy.py')
-rw-r--r-- | pylint/test/functional/logging_not_lazy.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pylint/test/functional/logging_not_lazy.py b/pylint/test/functional/logging_not_lazy.py index b843431e4..98eaee08e 100644 --- a/pylint/test/functional/logging_not_lazy.py +++ b/pylint/test/functional/logging_not_lazy.py @@ -1,17 +1,22 @@ -# pylint: disable=missing-docstring,no-member,deprecated-method +# pylint: disable=missing-docstring,no-member,deprecated-method,invalid-name # Muck up the names in an effort to confuse... import logging as renamed_logging import os as logging +var = "123" # Statements that should be flagged: renamed_logging.warn('%s, %s' % (4, 5)) # [logging-not-lazy] renamed_logging.exception('%s' % 'Exceptional!') # [logging-not-lazy] renamed_logging.log(renamed_logging.INFO, 'msg: %s' % 'Run!') # [logging-not-lazy] +renamed_logging.log(renamed_logging.INFO, "Var: " + var) # [logging-not-lazy] +var_name = 'Var:' # Statements that should not be flagged: renamed_logging.warn('%s, %s', 4, 5) renamed_logging.log(renamed_logging.INFO, 'msg: %s', 'Run!') renamed_logging.warn('%s' + ' the rest of a single string') +renamed_logging.log(renamed_logging.INFO, var_name + var) logging.warn('%s, %s' % (4, 5)) logging.log(logging.INFO, 'msg: %s' % 'Run!') +logging.log("Var: " + var) |