Skip to content

Commit 089663e

Browse files
authored
Merge pull request #50 from macadmins/remove-black
Remove `black` and standardize on `ruff` for linting and formatting.
2 parents 3378527 + a7df455 commit 089663e

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ test-all:
1717
pytest tests
1818

1919
lint:
20-
black --check src tests
20+
ruff format --check src tests
2121
ruff check src tests
2222

2323
format:
24-
black src tests # You can have it any color you want...
24+
ruff format src tests
2525
ruff check --select I001 --fix src tests # Only fixes import order
2626

2727
build:

docs/contributors/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Before writing code and opening a pull request to add to the project, please ope
2929
Code contributors are required to uphold project standards:
3030

3131
* Consistency with existing SDK interfaces.
32-
* All code conforms to formatting and styling (``black`` and ``ruff`` are used in this project, and are enforced at pull request).
32+
* All code conforms to formatting and styling (``ruff`` is used in this project and is enforced at pull request).
3333
* All changes are documented in the users guides, references, and docstrings.
3434
* Code changes are covered by additional tests (future: this project will not have a full test suite until it comes out of alpha).
3535
* Backwards compatibility is not broken by the contributions (with the exception of the alpha period where breaking changes may be allowed on a case-by-case basis).
@@ -61,7 +61,7 @@ There are two additional ``make`` commands for maintaining your local environmen
6161
Code Quality
6262
^^^^^^^^^^^^
6363

64-
The ``black`` and ``ruff`` tools will enforce formatting standards for the codebase. The settings for these tools are defined in `pyproject.toml <https://github.com/macadmins/jamf-pro-sdk-python/blob/main/pyproject.toml>`_.
64+
The ``ruff`` tool will enforce formatting standards for the codebase. The settings are defined in `pyproject.toml <https://github.com/macadmins/jamf-pro-sdk-python/blob/main/pyproject.toml>`_.
6565

6666
* ``make lint`` will check if your code is compliant with the formatting and linting rules without making changes.
6767
* ``make format`` will edit your code to comply with the formatting and linting rules.

pyproject.toml

+8-5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ classifiers = [
2020
"Programming Language :: Python :: 3.9",
2121
"Programming Language :: Python :: 3.10",
2222
"Programming Language :: Python :: 3.11",
23+
"Programming Language :: Python :: 3.12",
2324
]
2425

2526

@@ -43,7 +44,6 @@ dev = [
4344
"boto3>=1.26.45,<2",
4445
"keyring>=23.13.1",
4546
"polyfactory>=2.1.1,<3",
46-
"black[d]",
4747
"ruff",
4848
"coverage[toml]",
4949
"pytest >= 6",
@@ -77,10 +77,6 @@ version = {attr = "jamf_pro_sdk.__about__.__version__"}
7777
readme = {file = ["README.md"], content-type = "text/markdown"}
7878

7979

80-
[tool.black]
81-
line-length = 100
82-
83-
8480
[tool.ruff]
8581
line-length = 100
8682
target-version = "py39"
@@ -89,6 +85,13 @@ src = [
8985
"tests"
9086
]
9187

88+
[tool.ruff.format]
89+
quote-style = "double"
90+
indent-style = "space"
91+
skip-magic-trailing-comma = false
92+
line-ending = "auto"
93+
docstring-code-format = false
94+
docstring-code-line-length = "dynamic"
9295

9396
[tool.ruff.lint]
9497
select = [

0 commit comments

Comments
 (0)