Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/data/messages/l/logging-not-lazy/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import logging

try:
function()
except Exception as e:
logging.error('Error occured: %s' % e) # [logging-not-lazy]
raise
2 changes: 2 additions & 0 deletions doc/data/messages/l/logging-not-lazy/details.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Another reasonable option is to use f-string. If you want to do that, you need to enable
Comment thread
Pierre-Sassoulas marked this conversation as resolved.
Outdated
``logging-not-lazy`` and disable ``logging-fstring-interpolation``.
7 changes: 7 additions & 0 deletions doc/data/messages/l/logging-not-lazy/good.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import logging

try:
function()
except Exception as e:
logging.error('Error occured: %s', e)
raise
2 changes: 2 additions & 0 deletions doc/data/messages/l/logging-not-lazy/related.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `logging variable data <https://docs.python.org/3/howto/logging.html#logging-variable-data>`_
Comment thread
Pierre-Sassoulas marked this conversation as resolved.
Outdated
- `rational <https://stackoverflow.com/questions/34619790>`_
Comment thread
Pierre-Sassoulas marked this conversation as resolved.
Outdated
โšก