Skip to content

Commit

Permalink
Update pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Sep 30, 2024
1 parent 3615841 commit e3af97e
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 42 deletions.
28 changes: 20 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,55 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.1
rev: v0.6.8
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.1.1
rev: 24.8.0
hooks:
- id: black

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: forbid-submodules
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.2
hooks:
- id: check-github-workflows

- repo: https://github.com/rhysd/actionlint
rev: v1.7.2
hooks:
- id: actionlint

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.7.0
rev: 2.2.4
hooks:
- id: pyproject-fmt

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.16
rev: v0.20.2
hooks:
- id: validate-pyproject

- repo: https://github.com/tox-dev/tox-ini-fmt
rev: 1.3.1
rev: 1.4.1
hooks:
- id: tox-ini-fmt

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.3.3
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=88]
Expand Down
64 changes: 30 additions & 34 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ keywords = [
"strava",
"visualisation",
]
license = {text = "MIT"}
maintainers = [{name = "Hugo van Kemenade"}]
authors = [{name = "Marcus Volz"}]
license = { text = "MIT" }
maintainers = [ { name = "Hugo van Kemenade" } ]
authors = [ { name = "Marcus Volz" } ]
requires-python = ">=3.8"
classifiers = [
"Development Status :: 3 - Alpha",
Expand All @@ -34,9 +34,7 @@ classifiers = [
"Topic :: Multimedia :: Graphics",
"Topic :: Scientific/Engineering :: Visualization",
]
dynamic = [
"version",
]
dynamic = [ "version" ]
dependencies = [
"calmap>=0.0.11",
"fit2gpx",
Expand All @@ -46,13 +44,11 @@ dependencies = [
"plotnine",
"rich",
"seaborn",
'setuptools; python_version >= "3.12"', # TODO Remove when https://github.com/MarvinT/calmap/issues/22 is fixed
"setuptools; python_version>='3.12'", # TODO Remove when https://github.com/MarvinT/calmap/issues/22 is fixed
]
[project.urls]
Homepage = "https://github.com/marcusvolz/strava_py"
Source = "https://github.com/marcusvolz/strava_py"
[project.scripts]
stravavis = "stravavis.cli:main"
urls.Homepage = "https://github.com/marcusvolz/strava_py"
urls.Source = "https://github.com/marcusvolz/strava_py"
scripts.stravavis = "stravavis.cli:main"

[tool.hatch]
version.source = "vcs"
Expand All @@ -63,28 +59,28 @@ local_scheme = "no-local-version"
[tool.ruff]
fix = true

[tool.ruff.lint]
select = [
"C4", # flake8-comprehensions
"E", # pycodestyle errors
"EM", # flake8-errmsg
"F", # pyflakes errors
"I", # isort
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"PGH", # pygrep-hooks
lint.select = [
"C4", # flake8-comprehensions
"E", # pycodestyle errors
"EM", # flake8-errmsg
"F", # pyflakes errors
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"PGH", # pygrep-hooks
"RUF022", # unsorted-dunder-all
"RUF100", # unused noqa (yesqa)
"UP", # pyupgrade
"W", # pycodestyle warnings
"YTT", # flake8-2020
"UP", # pyupgrade
"W", # pycodestyle warnings
"YTT", # flake8-2020
]
extend-ignore = [
"E203", # Whitespace before ':'
"E221", # Multiple spaces before operator
"E226", # Missing whitespace around arithmetic operator
"E241", # Multiple spaces after ','
lint.ignore = [
"E203", # Whitespace before ':'
"E221", # Multiple spaces before operator
"E226", # Missing whitespace around arithmetic operator
"E241", # Multiple spaces after ','
"UP038", # Makes code slower and more verbose
]

[tool.ruff.lint.isort]
known-first-party = ["stravavis"]
required-imports = ["from __future__ import annotations"]
lint.isort.known-first-party = [ "stravavis" ]
lint.isort.required-imports = [ "from __future__ import annotations" ]

0 comments on commit e3af97e

Please sign in to comment.