Skip to content

Commit

Permalink
style: configure creosote
Browse files Browse the repository at this point in the history
  • Loading branch information
dvp committed Jan 20, 2025
1 parent 8942335 commit b83f4e6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ repos:
- id: pydocstringformatter
exclude: _parser\.py$|_tab\.py|extern

- repo: https://github.com/fredrikaverpil/creosote
rev: v4.0.0
hooks:
- id: creosote
args:
- '--path=src'
- '--deps-file=pyproject.toml'
- '--section=project.dependencies'

- repo: local
hooks:
# Upgrade Python code
Expand Down
22 changes: 13 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build-system]
requires = ["poetry-core >= 2.0.0, <3.0.0"]
build-backend = "poetry.core.masonry.api"

[project]
name = "mapstp"
dynamic = ["version", "classifiers"]
Expand Down Expand Up @@ -25,10 +29,6 @@ repository = "https://github.com/MC-kit/map-stp"
[project.scripts]
mapstp = "mapstp.cli.runner:mapstp"

[build-system]
requires = ["poetry-core >= 2.0.0, <3.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
version = "1.0.2a0"
packages = [{ include = "mapstp", from = "src" }]
Expand All @@ -51,13 +51,9 @@ classifiers = [
"Topic :: Scientific/Engineering :: Physics",
]




[tool.poetry.dependencies]
python = ">=3.10,<3.14"


[tool.poetry.group.dev.dependencies]
Pygments = ">=2.10.0"
nox = ">=2022.1.7"
Expand Down Expand Up @@ -481,7 +477,7 @@ ignore = [


[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402"]
"**/__init__.py" = ["E402"]
"benchmarks/*" = ["S101"]
"noxfile.py" = ["ANN"]
"cli/*" = ["ANN001"]
Expand Down Expand Up @@ -534,3 +530,11 @@ docstring-code-format = true
# https://jupytext.readthedocs.io/en/latest/config.html
# Pair ipynb notebooks to py:percent text notebooks
formats = "ipynb,md,py:percent"

[tool.creosote]
paths = ["src", "adhoc"]
deps-file = "pyproject.toml"
sections = ["project.dependencies"]
exclude-deps = [
"openpyxl",
]

0 comments on commit b83f4e6

Please sign in to comment.