Skip to content

Commit 43a7af1

Browse files
committed
Remove yapf in favor of ruff
1 parent ec12aae commit 43a7af1

File tree

7 files changed

+197
-174
lines changed

7 files changed

+197
-174
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ In order to make it easier to contribute, core developers of this project:
88
* maintain a set of unit tests
99
* maintain a set of integration tests (run with a production cloud)
1010
* maintain development automation tools using [nox](https://github.com/theacodes/nox) that can easily:
11-
* format the code using [yapf](https://github.com/google/yapf) and [ruff](https://github.com/astral-sh/ruff)
11+
* format the code using [ruff](https://github.com/astral-sh/ruff)
1212
* runs linters to find subtle/potential issues with maintainability
1313
* run the test suite on multiple Python versions using [pytest](https://github.com/pytest-dev/pytest)
1414
* maintain Continuous Integration (by using GitHub Actions) that:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove yapf in favor of ruff.

doc/source/contributing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ We encourage outside contributors to perform changes on our codebase. Many such
1212
* maintain a set of integration tests (run with a production cloud)
1313
* maintain development automation tools using `nox <https://github.com/theacodes/nox>`_ that can easily:
1414

15-
* format the code using `yapf <https://github.com/google/yapf>`_
15+
* format the code using `ruff <https://github.com/astral-sh/ruff>`_
1616
* runs linters to find subtle/potential issues with maintainability
1717
* run the test suite on multiple Python versions using `pytest <https://github.com/pytest-dev/pytest>`_
1818

noxfile.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,8 @@ def skip_coverage(python_version: str | None) -> bool:
8181
def format_(session):
8282
"""Lint the code and apply fixes in-place whenever possible."""
8383
pdm_install(session, 'lint')
84-
# TODO: incremental mode for yapf
85-
session.run('yapf', '--in-place', '--parallel', '--recursive', *PY_PATHS)
8684
session.run('ruff', 'check', '--fix', *PY_PATHS)
85+
session.run('ruff', 'format', *PY_PATHS)
8786
# session.run(
8887
# 'docformatter',
8988
# '--in-place',
@@ -99,8 +98,8 @@ def lint(session):
9998
"""Run linters in readonly mode."""
10099
# We need to install 'doc' group because liccheck needs to inspect it.
101100
pdm_install(session, 'doc', 'lint', 'full')
102-
session.run('yapf', '--diff', '--parallel', '--recursive', *PY_PATHS)
103101
session.run('ruff', 'check', *PY_PATHS)
102+
session.run('ruff', 'format', *PY_PATHS)
104103
# session.run(
105104
# 'docformatter',
106105
# '--check',

pdm.lock

+189-158
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+2-4
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,10 @@ source = "scm"
149149

150150
[tool.pdm.dev-dependencies]
151151
format = [
152-
"yapf==0.27",
153-
"ruff==0.1.15",
152+
"ruff~=0.8.4",
154153
]
155154
lint = [
156-
"yapf==0.27",
157-
"ruff==0.1.15",
155+
"ruff~=0.8.4",
158156
"pytest>=8.3.3",
159157
"liccheck==0.9.2",
160158
"setuptools",

setup.cfg

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
[yapf]
2-
based_on_style=facebook
3-
COLUMN_LIMIT=100
4-
SPACE_BETWEEN_ENDING_COMMA_AND_CLOSING_BRACKET=False
5-
SPLIT_PENALTY_AFTER_OPENING_BRACKET=0
6-
71
[coverage:run]
8-
branch=true
2+
branch=true

0 commit comments

Comments
 (0)