Skip to content

Commit 3672338

Browse files
committed
rename _now
1 parent 4ab9fdb commit 3672338

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

chinaapi/open.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@ def __init__(self, access_token=None, expires_in=None, refresh_token=None, **kwa
3131
setattr(self, key, value)
3232

3333
@staticmethod
34-
def _now():
34+
def _get_now():
3535
return int(time.time())
3636

3737
def _get_expires_in(self):
3838
if self.expired_at:
39-
return self.expired_at - self._now()
39+
return self.expired_at - self._get_now()
4040

4141
def _set_expires_in(self, expires_in):
4242
if expires_in:
43-
self.expired_at = int(expires_in) + self._now()
43+
self.expired_at = int(expires_in) + self._get_now()
4444

4545
expires_in = property(_get_expires_in, _set_expires_in)
4646

4747
@property
4848
def is_expires(self):
49-
return not self.access_token or (self.expired_at is not None and self._now() > self.expired_at)
49+
return not self.access_token or (self.expired_at is not None and self._get_now() > self.expired_at)
5050

5151

5252
class App(object):

0 commit comments

Comments
 (0)