summaryrefslogtreecommitdiff
path: root/lib/spack/llnl
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2023-07-05 09:04:29 -0500
committerGitHub <noreply@github.com>2023-07-05 09:04:29 -0500
commit45838cee0b8b01ad999b459ed6d19e37686859c0 (patch)
tree3770f840a478598c430081763557b96e766a2a56 /lib/spack/llnl
parent95847a0b373d1fe55772ff39d58aa616bec88932 (diff)
downloadspack-45838cee0b8b01ad999b459ed6d19e37686859c0.tar.gz
spack-45838cee0b8b01ad999b459ed6d19e37686859c0.tar.bz2
spack-45838cee0b8b01ad999b459ed6d19e37686859c0.tar.xz
spack-45838cee0b8b01ad999b459ed6d19e37686859c0.zip
Drop Python 2 super syntax (#38718)
Diffstat (limited to 'lib/spack/llnl')
-rw-r--r--lib/spack/llnl/util/filesystem.py4
-rw-r--r--lib/spack/llnl/util/lang.py2
-rw-r--r--lib/spack/llnl/util/link_tree.py6
-rw-r--r--lib/spack/llnl/util/lock.py10
-rw-r--r--lib/spack/llnl/util/tty/color.py2
5 files changed, 12 insertions, 12 deletions
diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py
index fc681785ba..3f36e82d58 100644
--- a/lib/spack/llnl/util/filesystem.py
+++ b/lib/spack/llnl/util/filesystem.py
@@ -1892,7 +1892,7 @@ class HeaderList(FileList):
include_regex = re.compile(r"(.*?)(\binclude\b)(.*)")
def __init__(self, files):
- super(HeaderList, self).__init__(files)
+ super().__init__(files)
self._macro_definitions = []
self._directories = None
@@ -1918,7 +1918,7 @@ class HeaderList(FileList):
"""Default computation of directories based on the list of
header files.
"""
- dir_list = super(HeaderList, self).directories
+ dir_list = super().directories
values = []
for d in dir_list:
# If the path contains a subdirectory named 'include' then stop
diff --git a/lib/spack/llnl/util/lang.py b/lib/spack/llnl/util/lang.py
index c8ce562c07..ffee4443df 100644
--- a/lib/spack/llnl/util/lang.py
+++ b/lib/spack/llnl/util/lang.py
@@ -766,7 +766,7 @@ def pretty_seconds(seconds):
class RequiredAttributeError(ValueError):
def __init__(self, message):
- super(RequiredAttributeError, self).__init__(message)
+ super().__init__(message)
class ObjectWrapper:
diff --git a/lib/spack/llnl/util/link_tree.py b/lib/spack/llnl/util/link_tree.py
index 64890252da..816c9049b1 100644
--- a/lib/spack/llnl/util/link_tree.py
+++ b/lib/spack/llnl/util/link_tree.py
@@ -430,12 +430,12 @@ class MergeConflictError(Exception):
class ConflictingSpecsError(MergeConflictError):
def __init__(self, spec_1, spec_2):
- super(MergeConflictError, self).__init__(spec_1, spec_2)
+ super().__init__(spec_1, spec_2)
class SingleMergeConflictError(MergeConflictError):
def __init__(self, path):
- super(MergeConflictError, self).__init__("Package merge blocked by file: %s" % path)
+ super().__init__("Package merge blocked by file: %s" % path)
class MergeConflictSummary(MergeConflictError):
@@ -450,4 +450,4 @@ class MergeConflictSummary(MergeConflictError):
msg += "\n `{0}` and `{1}` both project to `{2}`".format(
conflict.src_a, conflict.src_b, conflict.dst
)
- super(MergeConflictSummary, self).__init__(msg)
+ super().__init__(msg)
diff --git a/lib/spack/llnl/util/lock.py b/lib/spack/llnl/util/lock.py
index a60b49663e..2b9d2dfbf2 100644
--- a/lib/spack/llnl/util/lock.py
+++ b/lib/spack/llnl/util/lock.py
@@ -770,7 +770,7 @@ class LockDowngradeError(LockError):
def __init__(self, path):
msg = "Cannot downgrade lock from write to read on file: %s" % path
- super(LockDowngradeError, self).__init__(msg)
+ super().__init__(msg)
class LockLimitError(LockError):
@@ -782,7 +782,7 @@ class LockTimeoutError(LockError):
def __init__(self, lock_type, path, time, attempts):
fmt = "Timed out waiting for a {} lock after {}.\n Made {} {} on file: {}"
- super(LockTimeoutError, self).__init__(
+ super().__init__(
fmt.format(
lock_type,
pretty_seconds(time),
@@ -798,7 +798,7 @@ class LockUpgradeError(LockError):
def __init__(self, path):
msg = "Cannot upgrade lock from read to write on file: %s" % path
- super(LockUpgradeError, self).__init__(msg)
+ super().__init__(msg)
class LockPermissionError(LockError):
@@ -810,7 +810,7 @@ class LockROFileError(LockPermissionError):
def __init__(self, path):
msg = "Can't take write lock on read-only file: %s" % path
- super(LockROFileError, self).__init__(msg)
+ super().__init__(msg)
class CantCreateLockError(LockPermissionError):
@@ -819,4 +819,4 @@ class CantCreateLockError(LockPermissionError):
def __init__(self, path):
msg = "cannot create lock '%s': " % path
msg += "file does not exist and location is not writable"
- super(LockError, self).__init__(msg)
+ super().__init__(msg)
diff --git a/lib/spack/llnl/util/tty/color.py b/lib/spack/llnl/util/tty/color.py
index 84344a7ae7..67bd129eab 100644
--- a/lib/spack/llnl/util/tty/color.py
+++ b/lib/spack/llnl/util/tty/color.py
@@ -68,7 +68,7 @@ class ColorParseError(Exception):
"""Raised when a color format fails to parse."""
def __init__(self, message):
- super(ColorParseError, self).__init__(message)
+ super().__init__(message)
# Text styles for ansi codes