diff options
author | Matus Valo <matusvalo@users.noreply.github.com> | 2022-05-15 23:40:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-15 23:40:44 +0200 |
commit | 62a0e88515c46c4c80dc41836cfa662a86a6a323 (patch) | |
tree | 012a40daefa004cc75f8f21f7d07a1d13093a96a | |
parent | 9699ec15511fc92d7aa1ada36ceaa0e72e3ff2a4 (diff) | |
download | pylint-git-62a0e88515c46c4c80dc41836cfa662a86a6a323.tar.gz |
Added logging-too-many-args message example (#6621)
-rw-r--r-- | doc/data/messages/l/logging-too-many-args/bad.py | 7 | ||||
-rw-r--r-- | doc/data/messages/l/logging-too-many-args/good.py | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/doc/data/messages/l/logging-too-many-args/bad.py b/doc/data/messages/l/logging-too-many-args/bad.py new file mode 100644 index 000000000..f94222aa4 --- /dev/null +++ b/doc/data/messages/l/logging-too-many-args/bad.py @@ -0,0 +1,7 @@ +import logging + +try: + function() +except Exception as e: + logging.error('Error occured: %s', type(e), e) # [logging-too-many-args] + raise diff --git a/doc/data/messages/l/logging-too-many-args/good.py b/doc/data/messages/l/logging-too-many-args/good.py new file mode 100644 index 000000000..3772c59b2 --- /dev/null +++ b/doc/data/messages/l/logging-too-many-args/good.py @@ -0,0 +1,7 @@ +import logging + +try: + function() +except Exception as e: + logging.error('%s error occured: %s', type(e), e) + raise |