element-hq / element-hq/synapse
Turn on the `pyupgrade` lint rules for `ruff`
Open
python
T-Task
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
@sandhose mentioned that we can enable the [`pyupgrade` lint rules](https://docs.astral.sh/ruff/rules/#pyupgrade-up) in `ruff` in order to be warned about using old syntax when updating our [minimum python version](https://github.com/element-hq/synapse/blob/5143f93dc9d1580ea17df155cca1e71a1ae4f5f4/pyproject.toml#L162).
This change was motivated by Python 3.9's upcoming end-of-life on October 31st, 2025.
Related: https://github.com/element-hq/synapse/issues/9744, which mentions [pyupgrade](https://github.com/asottile/pyupgrade), a tool that can be used to perform syntax updates automatically.
Contributor guide
Assessment
This issue has not been assessed yet.