Pin to max Python 3.12, move around some ruff config

Note that the Docker image we use has Python 3.11, so functions will
always run with that version regardless of whether you have 3.12
locally. (Unless you choose to use a different base image.)

The ruff config tweaks are because they moved some config around with a
newer version that was updated by renovate a while back.

Signed-off-by: Nic Cope <nicc@rk0n.org>
This commit is contained in:
Nic Cope 2024-08-08 14:49:29 -07:00
parent 687024f125
commit 15bc3aecd1
1 changed files with 5 additions and 2 deletions

View File

@ -6,7 +6,7 @@ build-backend = "hatchling.build"
name = "function"
description = 'A composition function'
readme = "README.md"
requires-python = ">=3.11"
requires-python = ">=3.11,<3.13"
license = "Apache-2.0"
keywords = []
authors = [{ name = "Crossplane Maintainers", email = "info@crossplane.io" }]
@ -14,6 +14,7 @@ classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
@ -66,6 +67,8 @@ unit = "python -m unittest tests/*.py"
[tool.ruff]
target-version = "py311"
exclude = ["function/proto/*"]
[tool.ruff.lint]
select = [
"A",
"ARG",
@ -101,7 +104,7 @@ ignore = ["ISC001"] # Ruff warns this is incompatible with ruff format.
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D"] # Don't require docstrings for tests.
[tool.ruff.isort]
[tool.ruff.lint.isort]
known-first-party = ["function"]
[tool.ruff.lint.pydocstyle]