Skip to content

Commit 70e4a61

Browse files
committed
Apply Black formatting and remove unused imports
1 parent 2347f65 commit 70e4a61

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

pre_commit_hooks/check_autopkg_recipes.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import os
77
import sys
88
from contextlib import contextmanager
9+
910
from packaging.version import Version
1011

1112
from pre_commit_hooks.util import (
@@ -86,7 +87,11 @@ def validate_recipe_prefix(recipe, filename, prefix):
8687
print(
8788
"{}: identifier does not start with {}".format(
8889
filename,
89-
'one of: "%s"' % '", "'.join(prefix) if len(prefix) > 1 else prefix[0],
90+
(
91+
'one of: "%s"' % '", "'.join(prefix)
92+
if len(prefix) > 1
93+
else prefix[0]
94+
),
9095
)
9196
)
9297
passed = False

pre_commit_hooks/check_munki_pkgsinfo.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from pathlib import Path
88
from xml.parsers.expat import ExpatError
99

10-
1110
from pre_commit_hooks.util import (
1211
validate_pkginfo_key_types,
1312
validate_required_keys,
@@ -73,7 +72,7 @@ def _check_case_sensitive_path(path):
7372
if p == p.parent:
7473
return True
7574
# If string representation of path is not in parent directory, return False
76-
if str(p) not in map(str, p.parent.iterdir()):
75+
if str(p) not in list(map(str, p.parent.iterdir())):
7776
return False
7877
p = p.parent
7978

@@ -195,7 +194,7 @@ def main(argv=None):
195194
pkginfo.get("installer_type") == "apple_update_metadata",
196195
)
197196
):
198-
msg = f"missing icon"
197+
msg = "missing icon"
199198
if args.warn_on_missing_icons:
200199
print(f"{filename}: WARNING: {msg}")
201200
else:

pre_commit_hooks/check_munkipkg_buildinfo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from xml.parsers.expat import ExpatError
99

1010
import ruamel.yaml
11+
1112
from pre_commit_hooks.util import validate_required_keys
1213

1314
yaml = ruamel.yaml.YAML(typ="safe")

pre_commit_hooks/forbid_autopkg_trust_info.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
repo."""
44

55
import argparse
6+
67
from pre_commit_hooks.util import load_autopkg_recipe
78

89

pre_commit_hooks/util.py

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

33
import json
44
import plistlib
5-
import sys
65
from datetime import datetime
76

87
import ruamel.yaml

0 commit comments

Comments
 (0)