summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyproject.toml2
-rw-r--r--setup.cfg7
-rw-r--r--src/pyramid/config/__init__.py2
-rw-r--r--src/pyramid/config/actions.py4
-rw-r--r--src/pyramid/config/routes.py2
-rw-r--r--src/pyramid/config/views.py8
-rw-r--r--src/pyramid/httpexceptions.py10
-rw-r--r--src/pyramid/testing.py2
-rw-r--r--tests/test_config/test_init.py4
-rw-r--r--tests/test_router.py2
10 files changed, 18 insertions, 25 deletions
diff --git a/pyproject.toml b/pyproject.toml
index eddde46d9..9069096f7 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[tool.black]
line-length = 79
skip-string-normalization = true
-py36 = false
+target-version = ['py37', 'py38', 'py39', 'py310']
exclude = '''
/(
\.git
diff --git a/setup.cfg b/setup.cfg
index a9e760853..55fa7e8b3 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,10 +1,3 @@
-[easy_install]
-zip_ok = false
-
-[aliases]
-dev = develop easy_install pyramid[testing]
-docs = develop easy_install pyramid[docs]
-
[metadata]
license_file = LICENSE.txt
diff --git a/src/pyramid/config/__init__.py b/src/pyramid/config/__init__.py
index fa90f2dd2..c500c53f6 100644
--- a/src/pyramid/config/__init__.py
+++ b/src/pyramid/config/__init__.py
@@ -805,7 +805,7 @@ class Configurator(
categories=('pyramid',),
onerror=None,
ignore=None,
- **kw
+ **kw,
):
"""Scan a Python package and any of its subpackages for objects
marked with :term:`configuration decoration` such as
diff --git a/src/pyramid/config/actions.py b/src/pyramid/config/actions.py
index e13358ce9..c3554ced8 100644
--- a/src/pyramid/config/actions.py
+++ b/src/pyramid/config/actions.py
@@ -35,7 +35,7 @@ class ActionConfiguratorMixin:
kw=None,
order=0,
introspectables=(),
- **extra
+ **extra,
):
"""Register an action which will be executed when
:meth:`pyramid.config.Configurator.commit` is called (or executed
@@ -185,7 +185,7 @@ class ActionState:
includepath=(),
info=None,
introspectables=(),
- **extra
+ **extra,
):
"""Add an action with the given discriminator, callable, and
arguments"""
diff --git a/src/pyramid/config/routes.py b/src/pyramid/config/routes.py
index 4ebae89cc..59bc368fe 100644
--- a/src/pyramid/config/routes.py
+++ b/src/pyramid/config/routes.py
@@ -38,7 +38,7 @@ class RoutesConfiguratorMixin:
pregenerator=None,
static=False,
inherit_slash=None,
- **predicates
+ **predicates,
):
"""Add a :term:`route configuration` to the current configuration
state. Arguments to ``add_route`` are divided into *predicate*
diff --git a/src/pyramid/config/views.py b/src/pyramid/config/views.py
index 0d0002f83..e75fdd1ef 100644
--- a/src/pyramid/config/views.py
+++ b/src/pyramid/config/views.py
@@ -264,7 +264,7 @@ class ViewsConfiguratorMixin:
match_param=None,
require_csrf=None,
exception_only=False,
- **view_options
+ **view_options,
):
"""Add a :term:`view configuration` to the current
configuration state. Arguments to ``add_view`` are broken
@@ -1611,7 +1611,7 @@ class ViewsConfiguratorMixin:
decorator=None,
mapper=None,
match_param=None,
- **view_options
+ **view_options,
):
"""Add a forbidden view to the current configuration state. The
view will be called when Pyramid or application code raises a
@@ -1712,7 +1712,7 @@ class ViewsConfiguratorMixin:
mapper=None,
match_param=None,
append_slash=False,
- **view_options
+ **view_options,
):
"""Add a default :term:`Not Found View` to the current configuration
state. The view will be called when Pyramid or application code raises
@@ -1850,7 +1850,7 @@ class ViewsConfiguratorMixin:
view=None,
context=None,
# force all other arguments to be specified as key=value
- **view_options
+ **view_options,
):
"""Add an :term:`exception view` for the specified ``exception`` to
the current configuration state. The view will be called when Pyramid
diff --git a/src/pyramid/httpexceptions.py b/src/pyramid/httpexceptions.py
index 4e2b0ee1b..06894f9b4 100644
--- a/src/pyramid/httpexceptions.py
+++ b/src/pyramid/httpexceptions.py
@@ -225,7 +225,7 @@ ${body}'''
comment=None,
body_template=None,
json_formatter=None,
- **kw
+ **kw,
):
status = '%s %s' % (self.code, self.title)
Response.__init__(self, status=status, **kw)
@@ -529,7 +529,7 @@ ${html_comment}'''
headers=None,
comment=None,
body_template=None,
- **kw
+ **kw,
):
if location is None:
raise ValueError("HTTP redirects need a location to redirect to.")
@@ -539,7 +539,7 @@ ${html_comment}'''
comment=comment,
body_template=body_template,
location=location,
- **kw
+ **kw,
)
@@ -787,7 +787,7 @@ class HTTPForbidden(HTTPClientError):
comment=None,
body_template=None,
result=None,
- **kw
+ **kw,
):
HTTPClientError.__init__(
self,
@@ -795,7 +795,7 @@ class HTTPForbidden(HTTPClientError):
headers=headers,
comment=comment,
body_template=body_template,
- **kw
+ **kw,
)
self.result = result
diff --git a/src/pyramid/testing.py b/src/pyramid/testing.py
index 9a7c9af0e..1fba3ff31 100644
--- a/src/pyramid/testing.py
+++ b/src/pyramid/testing.py
@@ -327,7 +327,7 @@ class DummyRequest(
cookies=None,
post=None,
accept=None,
- **kw
+ **kw,
):
if environ is None:
environ = {}
diff --git a/tests/test_config/test_init.py b/tests/test_config/test_init.py
index 0a9e2988c..4ecd081e0 100644
--- a/tests/test_config/test_init.py
+++ b/tests/test_config/test_init.py
@@ -1349,7 +1349,7 @@ class TestConfigurator__add_predicate(unittest.TestCase):
kw=None,
order=0,
introspectables=(),
- **extra
+ **extra,
):
self.assertEqual(len(introspectables), 1)
self.assertEqual(introspectables[0]['name'], 'testing')
@@ -1368,7 +1368,7 @@ class TestConfigurator__add_predicate(unittest.TestCase):
kw=None,
order=0,
introspectables=(),
- **extra
+ **extra,
):
self.assertEqual(len(introspectables), 1)
self.assertEqual(introspectables[0]['name'], 'testing')
diff --git a/tests/test_router.py b/tests/test_router.py
index 857e8aea5..f136e5ab3 100644
--- a/tests/test_router.py
+++ b/tests/test_router.py
@@ -56,7 +56,7 @@ class TestRouter(unittest.TestCase):
virtual_root=None,
virtual_root_path=None,
raise_error=None,
- **kw
+ **kw,
):
from pyramid.interfaces import ITraverser