8000 Define __attrs__ in GitHubSession on class level · smakinson/github3.py@33b4df8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 33b4df8

Browse files
committed
Define __attrs__ in GitHubSession on class level
1 parent 00e4ab5 commit 33b4df8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

github3/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def requires_2fa(response):
1919

2020
class GitHubSession(requests.Session):
2121
auth = None
22+
__attrs__ = requests.Session.__attrs__ + ['base_url', 'two_factor_auth_cb']
2223

2324
def __init__(self):
2425
super(GitHubSession, self).__init__()
@@ -34,7 +35,6 @@ def __init__(self):
3435
})
3536
self.base_url = 'https://api.github.com'
3637
self.two_factor_auth_cb = None
37-
self.__attrs__.extend(['base_url', 'two_factor_auth_cb'])
3838

3939
def basic_auth(self, username, password):
4040
"""Set the Basic Auth credentials on this Session.

0 commit comments

Comments
 (0)
0