diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 82ce0af1..c1f86231 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,10 +38,11 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: "v0.1.6" hooks: - # Linter - id: ruff types: [file, python] args: [--fix, --show-fixes] + - id: ruff-format + types: [file, python] - repo: https://github.com/codespell-project/codespell rev: "v2.2.6" @@ -50,13 +51,6 @@ repos: types_or: [python, markdown, rst] additional_dependencies: [tomli] - - repo: https://github.com/psf/black-pre-commit-mirror - rev: "23.11.0" - hooks: - - id: black - types: [file, python] - args: [--config=./pyproject.toml] - - repo: https://github.com/adamchainz/blacken-docs rev: "1.16.0" hooks: diff --git a/README.md b/README.md index b5e38d53..87fd9ba1 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ fix docs pythreejs/panel | ⚙️ CI | [![ci-citation](https://github.com/bjlittle/geovista/actions/workflows/ci-citation.yml/badge.svg)](https://github.com/bjlittle/geovista/actions/workflows/ci-citation.yml) [![ci-locks](https://github.com/bjlittle/geovista/actions/workflows/ci-locks.yml/badge.svg)](https://github.com/bjlittle/geovista/actions/workflows/ci-locks.yml) [![ci-manifest](https://github.com/bjlittle/geovista/actions/workflows/ci-manifest.yml/badge.svg)](https://github.com/bjlittle/geovista/actions/workflows/ci-manifest.yml) [![ci-tests](https://github.com/bjlittle/geovista/actions/workflows/ci-tests.yml/badge.svg)](https://github.com/bjlittle/geovista/actions/workflows/ci-tests.yml) [![ci-wheels](https://github.com/bjlittle/geovista/actions/workflows/ci-wheels.yml/badge.svg)](https://github.com/bjlittle/geovista/actions/workflows/ci-wheels.yml) [![pre-commit](https://results.pre-commit.ci/badge/github/bjlittle/geovista/main.svg)](https://results.pre-commit.ci/latest/github/bjlittle/geovista/main) | | 💬 Community | [![Contributor Covenant](https://img.shields.io/badge/contributor%20covenant-2.1-4baaaa.svg)](https://github.com/bjlittle/geovista/blob/main/CODE_OF_CONDUCT.md) [![GH Discussions](https://img.shields.io/badge/github-discussions%20%F0%9F%92%AC-yellow?logo=github&logoColor=lightgrey)](https://github.com/bjlittle/geovista/discussions) | | 📈 Health | [![codecov](https://codecov.io/gh/bjlittle/geovista/branch/main/graph/badge.svg?token=RVVXGP1SD3)](https://codecov.io/gh/bjlittle/geovista) | -| ✨ Meta | [![geovista](https://img.shields.io/badge/%F0%9F%8C%8D-GeoVista-4051b5)](https://github.com/bjlittle/geovista) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![code style - black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![NEP29](https://raster.shields.io/badge/follows-NEP29-orange.png)](https://numpy.org/neps/nep-0029-deprecation_policy.html) [![license - bds-3-clause](https://img.shields.io/github/license/bjlittle/geovista)](https://github.com/bjlittle/geovista/blob/main/LICENSE) [![conda platform](https://img.shields.io/conda/pn/conda-forge/geovista.svg)](https://anaconda.org/conda-forge/geovista) | +| ✨ Meta | [![geovista](https://img.shields.io/badge/%F0%9F%8C%8D-GeoVista-4051b5)](https://github.com/bjlittle/geovista) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![NEP29](https://raster.shields.io/badge/follows-NEP29-orange.png)](https://numpy.org/neps/nep-0029-deprecation_policy.html) [![license - bds-3-clause](https://img.shields.io/github/license/bjlittle/geovista)](https://github.com/bjlittle/geovista/blob/main/LICENSE) [![conda platform](https://img.shields.io/conda/pn/conda-forge/geovista.svg)](https://anaconda.org/conda-forge/geovista) | | 📦 Package | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7608302.svg)](https://doi.org/10.5281/zenodo.7608302) [![conda-forge](https://img.shields.io/conda/vn/conda-forge/geovista?color=orange&label=conda-forge&logo=conda-forge&logoColor=white)](https://anaconda.org/conda-forge/geovista) [![pypi](https://img.shields.io/pypi/v/geovista?color=orange&label=pypi&logo=python&logoColor=white)](https://pypi.org/project/geovista/) [![pypi - python version](https://img.shields.io/pypi/pyversions/geovista.svg?color=orange&logo=python&label=python&logoColor=white)](https://pypi.org/project/geovista/) | | 🧰 Repo | [![commits-since](https://img.shields.io/github/commits-since/bjlittle/geovista/latest.svg)](https://github.com/bjlittle/geovista/commits/main) [![contributors](https://img.shields.io/github/contributors/bjlittle/geovista)](https://github.com/bjlittle/geovista/graphs/contributors) [![release](https://img.shields.io/github/v/release/bjlittle/geovista)](https://github.com/bjlittle/geovista/releases) | | 🛡️ Status | [![scitools](https://img.shields.io/badge/scitools-ownership%20pending-yellow)](https://github.com/bjlittle/geovista/issues/167) | diff --git a/pyproject.toml b/pyproject.toml index fbd043b7..bdc99ebd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,12 +59,6 @@ Issues = "https://github.com/bjlittle/geovista/issues" geovista = "geovista.cli:main" -[tool.black] -line-length = 88 -target-version = ["py310", "py311", "py312"] -include = '\.pyi?$' - - [tool.check-manifest] ignore = [ "src/geovista/_version.py", @@ -113,6 +107,10 @@ src = ["src", "tests"] target-version = "py310" +[tool.ruff.format] +preview = false + + [tool.ruff.lint] ignore = [ # NOTE: Non-permanent exclusions should be added to ".ruff.toml". @@ -131,6 +129,9 @@ ignore = [ # flake8-fixme (FIX) "FIX002", # Line contains TODO, consider resolving the issue. + # flake8-implicit-str-concat (ISC) + "ISC001", # Implicitly concatenate string literals on one line. + # pep8-naming "N806", # Variable name in function should be lowercase. "N999", # Invalid module name.