Skip to content

Commit

Permalink
Apply pyupgrade on current code base
Browse files Browse the repository at this point in the history
modified:   src/Products/PageTemplates/Expressions.py
modified:   src/Products/PageTemplates/tests/testVariables.py
modified:   util.py
  • Loading branch information
jugmac00 committed Jul 17, 2020
1 parent acda2d2 commit 1cd1e35
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Products/PageTemplates/Expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def render(ob, ns):
return ob


class _CombinedMapping(object):
class _CombinedMapping:
"""Minimal auxiliary class to combine several mappings.
Earlier mappings take precedence.
Expand Down
8 changes: 4 additions & 4 deletions src/Products/PageTemplates/tests/testVariables.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestPredefinedVariables(PlacelessSetup, TestCase):
"""

# variables documented in the Zope Book
VARIABLES = set((
VARIABLES = {
"nothing",
"default",
"options",
Expand All @@ -38,10 +38,10 @@ class TestPredefinedVariables(PlacelessSetup, TestCase):
# - only usable as initial component in path expr
# - not contained in ``CONTEXTS``
# "CONTEXTS",
)) # noqa: E123
} # noqa: E123

def setUp(self):
super(TestPredefinedVariables, self).setUp()
super().setUp()

def add(dest, id, factory):
nid = dest._setObject(id, factory(id))
Expand Down Expand Up @@ -138,5 +138,5 @@ def check(self, what):

class TestPredefinedVariables_chameleon(TestPredefinedVariables):
def setUp(self):
super(TestPredefinedVariables_chameleon, self).setUp()
super().setUp()
useChameleonEngine()
2 changes: 1 addition & 1 deletion util.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def generate(in_, requirements_file, constraints_file):
if not pin:
continue

spec = '%s==%s' % (name, pin)
spec = f'{name}=={pin}'
requirements.append(spec + '\n')
constraints.append(spec + '\n')

Expand Down

0 comments on commit 1cd1e35

Please sign in to comment.