mirror of
https://fuchsia.googlesource.com/third_party/github.com/pylint-dev/pylint
synced 2024-09-21 16:19:21 +00:00
22 lines
664 B
Python
22 lines
664 B
Python
# pylint: disable-msg=E1101
|
|
"""test checking use of the logging module
|
|
"""
|
|
|
|
__revision__ = ''
|
|
|
|
# Muck up the names in an effort to confuse...
|
|
import logging as renamed_logging
|
|
import os as logging
|
|
|
|
# Statements that should be flagged:
|
|
renamed_logging.warn('%s, %s' % (4, 5))
|
|
renamed_logging.exception('%s' % 'Exceptional!')
|
|
renamed_logging.log(renamed_logging.INFO, 'msg: %s' % 'Run!')
|
|
|
|
# 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')
|
|
logging.warn('%s, %s' % (4, 5))
|
|
logging.log(logging.INFO, 'msg: %s' % 'Run!')
|