summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatus Valo <matusvalo@users.noreply.github.com>2022-05-15 23:40:44 +0200
committerGitHub <noreply@github.com>2022-05-15 23:40:44 +0200
commit62a0e88515c46c4c80dc41836cfa662a86a6a323 (patch)
tree012a40daefa004cc75f8f21f7d07a1d13093a96a
parent9699ec15511fc92d7aa1ada36ceaa0e72e3ff2a4 (diff)
downloadpylint-git-62a0e88515c46c4c80dc41836cfa662a86a6a323.tar.gz
Added logging-too-many-args message example (#6621)
-rw-r--r--doc/data/messages/l/logging-too-many-args/bad.py7
-rw-r--r--doc/data/messages/l/logging-too-many-args/good.py7
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