Skip to content

Commit 65f8df3

Browse files
committed
Fix regression in metadata
* update pre-commit * drop black formatter
1 parent b29773e commit 65f8df3

File tree

7 files changed

+43
-59
lines changed

7 files changed

+43
-59
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,23 @@ jobs:
2626
run: |
2727
ruff check . --output-format github
2828
29+
Formatting:
30+
name: Check formatting
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v6
34+
- name: Set up Python
35+
uses: actions/setup-python@v6
36+
with:
37+
python-version: '3.x'
38+
- name: Install dependencies
39+
run: |
40+
python -m pip install --upgrade pip
41+
pip install --upgrade ruff
42+
- name: Check formatting
43+
run: |
44+
ruff format --check .
45+
2946
PyLint:
3047
runs-on: ubuntu-latest
3148
steps:
@@ -64,22 +81,6 @@ jobs:
6481
run: |
6582
mypy --strict logwrap
6683
67-
Black:
68-
runs-on: ubuntu-latest
69-
steps:
70-
- uses: actions/checkout@v6
71-
- name: Set up Python
72-
uses: actions/setup-python@v6
73-
with:
74-
python-version: '3.x'
75-
- name: Install dependencies
76-
run: |
77-
python -m pip install --upgrade pip
78-
pip install --upgrade black regex
79-
- name: Check code style with black
80-
run: |
81-
black --check logwrap
82-
8384
Refurb:
8485
runs-on: ubuntu-latest
8586
steps:
@@ -96,7 +97,7 @@ jobs:
9697
run: |
9798
refurb --format github logwrap
9899
Test:
99-
needs: [PEP8, PyLint, MyPy, Black, Refurb] # isort is broken
100+
needs: [PEP8, Formatting, PyLint, MyPy, Refurb] # isort is broken
100101
runs-on: ${{ matrix.os }}
101102
strategy:
102103
max-parallel: 6

.pre-commit-config.yaml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v5.0.0
3+
rev: v6.0.0
44
hooks:
55
- id: check-yaml
66
- id: end-of-file-fixer
77
- id: trailing-whitespace
88
- id: mixed-line-ending
99

1010
- repo: https://github.com/pycqa/isort
11-
rev: 6.0.1
11+
rev: 7.0.0
1212
hooks:
1313
- id: isort
1414
name: isort (python)
@@ -19,21 +19,15 @@ repos:
1919
name: isort (pyi)
2020
types: [pyi]
2121

22-
- repo: https://github.com/psf/black
23-
rev: 25.1.0
24-
hooks:
25-
- id: black
26-
# It is recommended to specify the latest version of Python
27-
# supported by your project here, or alternatively use
28-
# pre-commit's default_language_version, see
29-
# https://pre-commit.com/#top_level-default_language_version
30-
3122
- repo: https://github.com/astral-sh/ruff-pre-commit
3223
# Ruff version.
33-
rev: v0.11.8
24+
rev: v0.14.6
3425
hooks:
35-
- id: ruff
36-
args: [ --fix, --exit-non-zero-on-fix ]
26+
# Run the linter.
27+
- id: ruff-check
28+
args: [ --fix ]
29+
# Run the formatter.
30+
- id: ruff-format
3731

3832
- repo: https://github.com/pre-commit/pygrep-hooks
3933
rev: v1.10.0 # Use the ref you want to point at

README.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ logwrap
1616
:target: https://pypi.python.org/pypi/logwrap
1717
.. image:: https://img.shields.io/github/license/python-useful-helpers/logwrap.svg
1818
:target: https://raw.githubusercontent.com/python-useful-helpers/logwrap/master/LICENSE
19-
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
20-
:target: https://github.com/ambv/black
2119

2220

2321
logwrap is a helper for logging in human-readable format function arguments and call result on function call.

pyproject.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ name = "logwrap"
1313
description = "Decorator for logging function arguments and return value by human-readable way"
1414
requires-python = ">=3.9.0"
1515
keywords = ["logging", "debugging", "development"]
16-
license="Apache-2.0} # Use SPDX classifier
16+
license="Apache-2.0" # Use SPDX classifier
1717
license-files=["LICENSE"]
1818
readme = {file = "README.rst", content-type = "text/x-rst"}
1919
authors=[{name="Aleksei Stepanov", email="[email protected]"}]
@@ -57,10 +57,6 @@ universal = 0
5757
[tool.setuptools_scm]
5858
write_to = "logwrap/_version.py"
5959

60-
[tool.black]
61-
line-length = 120
62-
target-version = ["py39"]
63-
6460
[tool.isort]
6561
line_length = 120
6662
multi_line_output = 3

test/test_log_wrap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def func(arg, darg=1, *args, **kwargs):
335335
f" arg=0,\n"
336336
f" darg=1,\n"
337337
f" # VAR_POSITIONAL:\n"
338-
f" args={logwrap.pretty_repr((2, ), indent=4, no_indent_start=True)},\n"
338+
f" args={logwrap.pretty_repr((2,), indent=4, no_indent_start=True)},\n"
339339
f" # VAR_KEYWORD:\n"
340340
f" kwargs={logwrap.pretty_repr({'arg3': 3}, indent=4, no_indent_start=True)},\n"
341341
f")\n"

test/test_repr_utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,7 @@ class WithUnionAnn:
341341

342342
test_dc = WithUnionAnn(None)
343343
self.assertEqual(
344-
"test_repr_utils.WithUnionAnn(\n"
345-
" a=None, # type: int | None\n"
346-
")",
344+
"test_repr_utils.WithUnionAnn(\n a=None, # type: int | None\n)",
347345
logwrap.pretty_repr(test_dc),
348346
)
349347

tox.ini

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[tox]
77
minversion = 3.15
8-
envlist = isort, black, ruff, pylint, mypy, refurb, pep257, py3{8,9,10,11,12}, readme, doc8, docs
8+
envlist = isort, ruff, pylint, mypy, refurb, pep257, py3{8,9,10,11,12}, readme, doc8, docs
99
skip_missing_interpreters = True
1010

1111
[testenv]
@@ -29,33 +29,39 @@ commands =
2929
py.test --self-contained-html --html=report.html
3030

3131
[testenv:py3{8,9,10,11,12}]
32-
depends = pylint,mypy,pep8,ruff,refurb,pep257,bandit,black,isort
32+
depends = pylint,mypy,pep8,ruff,ruff-format,refurb,pep257,bandit,isort
3333

3434
[testenv:venv]
3535
commands = {posargs:}
3636

3737
[testenv:ruff]
3838
skip_install = true
39-
depends = black,isort
40-
deps = ruff>=0.1.7
39+
depends = isort
40+
deps = ruff>=0.14.6
4141
commands = ruff check .
4242

43+
[testenv:ruff-format]
44+
skip_install = true
45+
depends = isort
46+
deps = ruff>=0.14.6
47+
commands = ruff format --check .
48+
4349
[testenv:refurb]
4450
skip_install = true
45-
depends = black,isort
51+
depends = isort
4652
deps = refurb
4753
commands = refurb logwrap
4854

4955
[testenv:pep8]
5056
skip_install = true
51-
depends = black,isort
57+
depends = isort
5258
deps =
5359
-r{toxinidir}/flake8_requirements.txt
5460
commands = flake8 logwrap
5561

5662
[testenv:pep257]
5763
skip_install = true
58-
depends = black,isort
64+
depends = isort
5965
deps =
6066
pydocstyle[toml]
6167
commands = pydocstyle -v logwrap
@@ -94,7 +100,7 @@ commands =
94100
twine check {toxinidir}/dist/*
95101

96102
[testenv:bandit]
97-
depends = black,isort
103+
depends = isort
98104
deps = bandit
99105
commands = bandit -r logwrap
100106

@@ -104,15 +110,6 @@ deps =
104110
pipdeptree
105111
commands = pipdeptree
106112

107-
[testenv:black]
108-
skip_install = true
109-
depends = isort
110-
deps =
111-
black
112-
regex
113-
commands =
114-
black logwrap
115-
116113
[testenv:mypy]
117114
depends = pep8,ruff,pep257,bandit
118115
deps =

0 commit comments

Comments
 (0)