mirror of
https://github.com/ihabunek/toot.git
synced 2024-09-29 04:35:54 -04: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
|
import sys
|
||||||
|
|
||||||
from os.path import join, expanduser
|
from os.path import join, expanduser
|
||||||
from collections import namedtuple
|
from typing import NamedTuple
|
||||||
|
|
||||||
__version__ = '0.39.0'
|
__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'
|
DEFAULT_INSTANCE = 'https://mastodon.social'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user