Skip to content

Commit fe2f647

Browse files
author
Tyler Goodlet
committed
Make internal _Result attrs private
1 parent 6cf1842 commit fe2f647

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pluggy/callers.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class HookCallError(Exception):
2626

2727
class _Result(object):
2828
def __init__(self, result, excinfo):
29-
self.result = result
30-
self.excinfo = excinfo
29+
self._result = result
30+
self._excinfo = excinfo
3131

3232
@classmethod
3333
def from_call(cls, func):
@@ -47,8 +47,8 @@ def force_result(self, result):
4747
be set otherwise set a (modified) list of results. Any exceptions
4848
found during invocation will be deleted.
4949
"""
50-
self.result = result
51-
self.excinfo = None
50+
self._result = result
51+
self._excinfo = None
5252

5353
def get_result(self):
5454
"""Get the result(s) for this hook call.
@@ -57,10 +57,10 @@ def get_result(self):
5757
will be returned otherwise a list of results.
5858
"""
5959
__tracebackhide__ = True
60-
if self.excinfo is None:
61-
return self.result
60+
if self._excinfo is None:
61+
return self._result
6262
else:
63-
ex = self.excinfo
63+
ex = self._excinfo
6464
if _py3:
6565
raise ex[1].with_traceback(ex[2])
6666
_reraise(*ex) # noqa
@@ -78,7 +78,7 @@ def __init__(self, hook_impls, kwargs, specopts={}, hook=None):
7878
def execute(self):
7979
__tracebackhide__ = True
8080
caller_kwargs = self.caller_kwargs
81-
self.results = results = []
81+
self._results = results = []
8282
firstresult = self.specopts.get("firstresult")
8383
excinfo = None
8484
try: # run impl and wrapper setup functions in a loop

0 commit comments

Comments
 (0)