---
source: crates/ruff_linter/src/rules/pylint/mod.rs
---
bad_string_format_character.py:5:1: PLE1300 Unsupported format character 'z'
  |
3 | ## Old style formatting
4 |
5 | "%s %z" % ("hello", "world")  # [bad-format-character]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PLE1300
6 |
7 | "%s" "%z" % ("hello", "world")  # [bad-format-character]
  |

bad_string_format_character.py:7:1: PLE1300 Unsupported format character 'z'
  |
5 | "%s %z" % ("hello", "world")  # [bad-format-character]
6 |
7 | "%s" "%z" % ("hello", "world")  # [bad-format-character]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PLE1300
8 |
9 | """%s %z""" % ("hello", "world")  # [bad-format-character]
  |

bad_string_format_character.py:9:1: PLE1300 Unsupported format character 'z'
   |
 7 | "%s" "%z" % ("hello", "world")  # [bad-format-character]
 8 |
 9 | """%s %z""" % ("hello", "world")  # [bad-format-character]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PLE1300
10 |
11 | """%s""" """%z""" % ("hello", "world")  # [bad-format-character]
   |

bad_string_format_character.py:11:1: PLE1300 Unsupported format character 'z'
   |
 9 | """%s %z""" % ("hello", "world")  # [bad-format-character]
10 |
11 | """%s""" """%z""" % ("hello", "world")  # [bad-format-character]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PLE1300
12 |
13 | ## New style formatting
   |

bad_string_format_character.py:15:1: PLE1300 Unsupported format character 'y'
   |
13 | ## New style formatting
14 |
15 | "{:s} {:y}".format("hello", "world")  # [bad-format-character]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PLE1300
16 |
17 | "{:*^30s}".format("centered") # OK
   |

bad_string_format_character.py:19:1: PLE1300 Unsupported format character 'y'
   |
17 | "{:*^30s}".format("centered") # OK
18 | "{:{s}}".format("hello", s="s")  # OK (nested placeholder value not checked)
19 | "{:{s:y}}".format("hello", s="s")  # [bad-format-character] (nested placeholder format spec checked)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PLE1300
20 | "{0:.{prec}g}".format(1.23, prec=15)  # OK (cannot validate after nested placeholder)
21 | "{0:.{foo}{bar}{foobar}y}".format(...)  # OK (cannot validate after nested placeholders)
   |
