diff options
Diffstat (limited to 'doc/data/messages/l')
13 files changed, 14 insertions, 11 deletions
diff --git a/doc/data/messages/l/locally-disabled/bad.py b/doc/data/messages/l/locally-disabled/bad.py index 5bfbd58f8..1a3307856 100644 --- a/doc/data/messages/l/locally-disabled/bad.py +++ b/doc/data/messages/l/locally-disabled/bad.py @@ -3,5 +3,6 @@ def wizard_spells(spell_book): for spell in spell_book: print(f"Abracadabra! {spell}.") + spell_list = ["Levitation", "Invisibility", "Fireball", "Teleportation"] wizard_spells(spell_list) diff --git a/doc/data/messages/l/locally-disabled/good.py b/doc/data/messages/l/locally-disabled/good.py index 322a78f27..1bf60bca0 100644 --- a/doc/data/messages/l/locally-disabled/good.py +++ b/doc/data/messages/l/locally-disabled/good.py @@ -2,5 +2,6 @@ def wizard_spells(spell_book): for spell in spell_book: print(f"Abracadabra! {spell}.") + spell_list = ["Levitation", "Invisibility", "Fireball", "Teleportation"] wizard_spells(spell_list) diff --git a/doc/data/messages/l/logging-format-interpolation/bad.py b/doc/data/messages/l/logging-format-interpolation/bad.py index 0cef831d2..dd828e1f9 100644 --- a/doc/data/messages/l/logging-format-interpolation/bad.py +++ b/doc/data/messages/l/logging-format-interpolation/bad.py @@ -1,4 +1,5 @@ import logging import sys -logging.error('Python version: {}'.format(sys.version)) # [logging-format-interpolation] +# +1: [logging-format-interpolation] +logging.error("Python version: {}".format(sys.version)) diff --git a/doc/data/messages/l/logging-format-interpolation/good.py b/doc/data/messages/l/logging-format-interpolation/good.py index 7f54cebfb..a993d0dd8 100644 --- a/doc/data/messages/l/logging-format-interpolation/good.py +++ b/doc/data/messages/l/logging-format-interpolation/good.py @@ -1,4 +1,4 @@ import logging import sys -logging.error('Python version: %s', sys.version) +logging.error("Python version: %s", sys.version) diff --git a/doc/data/messages/l/logging-fstring-interpolation/bad.py b/doc/data/messages/l/logging-fstring-interpolation/bad.py index dfee6d4c6..773435fb4 100644 --- a/doc/data/messages/l/logging-fstring-interpolation/bad.py +++ b/doc/data/messages/l/logging-fstring-interpolation/bad.py @@ -1,4 +1,4 @@ import logging import sys -logging.error(f'Python version: {sys.version}') # [logging-fstring-interpolation] +logging.error(f"Python version: {sys.version}") # [logging-fstring-interpolation] diff --git a/doc/data/messages/l/logging-fstring-interpolation/good.py b/doc/data/messages/l/logging-fstring-interpolation/good.py index 7f54cebfb..a993d0dd8 100644 --- a/doc/data/messages/l/logging-fstring-interpolation/good.py +++ b/doc/data/messages/l/logging-fstring-interpolation/good.py @@ -1,4 +1,4 @@ import logging import sys -logging.error('Python version: %s', sys.version) +logging.error("Python version: %s", sys.version) diff --git a/doc/data/messages/l/logging-not-lazy/bad.py b/doc/data/messages/l/logging-not-lazy/bad.py index cb6bc3d84..7ba0631db 100644 --- a/doc/data/messages/l/logging-not-lazy/bad.py +++ b/doc/data/messages/l/logging-not-lazy/bad.py @@ -3,5 +3,5 @@ import logging try: function() except Exception as e: - logging.error('Error occurred: %s' % e) # [logging-not-lazy] + logging.error("Error occurred: %s" % e) # [logging-not-lazy] raise diff --git a/doc/data/messages/l/logging-not-lazy/good.py b/doc/data/messages/l/logging-not-lazy/good.py index c61704872..ede0050cb 100644 --- a/doc/data/messages/l/logging-not-lazy/good.py +++ b/doc/data/messages/l/logging-not-lazy/good.py @@ -3,5 +3,5 @@ import logging try: function() except Exception as e: - logging.error('Error occurred: %s', e) + logging.error("Error occurred: %s", e) raise diff --git a/doc/data/messages/l/logging-too-few-args/bad.py b/doc/data/messages/l/logging-too-few-args/bad.py index 66d88d0b3..a20b83b12 100644 --- a/doc/data/messages/l/logging-too-few-args/bad.py +++ b/doc/data/messages/l/logging-too-few-args/bad.py @@ -3,5 +3,5 @@ import logging try: function() except Exception as e: - logging.error('%s error occurred: %s', e) # [logging-too-few-args] + logging.error("%s error occurred: %s", e) # [logging-too-few-args] raise diff --git a/doc/data/messages/l/logging-too-few-args/good.py b/doc/data/messages/l/logging-too-few-args/good.py index 4b34b58b9..4812aec01 100644 --- a/doc/data/messages/l/logging-too-few-args/good.py +++ b/doc/data/messages/l/logging-too-few-args/good.py @@ -3,5 +3,5 @@ import logging try: function() except Exception as e: - logging.error('%s error occurred: %s', type(e), e) + logging.error("%s error occurred: %s", type(e), e) raise diff --git a/doc/data/messages/l/logging-too-many-args/bad.py b/doc/data/messages/l/logging-too-many-args/bad.py index 45f485d93..03753f607 100644 --- a/doc/data/messages/l/logging-too-many-args/bad.py +++ b/doc/data/messages/l/logging-too-many-args/bad.py @@ -3,5 +3,5 @@ import logging try: function() except Exception as e: - logging.error('Error occurred: %s', type(e), e) # [logging-too-many-args] + logging.error("Error occurred: %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 index 4b34b58b9..4812aec01 100644 --- a/doc/data/messages/l/logging-too-many-args/good.py +++ b/doc/data/messages/l/logging-too-many-args/good.py @@ -3,5 +3,5 @@ import logging try: function() except Exception as e: - logging.error('%s error occurred: %s', type(e), e) + logging.error("%s error occurred: %s", type(e), e) raise diff --git a/doc/data/messages/l/logging-unsupported-format/bad.py b/doc/data/messages/l/logging-unsupported-format/bad.py index 5b5ea5a5f..1f36a0d34 100644 --- a/doc/data/messages/l/logging-unsupported-format/bad.py +++ b/doc/data/messages/l/logging-unsupported-format/bad.py @@ -1,3 +1,3 @@ import logging -logging.info("%s %y !", "Hello", "World") # [logging-unsupported-format] +logging.info("%s %y !", "Hello", "World") # [logging-unsupported-format] |