-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
UrlDispatcher.add_routes to return list of resource objects #3866
Copy link
Copy link
Closed
Labels
HacktoberfestWe think it's good for https://hacktoberfest.digitalocean.com/We think it's good for https://hacktoberfest.digitalocean.com/good first issueGood for newcomersGood for newcomersneed pull request
Description
Long story short
UrlDispatcher.add_routes returns nothing. I'd like to see a list of resources returned.
right now,
def add_routes(self, routes):
for route_obj in routes:
route_obj.register(self)
What I want -
def add_routes(self, routes):
return [ route_obj.register(self) for route_obj in routes ]
Not sure route_obj.register returns a resource.
Expected behaviour
resources = router.add_routes(routes)
Actual behaviour
router.add_routes(routes) returns nothing
Steps to reproduce
This is an enhancement request.
Your environment
aiohttp 3.0.1
Python 3.6
Ubuntu 18.04 LTS
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
HacktoberfestWe think it's good for https://hacktoberfest.digitalocean.com/We think it's good for https://hacktoberfest.digitalocean.com/good first issueGood for newcomersGood for newcomersneed pull request