Default to ruff-version from pyproject.toml (#30)

Closes: #9 

Changes the default behavior to:

- Search for a pyproject.toml in the repo root
- Search in project.dependencies and dependency-groups.dev for ruff
- If none is found use latest

Support for requirements.txt files can be added later
This commit is contained in:
Kevin Stillhammer
2024-12-23 11:07:46 +01:00
committed by GitHub
parent cac2f108b2
commit 7a82f1f7e4
15 changed files with 4335 additions and 53 deletions
@@ -0,0 +1,15 @@
[project]
name = "pyproject-dependency-dev-project"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
[dependency-groups]
dev = [
"ruff==0.8.3"
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
@@ -0,0 +1,2 @@
def hello() -> str:
return "Hello from python-project!"
@@ -5,7 +5,7 @@ description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"ruff>=0.6.2",
"ruff==0.6.2",
]
[build-system]