diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f7db156..e6abfe7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,30 +3,21 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: - - id: check-yaml - id: check-added-large-files - - id: trailing-whitespace - exclude: ".*(galleria|photoswipe|jquery|leaflet).*$" + - id: check-merge-conflict + - id: check-yaml - id: end-of-file-fixer exclude: ".*(galleria|photoswipe|jquery|leaflet).*$" - -- repo: https://github.com/asottile/pyupgrade - rev: v3.3.1 - hooks: - - id: pyupgrade - args: ["--py38-plus"] - -- repo: https://github.com/timothycrosley/isort - rev: 5.12.0 - hooks: - - id: isort + - id: trailing-whitespace + exclude: ".*(galleria|photoswipe|jquery|leaflet).*$" - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 23.3.0 hooks: - id: black - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: 'v0.0.246' + rev: v0.0.270 hooks: - id: ruff + args: [ --fix, --show-fixes, --exit-non-zero-on-fix ] diff --git a/pyproject.toml b/pyproject.toml index 6e43f47..2e24a2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=64", "wheel", "setuptools_scm[toml]>=3.4"] +requires = ["setuptools>=64", "setuptools_scm[toml]>=3.4"] build-backend = "setuptools.build_meta" [project] @@ -23,7 +23,6 @@ classifiers = [ "Topic :: Multimedia :: Graphics :: Viewers", "Topic :: Software Development :: Libraries :: Python Modules", ] -urls = {Homepage = "https://github.com/saimn/sigal"} requires-python = ">=3.8" dependencies = [ "blinker", @@ -44,6 +43,10 @@ docs = ["Sphinx>=4.1.0", "alabaster", "cryptography"] [project.scripts] sigal = "sigal:main" +[project.urls] +repository = "https://github.com/saimn/sigal" +documentation = "http://sigal.saimon.org/en/latest/" + [tool.setuptools] include-package-data = true license-files = ["LICENSE"] @@ -59,12 +62,20 @@ write_to = "src/sigal/version.py" line-length = 88 target-version = ['py38'] -[tool.isort] -profile = "black" - [tool.ruff] -select = ["E", "F"] +target-version = "py38" +select = [ + "E", "F", "W", # flake8 + "I", # isort + "UP", # pyupgrade +] ignore = ["E731"] +unfixable = [ + "F841", # Removes unused variables +] + +[tool.ruff.isort] +known-first-party = ["sigal"] [tool.coverage.run] source = ["sigal"]