Skip to content

Commit

Permalink
Run pyupgrade --py36-plus (#235)
Browse files Browse the repository at this point in the history
* Run pyupgrade --py36-plus

* Update docs/conf.py

Co-authored-by: Jens Vagelpohl <jens@netz.ooo>

Co-authored-by: Jens Vagelpohl <jens@netz.ooo>
  • Loading branch information
ale-rt and dataflake committed Oct 15, 2022
1 parent 582ebd4 commit d2f9fcf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
19 changes: 9 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# RestrictedPython documentation build configuration file, created by
# sphinx-quickstart on Thu May 19 12:43:20 2016.
Expand Down Expand Up @@ -47,18 +46,18 @@
master_doc = 'index'

# General information about the project.
project = u'RestrictedPython'
copyright = u'2017-2020, Zope Foundation and Contributors'
author = u'The Zope developer community'
project = 'RestrictedPython'
copyright = '2017-2022, Zope Foundation and Contributors'
author = 'The Zope developer community'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'5.0'
version = '5.0'
# The full version, including alpha/beta/rc tags.
release = u'5.0'
release = '5.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -240,8 +239,8 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'RestrictedPython.tex', u'RestrictedPython Documentation',
u'Alexander Loechel', 'manual'),
(master_doc, 'RestrictedPython.tex', 'RestrictedPython Documentation',
'Alexander Loechel', 'manual'),
]

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

Expand All @@ -284,7 +283,7 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'RestrictedPython', u'RestrictedPython Documentation',
(master_doc, 'RestrictedPython', 'RestrictedPython Documentation',
author, 'RestrictedPython', 'One line description of project.',
'Miscellaneous'),
]
Expand Down
4 changes: 2 additions & 2 deletions tests/builtins/test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def test_sametype_only_two_args_same():
def test_sametype_only_two_args_different():
from RestrictedPython.Utilities import same_type

class Foo(object):
class Foo:
pass
assert same_type(object(), Foo()) is False

Expand All @@ -87,7 +87,7 @@ def test_sametype_only_multiple_args_same():
def test_sametype_only_multipe_args_one_different():
from RestrictedPython.Utilities import same_type

class Foo(object):
class Foo:
pass
assert same_type(object(), object(), Foo()) is False

Expand Down
2 changes: 1 addition & 1 deletion tests/transformer/test_base_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_Bytes():

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


def test_Ellipsis():
Expand Down
3 changes: 1 addition & 2 deletions tests/transformer/test_yield.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ def test_yield_from():

def my_external_generator():
my_list = [1, 2, 3, 4, 5]
for elem in my_list:
yield elem
yield from my_list

local = {}
exec(result.code, {}, local)
Expand Down

0 comments on commit d2f9fcf

Please sign in to comment.