mirror of
https://github.com/ihabunek/toot.git
synced 2024-11-03 04:17:21 -05:00
Add type hints for App and User
This commit is contained in:
parent
e5c8fc4f77
commit
696a9dcc2e
@ -2,12 +2,23 @@ import os
|
||||
import sys
|
||||
|
||||
from os.path import join, expanduser
|
||||
from collections import namedtuple
|
||||
from typing import NamedTuple
|
||||
|
||||
__version__ = '0.39.0'
|
||||
|
||||
App = namedtuple('App', ['instance', 'base_url', 'client_id', 'client_secret'])
|
||||
User = namedtuple('User', ['instance', 'username', 'access_token'])
|
||||
|
||||
class App(NamedTuple):
|
||||
instance: str
|
||||
base_url: str
|
||||
client_id: str
|
||||
client_secret: str
|
||||
|
||||
|
||||
class User(NamedTuple):
|
||||
instance: str
|
||||
username: str
|
||||
access_token: str
|
||||
|
||||
|
||||
DEFAULT_INSTANCE = 'https://mastodon.social'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user