From 0e87b16edf27d98017d30f756f5fc5ece98b0752 Mon Sep 17 00:00:00 2001 From: janbridley Date: Tue, 28 May 2024 12:24:00 -0400 Subject: [PATCH] Remove references to yapf --- .vscode/settings.json | 5 ++--- doc/style.rst | 22 ++++++++++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 71bf41a8..ad39eaef 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -28,7 +28,6 @@ "python.linting.flake8Enabled": true, "python.linting.pycodestyleEnabled": false, "python.linting.pylintEnabled": false, - "python.formatting.provider": "yapf", "cSpell.allowCompoundWords": true, "files.exclude": { ".cache": true, @@ -75,6 +74,7 @@ "pylint", "pyside", "pytest", + "ruff", "spherocylinder", "spherocylinders", "spheropolygons", @@ -84,7 +84,6 @@ "twxs", "uint", "unmap", - "verts", - "yapf" + "verts" ] } diff --git a/doc/style.rst b/doc/style.rst index aebec4a6..42d1ead9 100644 --- a/doc/style.rst +++ b/doc/style.rst @@ -20,26 +20,28 @@ Python ------ Python code in GSD should follow `PEP8`_ with the formatting performed by -`yapf`_ (configuration in ``setup.cfg``). Code should pass all **flake8** tests -and formatted by **yapf**. +`ruff`_ (configuration in ``ruff.toml``). Code should pass all **ruff** linter checks. .. _PEP8: https://www.python.org/dev/peps/pep-0008 -.. _yapf: https://github.com/google/yapf +.. _ruff: https://github.com/astral-sh/ruff Tools ^^^^^ -* Linter: `flake8 `_ +* Linter: `ruff `_ - * `flake8-docstrings `_ - * `flake8-rst-docstrings `_ + * `D `_ + * `E, W `_ + * `F `_ + * `N `_ + * `NPY `_ + * `RUF200 `_ - * Configure flake8 in your editor to see violations on save. + * The ``ruff.toml`` included with the package automatically configures these rules. -* Autoformatter: `yapf `_ +* Autoformatter: `ruff `_ * Run: ``pre-commit run --all-files`` to apply style changes to the whole repository.