Skip to content

Commit af62317

Browse files
replace black with ruff
1 parent 5d0d704 commit af62317

7 files changed

Lines changed: 11 additions & 15 deletions

File tree

.github/workflows/checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ jobs:
4343
- name: Install Dependencies
4444
run: poetry install
4545

46-
- name: Run Black
47-
run: poetry run task black --check
46+
- name: Run format
47+
run: poetry run task format --check
4848

4949
- name: Run safety
5050
run: poetry export -f requirements.txt | poetry run safety check --bare --stdin

lib/binarylane/errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Contains shared errors types that can be raised from API functions """
1+
"""Contains shared errors types that can be raised from API functions"""
22

33
from __future__ import annotations
44

lib/binarylane/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Contains some shared types for properties """
1+
"""Contains some shared types for properties"""
22

33
from __future__ import annotations
44

pyproject.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,13 @@ ruff = "^0.9.6"
2929

3030
[tool.taskipy.tasks]
3131
generate = "python scripts/generate.py"
32-
black = "black ."
32+
format = "ruff format ."
3333
isort = "ruff check --select I . --fix"
3434
mypy = "mypy ."
3535
ruff = "ruff check src"
3636
safety = "poetry export -f requirements.txt | safety check --bare --stdin"
3737
test = "pytest tests"
38-
check = "task isort && task black && task mypy && task ruff && task test && task safety"
39-
40-
[tool.black]
41-
line-length = 120
42-
target_version = ["py37"]
38+
check = "task isort && task format && task mypy && task ruff && task test && task safety"
4339

4440
[tool.ruff]
4541
# Always generate Python 3.8-compatible code.

src/binarylane/console/parser/list_attribute.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ def configure(self, parser: Parser) -> None:
7676
parser.add_group_help(title=self.title, description=self.description, entries=usage_descriptions)
7777

7878
parser.add_keyword(self.keyword)
79-
parser.add_argument(self.attribute_name, type=str, nargs=argparse.PARSER, help=argparse.SUPPRESS).required = (
80-
False
81-
)
79+
parser.add_argument(
80+
self.attribute_name, type=str, nargs=argparse.PARSER, help=argparse.SUPPRESS
81+
).required = False
8282

8383
def _create_singlestore_action(self, **kwargs: Any) -> argparse.Action:
8484
action = SingleStoreAction(**kwargs)

src/binarylane/pycompat/actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" BooleanOptionalAction imported from 3.9 """
1+
"""BooleanOptionalAction imported from 3.9"""
22

33
from __future__ import annotations
44

tests/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
""" This package contains some "frozen" and/or simplified replicas of BinaryLane API model objects """
1+
"""This package contains some "frozen" and/or simplified replicas of BinaryLane API model objects"""
22

33
from __future__ import annotations

0 commit comments

Comments
 (0)