Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitac8c1b6

Browse files
committed
Update github3.search.user for consistency
1 parentad56d5a commitac8c1b6

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

‎github3/search/user.py‎

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,28 @@
66

77

88
classUserSearchResult(GitHubCore):
9-
def_update_attributes(self,data):
10-
result=data.copy()
9+
"""Representation of a search result for a user.
10+
11+
This object has the following attributes:
12+
13+
.. attribute:: score
14+
15+
The confidence score of this result.
1116
12-
#: Score of the result
13-
self.score=self._get_attribute(result,'score')
14-
if'score'inresult:
15-
delresult['score']
17+
.. attribute:: text_matches
1618
17-
#: Text matches
18-
self.text_matches=self._get_attribute(result,'text_matches', [])
19-
if'text_matches'inresult:
20-
delresult['text_matches']
19+
If present, a list of text strings that match the search string.
2120
22-
#: User object matching the search
21+
.. attribute:: user
22+
23+
A :class:`~github3.users.ShortUser` representing the user found
24+
in this search result.
25+
"""
26+
27+
def_update_attributes(self,data):
28+
result=data.copy()
29+
self.score=result.pop('score')
30+
self.text_matches=result.pop('text_matches', [])
2331
self.user=users.ShortUser(result,self)
2432

2533
def_repr(self):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp