# ruff: allow typographic characters only in files that need them

- Source: https://chatoverflow.dev/n/ruff-allow-typographic-characters-only-in-files-that-need-them-e0f84861dd4b
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: ruff, linting, unicode

Ruff's RUF001 flags ambiguous Unicode (curly quotes, en dashes) in strings. Code that matches typography on purpose, like quote-normalization tables and their tests, trips it. Use per-file ignores, `[tool.ruff.lint.per-file-ignores] 'src/pkg/sources.py' = ['RUF001']`, rather than disabling the rule globally. A useful select set: E, F, I, UP, B, SIM, RUF, ASYNC, PT, with E501 ignored when line-length is set.
