diff --git a/web/dispatch/resource/__init__.py b/web/dispatch/resource/__init__.py index 395c5e3..8e599a1 100644 --- a/web/dispatch/resource/__init__.py +++ b/web/dispatch/resource/__init__.py @@ -1,6 +1,3 @@ -# encoding: utf-8 - from .exc import InvalidMethod from .dispatch import ResourceDispatch from .helper import Collection, Resource - diff --git a/web/dispatch/resource/dispatch.py b/web/dispatch/resource/dispatch.py index 7b2cc66..88035c0 100644 --- a/web/dispatch/resource/dispatch.py +++ b/web/dispatch/resource/dispatch.py @@ -1,5 +1,3 @@ -# encoding: utf-8 - import warnings if __debug__: @@ -18,7 +16,7 @@ def invalid_method(*args, **kw): raise InvalidMethod() -class ResourceDispatch(object): +class ResourceDispatch: __slots__ = () def __repr__(self): @@ -109,4 +107,3 @@ def head(self, obj, *args, **kw): def options(self, obj, *args, **kw): """The allowed methods are present in the returned headers.""" return None - diff --git a/web/dispatch/resource/exc.py b/web/dispatch/resource/exc.py index be9aa17..3f557db 100644 --- a/web/dispatch/resource/exc.py +++ b/web/dispatch/resource/exc.py @@ -1,5 +1,3 @@ -# encoding: utf-8 - try: from webob.exc import HTTPMethodNotAllowed except ImportError: # pragma: no cover @@ -8,4 +6,3 @@ class InvalidMethod(HTTPMethodNotAllowed): pass - diff --git a/web/dispatch/resource/helper.py b/web/dispatch/resource/helper.py index ecdf4d4..e454397 100644 --- a/web/dispatch/resource/helper.py +++ b/web/dispatch/resource/helper.py @@ -1,5 +1,3 @@ -# encoding: utf-8 - """Helpers for advanced controller behaviour. Much work needs to be done. @@ -8,7 +6,7 @@ from functools import partial, wraps -class Resource(object): +class Resource: __dispatch__ = 'resource' def __init__(self, context, collection=None, record=None): @@ -22,4 +20,3 @@ class Collection(Resource): def __getitem__(self, identifier): raise NotImplementedError() -