Skip to content

Commit

Permalink
Python 3-isms.
Browse files Browse the repository at this point in the history
  • Loading branch information
amcgregor committed Jun 10, 2019
1 parent 2145141 commit 5ece03c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 14 deletions.
3 changes: 0 additions & 3 deletions web/dispatch/resource/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# encoding: utf-8

from .exc import InvalidMethod
from .dispatch import ResourceDispatch
from .helper import Collection, Resource

5 changes: 1 addition & 4 deletions web/dispatch/resource/dispatch.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

import warnings

if __debug__:
Expand All @@ -18,7 +16,7 @@ def invalid_method(*args, **kw):
raise InvalidMethod()


class ResourceDispatch(object):
class ResourceDispatch:
__slots__ = ()

def __repr__(self):
Expand Down Expand Up @@ -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

3 changes: 0 additions & 3 deletions web/dispatch/resource/exc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

try:
from webob.exc import HTTPMethodNotAllowed
except ImportError: # pragma: no cover
Expand All @@ -8,4 +6,3 @@

class InvalidMethod(HTTPMethodNotAllowed):
pass

5 changes: 1 addition & 4 deletions web/dispatch/resource/helper.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

"""Helpers for advanced controller behaviour.
Much work needs to be done.
Expand All @@ -8,7 +6,7 @@
from functools import partial, wraps


class Resource(object):
class Resource:
__dispatch__ = 'resource'

def __init__(self, context, collection=None, record=None):
Expand All @@ -22,4 +20,3 @@ class Collection(Resource):

def __getitem__(self, identifier):
raise NotImplementedError()

0 comments on commit 5ece03c

Please sign in to comment.