Skip to content

Commit c744202

Browse files
committed
scripts: west_commands: zspdx: datatypes: Fix UP008
Replace super call with parameters reported by ruff. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
1 parent 361da4b commit c744202

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

.ruff-excludes.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,9 +1232,6 @@
12321232
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
12331233
"UP032", # https://docs.astral.sh/ruff/rules/f-string
12341234
]
1235-
"./scripts/west_commands/zspdx/datatypes.py" = [
1236-
"UP008", # https://docs.astral.sh/ruff/rules/super-call-with-parameters
1237-
]
12381235
"./scripts/west_commands/zspdx/getincludes.py" = [
12391236
"I001", # https://docs.astral.sh/ruff/rules/unsorted-imports
12401237
"UP021", # https://docs.astral.sh/ruff/rules/replace-universal-newlines

scripts/west_commands/zspdx/datatypes.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# should be built.
1010
class DocumentConfig:
1111
def __init__(self):
12-
super(DocumentConfig, self).__init__()
12+
super().__init__()
1313

1414
# name of document
1515
self.name = ""
@@ -27,7 +27,7 @@ def __init__(self):
2727
class Document:
2828
# initialize with a DocumentConfig
2929
def __init__(self, cfg):
30-
super(Document, self).__init__()
30+
super().__init__()
3131

3232
# configuration - DocumentConfig
3333
self.cfg = cfg
@@ -63,7 +63,7 @@ def __init__(self, cfg):
6363
# be built.
6464
class PackageConfig:
6565
def __init__(self):
66-
super(PackageConfig, self).__init__()
66+
super().__init__()
6767

6868
# package name
6969
self.name = ""
@@ -106,7 +106,7 @@ class Package:
106106
# 1) PackageConfig
107107
# 2) the Document that owns this Package
108108
def __init__(self, cfg, doc):
109-
super(Package, self).__init__()
109+
super().__init__()
110110

111111
# configuration - PackageConfig
112112
self.cfg = cfg
@@ -153,7 +153,7 @@ class RelationshipDataElementType(Enum):
153153
# Relationship after we have organized the SPDX Package and File data.
154154
class RelationshipData:
155155
def __init__(self):
156-
super(RelationshipData, self).__init__()
156+
super().__init__()
157157

158158
# for the "owner" element (e.g., the left side of the Relationship),
159159
# is it a filename or a target name (e.g., a Package in the build doc)
@@ -191,7 +191,7 @@ def __init__(self):
191191
# Document's context.
192192
class Relationship:
193193
def __init__(self):
194-
super(Relationship, self).__init__()
194+
super().__init__()
195195

196196
# SPDX ID for left side of relationship
197197
# including "SPDXRef-" as well as "DocumentRef-" if needed
@@ -213,7 +213,7 @@ class File:
213213
# 1) Document containing this File
214214
# 2) Package containing this File
215215
def __init__(self, doc, pkg):
216-
super(File, self).__init__()
216+
super().__init__()
217217

218218
# absolute path to this file on disk
219219
self.abspath = ""

0 commit comments

Comments
 (0)