describe requires-python fallback in docs (#16704)

Adds description of `requires-python` fallback to documentation for
configuration file discovery.

---------

Co-authored-by: Micha Reiser <micha@reiser.io>
Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
This commit is contained in:
Dylan 2025-03-13 11:48:12 -05:00 committed by GitHub
parent abaa18993b
commit b9b256209b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 15 additions and 2 deletions

View file

@ -312,7 +312,9 @@ pub struct Options {
/// ```
///
/// If both are specified, `target-version` takes precedence over
/// `requires-python`.
/// `requires-python`. See [_Inferring the Python version_](https://docs.astral.sh/ruff/configuration/#inferring-the-python-version)
/// for a complete description of how the `target-version` is determined
/// when left unspecified.
///
/// Note that a stub file can [sometimes make use of a typing feature](https://typing.readthedocs.io/en/latest/spec/distributing.html#syntax)
/// before it is available at runtime, as long as the stub does not make