Skip to content

Commit

Permalink
Remove references to yapf
Browse files Browse the repository at this point in the history
  • Loading branch information
janbridley committed May 28, 2024
1 parent 4e419c1 commit 0e87b16
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
5 changes: 2 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -75,6 +74,7 @@
"pylint",
"pyside",
"pytest",
"ruff",
"spherocylinder",
"spherocylinders",
"spheropolygons",
Expand All @@ -84,7 +84,6 @@
"twxs",
"uint",
"unmap",
"verts",
"yapf"
"verts"
]
}
22 changes: 12 additions & 10 deletions doc/style.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://flake8.pycqa.org/en/latest/>`_
* Linter: `ruff <https://github.com/astral-sh/ruff`_

* With these plugins:
* With these extensions:

* `pep8-naming <https://github.com/PyCQA/pep8-naming>`_
* `flake8-docstrings <https://gitlab.com/pycqa/flake8-docstrings>`_
* `flake8-rst-docstrings <https://github.com/peterjc/flake8-rst-docstrings>`_
* `D <https://docs.astral.sh/ruff/rules/#pydocstyle-d>`_
* `E, W <https://docs.astral.sh/ruff/rules/#pycodestyle-e-w>`_
* `F <https://docs.astral.sh/ruff/rules/#pyflakes-f>`_
* `N <https://docs.astral.sh/ruff/rules/#pep8-naming-n>`_
* `NPY <https://docs.astral.sh/ruff/rules/#numpy-specific-rules-npy>`_
* `RUF200 <https://docs.astral.sh/ruff/rules/invalid-pyproject-toml>`_

* Configure flake8 in your editor to see violations on save.
* The ``ruff.toml`` included with the package automatically configures these rules.

* Autoformatter: `yapf <https://github.com/google/yapf>`_
* Autoformatter: `ruff <https://github.com/astral-sh/ruff>`_

* Run: ``pre-commit run --all-files`` to apply style changes to the whole
repository.
Expand Down

0 comments on commit 0e87b16

Please sign in to comment.