summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSergey Maranchuk <slav0nic@python.su>2020-04-17 22:12:06 +0300
committerSergey Maranchuk <slav0nic@python.su>2020-04-17 22:12:06 +0300
commit6668e43d2d67db4574e08a9d54bd80eb105c1b28 (patch)
tree10eda61b15ae53815af24af956267e2f632a46f7 /docs
parent48cf45b0a1ac04e701101fa18778164825edd429 (diff)
downloadpyramid-6668e43d2d67db4574e08a9d54bd80eb105c1b28.tar.gz
pyramid-6668e43d2d67db4574e08a9d54bd80eb105c1b28.tar.bz2
pyramid-6668e43d2d67db4574e08a9d54bd80eb105c1b28.zip
inheriting from `object` not necessary in py3
Diffstat (limited to 'docs')
-rw-r--r--docs/quick_tutorial/authorization/tutorial/resources.py2
-rw-r--r--docs/quick_tutorial/databases/tutorial/models.py2
-rw-r--r--docs/quick_tutorial/databases/tutorial/views.py2
-rw-r--r--docs/quick_tutorial/forms/tutorial/views.py2
-rw-r--r--docs/quick_tutorial/more_view_classes/tutorial/views.py2
-rw-r--r--docs/quick_tutorial/retail_forms/tutorial/views.py2
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/routes.py4
-rw-r--r--docs/tutorials/wiki2/src/tests/tutorial/routes.py4
8 files changed, 10 insertions, 10 deletions
diff --git a/docs/quick_tutorial/authorization/tutorial/resources.py b/docs/quick_tutorial/authorization/tutorial/resources.py
index b125cf083..1ee05bbba 100644
--- a/docs/quick_tutorial/authorization/tutorial/resources.py
+++ b/docs/quick_tutorial/authorization/tutorial/resources.py
@@ -1,7 +1,7 @@
from pyramid.authorization import Allow, Everyone
-class Root(object):
+class Root:
__acl__ = [(Allow, Everyone, 'view'),
(Allow, 'group:editors', 'edit')]
diff --git a/docs/quick_tutorial/databases/tutorial/models.py b/docs/quick_tutorial/databases/tutorial/models.py
index bbfd480bb..8ac29b505 100644
--- a/docs/quick_tutorial/databases/tutorial/models.py
+++ b/docs/quick_tutorial/databases/tutorial/models.py
@@ -27,7 +27,7 @@ class Page(Base):
body = Column(Text)
-class Root(object):
+class Root:
__acl__ = [(Allow, Everyone, 'view'),
(Allow, 'group:editors', 'edit')]
diff --git a/docs/quick_tutorial/databases/tutorial/views.py b/docs/quick_tutorial/databases/tutorial/views.py
index 4608c6d43..167f61715 100644
--- a/docs/quick_tutorial/databases/tutorial/views.py
+++ b/docs/quick_tutorial/databases/tutorial/views.py
@@ -15,7 +15,7 @@ class WikiPage(colander.MappingSchema):
)
-class WikiViews(object):
+class WikiViews:
def __init__(self, request):
self.request = request
diff --git a/docs/quick_tutorial/forms/tutorial/views.py b/docs/quick_tutorial/forms/tutorial/views.py
index 004d2aba9..a57ecd431 100644
--- a/docs/quick_tutorial/forms/tutorial/views.py
+++ b/docs/quick_tutorial/forms/tutorial/views.py
@@ -18,7 +18,7 @@ class WikiPage(colander.MappingSchema):
)
-class WikiViews(object):
+class WikiViews:
def __init__(self, request):
self.request = request
diff --git a/docs/quick_tutorial/more_view_classes/tutorial/views.py b/docs/quick_tutorial/more_view_classes/tutorial/views.py
index 156e468a9..a7dc4d9f1 100644
--- a/docs/quick_tutorial/more_view_classes/tutorial/views.py
+++ b/docs/quick_tutorial/more_view_classes/tutorial/views.py
@@ -5,7 +5,7 @@ from pyramid.view import (
@view_defaults(route_name='hello')
-class TutorialViews(object):
+class TutorialViews:
def __init__(self, request):
self.request = request
self.view_name = 'TutorialViews'
diff --git a/docs/quick_tutorial/retail_forms/tutorial/views.py b/docs/quick_tutorial/retail_forms/tutorial/views.py
index 2737ebdc4..c6f4e3877 100644
--- a/docs/quick_tutorial/retail_forms/tutorial/views.py
+++ b/docs/quick_tutorial/retail_forms/tutorial/views.py
@@ -18,7 +18,7 @@ class WikiPage(colander.MappingSchema):
)
-class WikiViews(object):
+class WikiViews:
def __init__(self, request):
self.request = request
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/routes.py b/docs/tutorials/wiki2/src/authorization/tutorial/routes.py
index f7bbe6011..fb352604d 100644
--- a/docs/tutorials/wiki2/src/authorization/tutorial/routes.py
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/routes.py
@@ -28,7 +28,7 @@ def new_page_factory(request):
raise HTTPSeeOther(location=next_url)
return NewPage(pagename)
-class NewPage(object):
+class NewPage:
def __init__(self, pagename):
self.pagename = pagename
@@ -45,7 +45,7 @@ def page_factory(request):
raise HTTPNotFound
return PageResource(page)
-class PageResource(object):
+class PageResource:
def __init__(self, page):
self.page = page
diff --git a/docs/tutorials/wiki2/src/tests/tutorial/routes.py b/docs/tutorials/wiki2/src/tests/tutorial/routes.py
index 7070884d3..ba484e54d 100644
--- a/docs/tutorials/wiki2/src/tests/tutorial/routes.py
+++ b/docs/tutorials/wiki2/src/tests/tutorial/routes.py
@@ -28,7 +28,7 @@ def new_page_factory(request):
raise HTTPSeeOther(location=next_url)
return NewPage(pagename)
-class NewPage(object):
+class NewPage:
def __init__(self, pagename):
self.pagename = pagename
@@ -45,7 +45,7 @@ def page_factory(request):
raise HTTPNotFound
return PageResource(page)
-class PageResource(object):
+class PageResource:
def __init__(self, page):
self.page = page