diff --git a/examples/pure-hatch/pyproject.toml b/examples/pure-hatch/pyproject.toml index c29ad063..d0a0bb42 100644 --- a/examples/pure-hatch/pyproject.toml +++ b/examples/pure-hatch/pyproject.toml @@ -62,7 +62,7 @@ plot = ["bokeh"] test = ["pytest", "pytest-cov"] docs = ["sphinx", "pydata-sphinx-theme"] -[tool.ruff] +[tool.ruff.lint] select = [ "E", # pycodestyle errors "W", # pycodestyle warnings @@ -70,7 +70,7 @@ select = [ "I", # isort ] -[tool.ruff.isort] +[tool.ruff.lint.isort] known-first-party = ["examplePy"] [tool.pytest.ini_options] @@ -86,7 +86,7 @@ dependency-groups = [ ] [tool.hatch.envs.test.scripts] -run = "pytest {args:--cov=test --cov-report=term-missing --cov-report=xml}" +run = "pytest {args:--cov=examplePy --cov-report=term-missing --cov-report=xml}" [[tool.hatch.envs.test.matrix]] python = ["3.10", "3.11", "3.12"] diff --git a/package-structure-code/code-style-linting-format.md b/package-structure-code/code-style-linting-format.md index a14b2b29..5946ce25 100644 --- a/package-structure-code/code-style-linting-format.md +++ b/package-structure-code/code-style-linting-format.md @@ -209,15 +209,15 @@ Here is a simple configuration to get started with `ruff`. It would go into your :::{literalinclude} ../examples/pure-hatch/pyproject.toml :language: toml -:start-at: [tool.ruff] -:end-before: [tool.ruff.isort] +:start-at: [tool.ruff.lint] +:end-before: [tool.ruff.lint.isort] ::: Depending on your project, you might want to add the following to sort imports correctly: :::{literalinclude} ../examples/pure-hatch/pyproject.toml :language: toml -:start-at: [tool.ruff.isort] +:start-at: [tool.ruff.lint.isort] :end-before: [tool.pytest.ini_options] ::: diff --git a/package-structure-code/declare-dependencies.md b/package-structure-code/declare-dependencies.md index 3423636c..e74fc2e6 100644 --- a/package-structure-code/declare-dependencies.md +++ b/package-structure-code/declare-dependencies.md @@ -373,7 +373,7 @@ You can also create combined groups that reference other groups: :::{literalinclude} ../examples/pure-hatch/pyproject.toml :language: toml :start-at: [project.optional-dependencies] -:end-before: [tool.ruff] +:end-before: [tool.ruff.lint] ::: Then install everything with pip install or uv sync as needed: