Skip to content

Commit 472ef23

Browse files
committed
Add pyupgrade
1 parent 668211b commit 472ef23

17 files changed

+9
-21
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ repos:
2727
- id: format-xml-plist
2828
- id: forbid-autopkg-overrides
2929
- id: forbid-autopkg-trust-info
30+
- repo: https://github.com/asottile/pyupgrade
31+
rev: f90119b1b8bd9e46949d9592972b2c4c27d62a97 # v3.21.0
32+
hooks:
33+
- id: pyupgrade

IntelXDK/IntelXDKInfoProvider.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/local/autopkg/python
2-
# -*- coding: utf-8 -*-
32
#
43
# Copyright 2016 Nathan Felton (n8felton)
54
#
@@ -40,7 +39,7 @@ class IntelXDKInfoProvider(URLGetter):
4039
},
4140
"base_url": {
4241
"required": False,
43-
"description": "Default is {0}.".format(XDK_BASE_URL),
42+
"description": "Default is {}.".format(XDK_BASE_URL),
4443
},
4544
}
4645
output_variables = {
@@ -62,15 +61,15 @@ def main(self):
6261
# Capture input variables
6362
release = self.env.get("release", "latest")
6463
base_url = self.env.get("base_url", XDK_BASE_URL)
65-
updates_url = "{0}{1}".format(base_url, "updates.json")
64+
updates_url = "{}{}".format(base_url, "updates.json")
6665
self.output("Updates URL: {updates_url}".format(updates_url=updates_url), 2)
6766

6867
# Get information on updates
6968
updates = self.get_xdk_updates(updates_url)
7069
self.output(updates, 3)
7170

7271
# Set output variables
73-
download_url = "{0}{1}".format(base_url, updates[release]["macosx"]["file"])
72+
download_url = "{}{}".format(base_url, updates[release]["macosx"]["file"])
7473
self.env["url"] = download_url
7574
md5checksum = updates[release]["macosx"]["fileMD5"]
7675
self.env["md5checksum"] = md5checksum

SharedProcessors/AppleSupportDownloadInfoProvider.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/local/autopkg/python
2-
# -*- coding: utf-8 -*-
32
#
43
# Copyright 2015 Nathan Felton (n8felton)
54
#

SharedProcessors/Base64Encoder.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/local/autopkg/python
2-
# -*- coding: utf-8 -*-
32
#
43
# Copyright 2024 Nathan Felton (n8felton)
54
#

SharedProcessors/DistributionInfoProvider.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/local/autopkg/python
2-
# -*- coding: utf-8 -*-
32
#
43
# Copyright 2019 Nathan Felton (n8felton)
54
#

SharedProcessors/HPSoftwareInfoProvider.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/local/autopkg/python
2-
# -*- coding: utf-8 -*-
32
#
43
# Copyright 2016 Nathan Felton (n8felton)
54
#

SharedProcessors/MD5Checksum.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/local/autopkg/python
2-
# -*- coding: utf-8 -*-
32
#
43
# Copyright 2016 Nathan Felton (n8felton)
54
#

SharedProcessors/MunkiGitCommitter.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/local/autopkg/python
2-
# -*- coding: utf-8 -*-
32
#
43
# Copyright 2015 Nathan Felton (n8felton)
54
#
@@ -107,7 +106,7 @@ def main(self):
107106
if not self.env.get('munki_importer_summary_result'):
108107
return
109108

110-
pkginfo_path = '{0}/{1}'.format('pkgsinfo',
109+
pkginfo_path = '{}/{}'.format('pkgsinfo',
111110
self.env
112111
['munki_importer_summary_result']
113112
['data']

SharedProcessors/PkgInfoVersioner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/local/autopkg/python
2-
# -*- coding: utf-8 -*-
32
#
43
# Copyright 2016 Nathan Felton (n8felton)
54
#

SharedProcessors/RemoteFilenameFinder.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/local/autopkg/python
2-
# -*- coding: utf-8 -*-
32
#
43
# Copyright 2016 Nathan Felton (n8felton)
54
#

0 commit comments

Comments
 (0)