Skip to content

Commit d30375d

Browse files
committed
chore: migrate from black to ruff format
1 parent a5aae23 commit d30375d

File tree

5 files changed

+9
-84
lines changed

5 files changed

+9
-84
lines changed

.github/workflows/cicd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ jobs:
3535
ln -s /usr/lib/python-build-standalone/3.11/bin/python3.11 /usr/bin/python
3636
poetry install
3737
38-
- name: Run black
39-
run: poetry run black src tests --check
38+
- name: Run ruff format
39+
run: poetry run ruff format --diff src tests
4040

4141
- name: Run ruff
4242
run: poetry run ruff src tests

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ repos:
99
- id: trailing-whitespace
1010
- repo: local
1111
hooks:
12-
- id: black
13-
name: black
14-
entry: poetry run black src tests
12+
- id: ruff-format
13+
name: ruff format
14+
entry: poetry run ruff format src tests
1515
language: system
1616
types: [python]
1717
pass_filenames: false

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Written in YAML and composed of a single blueprint object or a list of blueprint
244244
| `conflicts` | List of conflicting packages. Corresponds to `Conflicts` entry in `debian/control`. | `[]` |
245245
| `fetch` | A file to download. `tar.gz`, `tar.xz`, `tar`, `zip` and `deb` archives are extracted automatically. | `None` |
246246
| `install` | List of here-documents and files/directories to add to the debian package. | `[]` |
247-
| `script` | List of build instructions templated with jinja2 and interpreted with the default `shell`. | `[]` |
247+
| `script` | List of build instructions templated with jinja2 and interpreted with the default `shell`. | `[]` |
248248

249249
## Development
250250

poetry.lock

Lines changed: 1 addition & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ pytest = "*"
4545
mypy = "*"
4646
taskipy = "*"
4747
pytest-cov = "*"
48-
black = "*"
4948
safety = "*"
5049
types-aiofiles = "*"
5150
types-PyYAML = "*"
@@ -55,29 +54,15 @@ ruff = "*"
5554

5655
[tool.taskipy.tasks]
5756
check = """
58-
black src tests\
59-
&& ruff src tests --fix\
57+
ruff src tests --fix\
58+
&& ruff format src tests\
6059
&& mypy src\
6160
&& pytest --cov src tests\
6261
"""
6362
single_binary_application = """
6463
pyinstaller --onefile src/ops2deb/__main__.py --name ops2deb -s
6564
"""
6665

67-
[tool.black]
68-
line-length = 90
69-
target_version = ['py310']
70-
exclude = '''
71-
(
72-
/(
73-
| \.git
74-
| \.venv
75-
| \.mypy_cache
76-
| src/ops2deb/templates
77-
)/
78-
)
79-
'''
80-
8166
[tool.mypy]
8267
files = "src"
8368
strict = true

0 commit comments

Comments
 (0)