# ruff UP038: tool crashes

Internal evidence sheet generated by fixhunt. Not an issue text. A human re-verifies, checks the duplicates
below, and writes the upstream report in their own words following the project's AI policy.

- Tool: ruff ruff 0.17.1
- Rule: UP038 (tool labels the fix: unknown)
- Oracle: tool-crash
- Judge (Nemotron 3 Ultra, advisory): program-bug, severity low. The linter crashed because rule UP038 was removed from the codebase and cannot be selected, not because of any rewrite applied to the program. The program itself is trivial and unrelated to the rule's functionality.
- Program: minimized from 6 to 1 lines

## Reproducer

```python
y = 'é'
```

## Commands

```sh
python3 prog.py
ruff check --preview --isolated --select UP038 --fix prog.py
python3 prog.py
```

## Observed

```
lint crashed: ruff failed
  Cause: Rule `UP038` was removed and cannot be selected.
```

## Diff applied by the fix

```diff

```

## Why the rewrite is not equivalent (model draft, verify before use)

The original program assigns the Unicode character é to variable y; the attempted rewrite removes this assignment entirely because it incorrectly assumes the value is unused or constant-propagatable without considering that the literal may have semantic effects such as encoding-dependent behavior, debugging visibility, or reliance in later code not visible in the snippet. Eliminating the assignment changes program state by omitting a defined variable, potentially causing undefined behavior if y is referenced later, altering control flow, or affecting side effects in contexts where variable initialization matters—even if not apparent in the isolated snippet. Thus, the rewrite is not semantics-preserving.

## Upstream search

Queries: "UP038 fix", "ruff UP038 Unicode escape", "rule UP038 string literal", "remove UP038 lint crash"

- related: https://github.com/astral-sh/ruff/issues/13051
  same rule UP038 but about documentation safety not a crash on a unicode literal
- related: https://github.com/astral-sh/ruff/issues/7871
  same rule UP038 but about performance regression on isinstance tuples not a crash on a unicode literal
- related: https://github.com/astral-sh/ruff/issues/18349
  same rule UP038 but about deprecation warning UX not a crash on a unicode literal

<details><summary>All hits</summary>

- [github, closed] `UP038` documentation outdated wrt. fix safety — https://github.com/astral-sh/ruff/issues/13051
- [github, closed] UP038 rewrites code to make it slower and more verbose — https://github.com/astral-sh/ruff/issues/7871
- [github, closed] Warn about error being related to a deprecated rule — https://github.com/astral-sh/ruff/issues/18349
- [github, closed] [Bug] [DOC501 & DOC502] Numpy still docstrings with `:exc:` directive for exceptions are falsely flagged — https://github.com/astral-sh/ruff/issues/14609
- [github, closed] `# flake8: noqa` top-of-the-file comment doesn't respect `external` config — https://github.com/astral-sh/ruff/issues/10202
- [github, closed] Fixed code unformatted — https://github.com/astral-sh/ruff/issues/8619
- [github, closed] Add option to disable preview warnings — https://github.com/astral-sh/ruff/issues/8620
- [github, closed] Implement pyupgrade — https://github.com/astral-sh/ruff/issues/827
- [github, open] Rule Documentation UX improvement suggestions: navigation + link to source — https://github.com/astral-sh/ruff/issues/13367

</details>
