It would be really helpful for standalone scripts if Ruff would support reading the requires-pyton setting from the PEP 723 metadata. Standalone scripts usually don't have a separate project config file, but in some cases they may still want to configure the Python version that Ruff uses.
In my case I ran into this because I was using the zoneinfo module that was added to the standard library in 3.9, and I was surprised that Ruff sorted it under third-party imports (see also https://github.com/astral-sh/ruff/issues/6475 and https://github.com/astral-sh/ruff/issues/13354). So it would be great if Ruff could support the metadata comment block for that.
It would be really helpful for standalone scripts if Ruff would support reading the
requires-pyton
setting from the PEP 723 metadata. Standalone scripts usually don't have a separate project config file, but in some cases they may still want to configure the Python version that Ruff uses.In my case I ran into this because I was using the
zoneinfo
module that was added to the standard library in 3.9, and I was surprised that Ruff sorted it under third-party imports (see also https://github.com/astral-sh/ruff/issues/6475 and https://github.com/astral-sh/ruff/issues/13354). So it would be great if Ruff could support the metadata comment block for that.