Skip to content

Commit d2f9fcf

Browse files
ale-rtdataflake
andauthored
Run pyupgrade --py36-plus (#235)
* Run pyupgrade --py36-plus * Update docs/conf.py Co-authored-by: Jens Vagelpohl <[email protected]> Co-authored-by: Jens Vagelpohl <[email protected]>
1 parent 582ebd4 commit d2f9fcf

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

docs/conf.py

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
#
32
# RestrictedPython documentation build configuration file, created by
43
# sphinx-quickstart on Thu May 19 12:43:20 2016.
@@ -47,18 +46,18 @@
4746
master_doc = 'index'
4847

4948
# General information about the project.
50-
project = u'RestrictedPython'
51-
copyright = u'2017-2020, Zope Foundation and Contributors'
52-
author = u'The Zope developer community'
49+
project = 'RestrictedPython'
50+
copyright = '2017-2022, Zope Foundation and Contributors'
51+
author = 'The Zope developer community'
5352

5453
# The version info for the project you're documenting, acts as replacement for
5554
# |version| and |release|, also used in various other places throughout the
5655
# built documents.
5756
#
5857
# The short X.Y version.
59-
version = u'5.0'
58+
version = '5.0'
6059
# The full version, including alpha/beta/rc tags.
61-
release = u'5.0'
60+
release = '5.0'
6261

6362
# The language for content autogenerated by Sphinx. Refer to documentation
6463
# for a list of supported languages.
@@ -240,8 +239,8 @@
240239
# (source start file, target name, title,
241240
# author, documentclass [howto, manual, or own class]).
242241
latex_documents = [
243-
(master_doc, 'RestrictedPython.tex', u'RestrictedPython Documentation',
244-
u'Alexander Loechel', 'manual'),
242+
(master_doc, 'RestrictedPython.tex', 'RestrictedPython Documentation',
243+
'Alexander Loechel', 'manual'),
245244
]
246245

247246
# The name of an image file (relative to this directory) to place at the top of
@@ -270,7 +269,7 @@
270269
# One entry per manual page. List of tuples
271270
# (source start file, name, description, authors, manual section).
272271
man_pages = [
273-
(master_doc, 'restrictedpython', u'RestrictedPython Documentation',
272+
(master_doc, 'restrictedpython', 'RestrictedPython Documentation',
274273
[author], 1)
275274
]
276275

@@ -284,7 +283,7 @@
284283
# (source start file, target name, title, author,
285284
# dir menu entry, description, category)
286285
texinfo_documents = [
287-
(master_doc, 'RestrictedPython', u'RestrictedPython Documentation',
286+
(master_doc, 'RestrictedPython', 'RestrictedPython Documentation',
288287
author, 'RestrictedPython', 'One line description of project.',
289288
'Miscellaneous'),
290289
]

tests/builtins/test_utilities.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def test_sametype_only_two_args_same():
7474
def test_sametype_only_two_args_different():
7575
from RestrictedPython.Utilities import same_type
7676

77-
class Foo(object):
77+
class Foo:
7878
pass
7979
assert same_type(object(), Foo()) is False
8080

@@ -87,7 +87,7 @@ def test_sametype_only_multiple_args_same():
8787
def test_sametype_only_multipe_args_one_different():
8888
from RestrictedPython.Utilities import same_type
8989

90-
class Foo(object):
90+
class Foo:
9191
pass
9292
assert same_type(object(), object(), Foo()) is False
9393

tests/transformer/test_base_types.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def test_Bytes():
1414

1515
def test_Set():
1616
"""It allows to use set literals."""
17-
assert restricted_eval('{1, 2, 3}') == set([1, 2, 3])
17+
assert restricted_eval('{1, 2, 3}') == {1, 2, 3}
1818

1919

2020
def test_Ellipsis():

tests/transformer/test_yield.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ def test_yield_from():
3333

3434
def my_external_generator():
3535
my_list = [1, 2, 3, 4, 5]
36-
for elem in my_list:
37-
yield elem
36+
yield from my_list
3837

3938
local = {}
4039
exec(result.code, {}, local)

0 commit comments

Comments
 (0)