Skip to content

Commit ed0b5d1

Browse files
committed
Wrap result getter into partial. It's cleaner
1 parent 0ea5b5c commit ed0b5d1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pygithub3/core/result.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- encoding: utf-8 -*-
33

4-
from urlparse import urlparse, parse_qs
4+
import functools
55

66
from .link import Link
77

@@ -10,9 +10,8 @@ class Method(object):
1010
""" Lazy support """
1111

1212
def __init__(self, method, request, **method_args):
13-
self.method = method
14-
self.request = request
15-
self.args = method_args
13+
self.method = functools.partial(method, request, **method_args)
14+
self.resource = request.resource
1615
self.cache = {}
1716

1817
def cached(func):

0 commit comments

Comments
 (0)