Skip to content

Commit 4f5faf6

Browse files
authored
Bump black and run the formatter (#733)
* chore(deps): bump black from 22.12.0 to 26.3.1 and reformat * chore(deps): bump black rev to 26.3.1 and remove tools exclude in pre-commit
1 parent d14d312 commit 4f5faf6

22 files changed

Lines changed: 64 additions & 104 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: "22.12.0"
3+
rev: "26.3.1"
44
hooks:
55
- id: black
6-
exclude: ^taf/tools/
76
language_version: python3
87
- repo: https://github.com/PyCQA/flake8
98
rev: "5.0.4"

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
ci_require = [
1717
"bandit>=1.6.0",
18-
"black==22.12.0",
18+
"black==26.3.1",
1919
"coverage==4.5.3",
2020
"pre-commit>=1.18.3",
2121
"pytest-cov==2.7.1",
@@ -24,7 +24,7 @@
2424

2525
executable_require = ["lxml"]
2626

27-
dev_require = ["bandit>=1.6.0", "black==22.12.0", "pre-commit>=1.18.3"]
27+
dev_require = ["bandit>=1.6.0", "black==26.3.1", "pre-commit>=1.18.3"]
2828

2929
tests_require = [
3030
"pytest==8.*",

taf/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Add platform-dependent libraries to the path.
2-
"""
1+
"""Add platform-dependent libraries to the path."""
32

43
import sys
54

taf/constants.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import datetime
33
from typing import List, Optional
44

5-
65
TARGETS_DIRECTORY_NAME = "targets"
76
METADATA_DIRECTORY_NAME = "metadata"
87

taf/repositoriesdb.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from taf.log import taf_logger
1616
from taf.models.types import Commitish
1717

18-
1918
# Target repositories db
2019

2120
# {

taf/tests/test_api/metadata/api/test_metadata.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from tuf.api.metadata import Root, Snapshot, Timestamp, Targets
1111
from taf.yubikey.yubikey_manager import PinManager
1212

13-
1413
AUTH_REPO_NAME = "auth"
1514

1615

taf/tests/test_api/targets/api/test_targets.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
)
1717
from taf.yubikey.yubikey_manager import PinManager
1818

19-
2019
AUTH_REPO_NAME = "auth"
2120

2221

taf/tests/test_git/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from taf.utils import on_rm_error
77
from taf.tests.conftest import TEST_DATA_REPOS_PATH
88

9-
109
TEST_DIR = Path(TEST_DATA_REPOS_PATH, "test-git")
1110
REPO_NAME = "repository"
1211
CLONE_REPO_NAME = "repository2"

taf/tests/test_repository/test_repository.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,11 @@ def _check_values(repo, json_data):
134134
else:
135135
assert repo_value == attr_value
136136

137-
for (repo_library_dir, repo_name, repo_path,) in (
137+
for (
138+
repo_library_dir,
139+
repo_name,
140+
repo_path,
141+
) in (
138142
(library_dir, name, None),
139143
(None, None, Path(library_dir, name)),
140144
):

taf/tests/test_updater/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646

4747
from tuf.api.metadata import Timestamp
4848

49-
5049
KEYS_DESCRIPTION = str(TEST_INIT_DATA_PATH / "keys.json")
5150

5251

0 commit comments

Comments
 (0)