diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 1c3092b9..b6cfcc68 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -43,8 +43,8 @@ jobs: - name: Install Dependencies run: poetry install - - name: Run Black - run: poetry run task black --check + - name: Run format + run: poetry run task format --check - name: Run safety run: poetry export -f requirements.txt | poetry run safety check --bare --stdin diff --git a/lib/binarylane/errors.py b/lib/binarylane/errors.py index e308625a..fbd1944b 100644 --- a/lib/binarylane/errors.py +++ b/lib/binarylane/errors.py @@ -1,4 +1,4 @@ -""" Contains shared errors types that can be raised from API functions """ +"""Contains shared errors types that can be raised from API functions""" from __future__ import annotations diff --git a/lib/binarylane/types.py b/lib/binarylane/types.py index df55a250..2425f3b1 100644 --- a/lib/binarylane/types.py +++ b/lib/binarylane/types.py @@ -1,4 +1,4 @@ -""" Contains some shared types for properties """ +"""Contains some shared types for properties""" from __future__ import annotations diff --git a/poetry.lock b/poetry.lock index 6ee00f35..4dfdae07 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1227,4 +1227,4 @@ zstd = ["zstandard (>=0.18.0)"] [metadata] lock-version = "2.0" python-versions = "^3.8.1" -content-hash = "20ee4dbf92246f9decd351002e8be22f3e73ab0688be394ba56cdcb0d5d7e8f4" +content-hash = "702d76038105d72a98615db90efdc42507a552da120cbed7210dd509a2f6610b" diff --git a/pyproject.toml b/pyproject.toml index 1281cb60..87e2d3bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,6 @@ bl = "binarylane.console.__main__:main" [tool.poetry.group.dev.dependencies] taskipy = "^1.10.3" -black = "*" mypy = "*" types-python-dateutil = "^2.8.19" pytest = "^7.2.0" @@ -29,17 +28,13 @@ ruff = "^0.9.6" [tool.taskipy.tasks] generate = "python scripts/generate.py" -black = "black ." +format = "ruff format ." isort = "ruff check --select I . --fix" mypy = "mypy ." ruff = "ruff check src" safety = "poetry export -f requirements.txt | safety check --bare --stdin" test = "pytest tests" -check = "task isort && task black && task mypy && task ruff && task test && task safety" - -[tool.black] -line-length = 120 -target_version = ["py37"] +check = "task isort && task format && task mypy && task ruff && task test && task safety" [tool.ruff] # Always generate Python 3.8-compatible code. @@ -47,6 +42,7 @@ target-version = "py38" line-length = 120 exclude = [ "api", # generated command classes + ".venv" ] [tool.ruff.lint] diff --git a/src/binarylane/console/parser/list_attribute.py b/src/binarylane/console/parser/list_attribute.py index 2d6cebea..41402717 100644 --- a/src/binarylane/console/parser/list_attribute.py +++ b/src/binarylane/console/parser/list_attribute.py @@ -75,9 +75,9 @@ def configure(self, parser: Parser) -> None: parser.add_group_help(title=self.title, description=self.description, entries=usage_descriptions) parser.add_keyword(self.keyword) - parser.add_argument(self.attribute_name, type=str, nargs=argparse.PARSER, help=argparse.SUPPRESS).required = ( - False - ) + parser.add_argument( + self.attribute_name, type=str, nargs=argparse.PARSER, help=argparse.SUPPRESS + ).required = False def _create_singlestore_action(self, **kwargs: Any) -> argparse.Action: action = SingleStoreAction(**kwargs) diff --git a/src/binarylane/pycompat/actions.py b/src/binarylane/pycompat/actions.py index 8bbd1751..0dca088e 100644 --- a/src/binarylane/pycompat/actions.py +++ b/src/binarylane/pycompat/actions.py @@ -1,4 +1,4 @@ -""" BooleanOptionalAction imported from 3.9 """ +"""BooleanOptionalAction imported from 3.9""" from __future__ import annotations diff --git a/tests/models/__init__.py b/tests/models/__init__.py index 41a67276..93d0671b 100644 --- a/tests/models/__init__.py +++ b/tests/models/__init__.py @@ -1,3 +1,3 @@ -""" This package contains some "frozen" and/or simplified replicas of BinaryLane API model objects """ +"""This package contains some "frozen" and/or simplified replicas of BinaryLane API model objects""" from __future__ import annotations