Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/pure-hatch/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ plot = ["bokeh"]
test = ["pytest", "pytest-cov"]
docs = ["sphinx", "pydata-sphinx-theme"]

[tool.ruff]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes. "E" + "W" + "F" + "C90" (mccabe complexity) is equivalent to flake8
"I", # isort
]

[tool.ruff.isort]
[tool.ruff.lint.isort]
known-first-party = ["examplePy"]

[tool.pytest.ini_options]
Expand All @@ -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"]
6 changes: 3 additions & 3 deletions package-structure-code/code-style-linting-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
:::

Expand Down
2 changes: 1 addition & 1 deletion package-structure-code/declare-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading