Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: replace black with ruff format #507

Merged
merged 2 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 2 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@ repos:
rev: "v0.1.3"
hooks:
- id: ruff

- repo: https://github.com/psf/black-pre-commit-mirror
rev: "23.9.1"
hooks:
- id: black
args: [--exit-non-zero-on-fix]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- id: ruff-format
8 changes: 3 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ types-colorama = { version = "0.4.15.12", markers = "sys_platform == 'win32'" }
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.black]
line-length = 120
target-version = ["py38"]
preview = true

[tool.coverage.report]
skip_empty = true
# Subset of rules from https://pypi.org/project/covdefaults/
Expand Down Expand Up @@ -173,6 +168,9 @@ extend-exclude = ["tests/data/*"]
[tool.ruff.flake8-type-checking]
strict = true

[tool.ruff.format]
preview = true

[tool.ruff.isort]
required-imports = ["from __future__ import annotations"]

Expand Down
4 changes: 0 additions & 4 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@
matchPackageNames: ["astral-sh/ruff-pre-commit"],
customChangelogUrl: "https://github.com/charliermarsh/ruff",
},
{
matchPackageNames: ["psf/black-pre-commit-mirror"],
customChangelogUrl: "https://github.com/psf/black",
},
],

// https://docs.renovatebot.com/configuration-options/#regexmanagers
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/deprecate/test_ignore_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
def test_generate_deprecation_warning() -> None:
result = generate_deprecation_warning(flag_name="ignore-missing", issue_code="DEP002", sequence=("hi", "bye"))
assert (
result
== "Warning: In an upcoming release, support for the `--ignore-missing` command-line option and the"
result == "Warning: In an upcoming release, support for the `--ignore-missing` command-line option and the"
" `ignore_missing` configuration parameter will be discontinued. Instead, use `--per-rule-ignores"
' DEP002=hi|bye` or add a line `DEP002 = ["hi", "bye"]` to the `[tool.deptry.per_rule_ignores]` section of the'
" configuration file."
Expand Down