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

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

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

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

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

PLE1300 Unsupported format character 'y'
  --> bad_string_format_character.py:19:1
   |
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)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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)
   |
