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>
This commit is contained in:
parent
6c4decf272
commit
3ccda0e4fe
2 changed files with 7 additions and 10 deletions
|
@ -1190,9 +1190,6 @@
|
||||||
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
|
"UP015", # https://docs.astral.sh/ruff/rules/redundant-open-modes
|
||||||
"UP032", # https://docs.astral.sh/ruff/rules/f-string
|
"UP032", # https://docs.astral.sh/ruff/rules/f-string
|
||||||
]
|
]
|
||||||
"./scripts/west_commands/zspdx/datatypes.py" = [
|
|
||||||
"UP008", # https://docs.astral.sh/ruff/rules/super-call-with-parameters
|
|
||||||
]
|
|
||||||
"./scripts/west_commands/zspdx/getincludes.py" = [
|
"./scripts/west_commands/zspdx/getincludes.py" = [
|
||||||
"I001", # https://docs.astral.sh/ruff/rules/unsorted-imports
|
"I001", # https://docs.astral.sh/ruff/rules/unsorted-imports
|
||||||
"UP021", # https://docs.astral.sh/ruff/rules/replace-universal-newlines
|
"UP021", # https://docs.astral.sh/ruff/rules/replace-universal-newlines
|
||||||
|
|
|
@ -9,7 +9,7 @@ from enum import Enum
|
||||||
# should be built.
|
# should be built.
|
||||||
class DocumentConfig:
|
class DocumentConfig:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(DocumentConfig, self).__init__()
|
super().__init__()
|
||||||
|
|
||||||
# name of document
|
# name of document
|
||||||
self.name = ""
|
self.name = ""
|
||||||
|
@ -27,7 +27,7 @@ class DocumentConfig:
|
||||||
class Document:
|
class Document:
|
||||||
# initialize with a DocumentConfig
|
# initialize with a DocumentConfig
|
||||||
def __init__(self, cfg):
|
def __init__(self, cfg):
|
||||||
super(Document, self).__init__()
|
super().__init__()
|
||||||
|
|
||||||
# configuration - DocumentConfig
|
# configuration - DocumentConfig
|
||||||
self.cfg = cfg
|
self.cfg = cfg
|
||||||
|
@ -63,7 +63,7 @@ class Document:
|
||||||
# be built.
|
# be built.
|
||||||
class PackageConfig:
|
class PackageConfig:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(PackageConfig, self).__init__()
|
super().__init__()
|
||||||
|
|
||||||
# package name
|
# package name
|
||||||
self.name = ""
|
self.name = ""
|
||||||
|
@ -106,7 +106,7 @@ class Package:
|
||||||
# 1) PackageConfig
|
# 1) PackageConfig
|
||||||
# 2) the Document that owns this Package
|
# 2) the Document that owns this Package
|
||||||
def __init__(self, cfg, doc):
|
def __init__(self, cfg, doc):
|
||||||
super(Package, self).__init__()
|
super().__init__()
|
||||||
|
|
||||||
# configuration - PackageConfig
|
# configuration - PackageConfig
|
||||||
self.cfg = cfg
|
self.cfg = cfg
|
||||||
|
@ -153,7 +153,7 @@ class RelationshipDataElementType(Enum):
|
||||||
# Relationship after we have organized the SPDX Package and File data.
|
# Relationship after we have organized the SPDX Package and File data.
|
||||||
class RelationshipData:
|
class RelationshipData:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(RelationshipData, self).__init__()
|
super().__init__()
|
||||||
|
|
||||||
# for the "owner" element (e.g., the left side of the Relationship),
|
# for the "owner" element (e.g., the left side of the Relationship),
|
||||||
# is it a filename or a target name (e.g., a Package in the build doc)
|
# is it a filename or a target name (e.g., a Package in the build doc)
|
||||||
|
@ -191,7 +191,7 @@ class RelationshipData:
|
||||||
# Document's context.
|
# Document's context.
|
||||||
class Relationship:
|
class Relationship:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(Relationship, self).__init__()
|
super().__init__()
|
||||||
|
|
||||||
# SPDX ID for left side of relationship
|
# SPDX ID for left side of relationship
|
||||||
# including "SPDXRef-" as well as "DocumentRef-" if needed
|
# including "SPDXRef-" as well as "DocumentRef-" if needed
|
||||||
|
@ -213,7 +213,7 @@ class File:
|
||||||
# 1) Document containing this File
|
# 1) Document containing this File
|
||||||
# 2) Package containing this File
|
# 2) Package containing this File
|
||||||
def __init__(self, doc, pkg):
|
def __init__(self, doc, pkg):
|
||||||
super(File, self).__init__()
|
super().__init__()
|
||||||
|
|
||||||
# absolute path to this file on disk
|
# absolute path to this file on disk
|
||||||
self.abspath = ""
|
self.abspath = ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue