diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2021-12-23 08:26:55 -0800 |
---|---|---|
committer | Greg Becker <becker33@llnl.gov> | 2022-01-12 06:14:18 -0800 |
commit | 0776c3b4d60b21ce9d31efe7ab07ee8494373f1a (patch) | |
tree | 6821176b5f3a91cc237b7a3587972cb2add13444 /lib | |
parent | ff5e73d6eb6d4ecf6f6fec69c9e151d886132eb8 (diff) | |
download | spack-0776c3b4d60b21ce9d31efe7ab07ee8494373f1a.tar.gz spack-0776c3b4d60b21ce9d31efe7ab07ee8494373f1a.tar.bz2 spack-0776c3b4d60b21ce9d31efe7ab07ee8494373f1a.tar.xz spack-0776c3b4d60b21ce9d31efe7ab07ee8494373f1a.zip |
unparser: Don't put unnecessary parentheses on class declarations
Backport of
* https://github.com/python/cpython/commit/25160cdc4775a1ddb4e37c8bf5a6e31ad9c146ed
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/util/unparse/unparser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/util/unparse/unparser.py b/lib/spack/spack/util/unparse/unparser.py index 529ed5209f..001bcd647e 100644 --- a/lib/spack/spack/util/unparse/unparser.py +++ b/lib/spack/spack/util/unparse/unparser.py @@ -415,7 +415,7 @@ class Unparser: self.dispatch(deco) self.fill("class " + t.name) if six.PY3: - with self.delimit("(", ")"): + with self.delimit_if("(", ")", condition=t.bases or t.keywords): comma = False for e in t.bases: if comma: |